tpm

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0, BSD-3-Clause Imports: 4 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ObjectType_name = map[int32]string{
		0:  "OBJECT_INVALID",
		1:  "RSA",
		35: "ECC",
	}
	ObjectType_value = map[string]int32{
		"OBJECT_INVALID": 0,
		"RSA":            1,
		"ECC":            35,
	}
)

Enum value maps for ObjectType.

View Source
var (
	HashAlgo_name = map[int32]string{
		0:  "HASH_INVALID",
		4:  "SHA1",
		11: "SHA256",
		12: "SHA384",
		13: "SHA512",
	}
	HashAlgo_value = map[string]int32{
		"HASH_INVALID": 0,
		"SHA1":         4,
		"SHA256":       11,
		"SHA384":       12,
		"SHA512":       13,
	}
)

Enum value maps for HashAlgo.

Functions

This section is empty.

Types

type HashAlgo

type HashAlgo int32
const (
	HashAlgo_HASH_INVALID HashAlgo = 0
	HashAlgo_SHA1         HashAlgo = 4
	HashAlgo_SHA256       HashAlgo = 11
	HashAlgo_SHA384       HashAlgo = 12
	HashAlgo_SHA512       HashAlgo = 13
)

func (HashAlgo) Descriptor

func (HashAlgo) Descriptor() protoreflect.EnumDescriptor

func (HashAlgo) Enum

func (x HashAlgo) Enum() *HashAlgo

func (HashAlgo) EnumDescriptor deprecated

func (HashAlgo) EnumDescriptor() ([]byte, []int)

Deprecated: Use HashAlgo.Descriptor instead.

func (HashAlgo) Number

func (x HashAlgo) Number() protoreflect.EnumNumber

func (HashAlgo) String

func (x HashAlgo) String() string

func (HashAlgo) Type

type ImportBlob

type ImportBlob struct {
	Duplicate     []byte `protobuf:"bytes,1,opt,name=duplicate,proto3" json:"duplicate,omitempty"`
	EncryptedSeed []byte `protobuf:"bytes,2,opt,name=encrypted_seed,json=encryptedSeed,proto3" json:"encrypted_seed,omitempty"`
	PublicArea    []byte `protobuf:"bytes,3,opt,name=public_area,json=publicArea,proto3" json:"public_area,omitempty"`
	Pcrs          *PCRs  `protobuf:"bytes,4,opt,name=pcrs,proto3" json:"pcrs,omitempty"`
	// contains filtered or unexported fields
}

func (*ImportBlob) Descriptor deprecated

func (*ImportBlob) Descriptor() ([]byte, []int)

Deprecated: Use ImportBlob.ProtoReflect.Descriptor instead.

func (*ImportBlob) GetDuplicate

func (x *ImportBlob) GetDuplicate() []byte

func (*ImportBlob) GetEncryptedSeed

func (x *ImportBlob) GetEncryptedSeed() []byte

func (*ImportBlob) GetPcrs

func (x *ImportBlob) GetPcrs() *PCRs

func (*ImportBlob) GetPublicArea

func (x *ImportBlob) GetPublicArea() []byte

func (*ImportBlob) ProtoMessage

func (*ImportBlob) ProtoMessage()

func (*ImportBlob) ProtoReflect

func (x *ImportBlob) ProtoReflect() protoreflect.Message

func (*ImportBlob) Reset

func (x *ImportBlob) Reset()

func (*ImportBlob) String

func (x *ImportBlob) String() string

type ObjectType

type ObjectType int32

Enum values come from TCG Algorithm Registry - v1.27 - Table 3

const (
	ObjectType_OBJECT_INVALID ObjectType = 0
	ObjectType_RSA            ObjectType = 1
	ObjectType_ECC            ObjectType = 35
)

func (ObjectType) Descriptor

func (ObjectType) Descriptor() protoreflect.EnumDescriptor

func (ObjectType) Enum

func (x ObjectType) Enum() *ObjectType

func (ObjectType) EnumDescriptor deprecated

func (ObjectType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ObjectType.Descriptor instead.

func (ObjectType) Number

func (x ObjectType) Number() protoreflect.EnumNumber

func (ObjectType) String

func (x ObjectType) String() string

func (ObjectType) Type

type PCRs

type PCRs struct {
	Hash HashAlgo          `protobuf:"varint,1,opt,name=hash,proto3,enum=tpm.HashAlgo" json:"hash,omitempty"`
	Pcrs map[uint32][]byte `` /* 150-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PCRs) Descriptor deprecated

func (*PCRs) Descriptor() ([]byte, []int)

Deprecated: Use PCRs.ProtoReflect.Descriptor instead.

func (*PCRs) GetHash

func (x *PCRs) GetHash() HashAlgo

func (*PCRs) GetPcrs

func (x *PCRs) GetPcrs() map[uint32][]byte

func (*PCRs) ProtoMessage

func (*PCRs) ProtoMessage()

func (*PCRs) ProtoReflect

func (x *PCRs) ProtoReflect() protoreflect.Message

func (*PCRs) Reset

func (x *PCRs) Reset()

func (*PCRs) String

func (x *PCRs) String() string

type Quote

type Quote struct {

	// TPM2 quote, encoded as a TPMS_ATTEST
	Quote []byte `protobuf:"bytes,1,opt,name=quote,proto3" json:"quote,omitempty"`
	// TPM2 signature, encoded as a TPMT_SIGNATURE
	RawSig []byte `protobuf:"bytes,2,opt,name=raw_sig,json=rawSig,proto3" json:"raw_sig,omitempty"`
	// PCR values of the bank being quoted
	Pcrs *PCRs `protobuf:"bytes,3,opt,name=pcrs,proto3" json:"pcrs,omitempty"`
	// contains filtered or unexported fields
}

func (*Quote) Descriptor deprecated

func (*Quote) Descriptor() ([]byte, []int)

Deprecated: Use Quote.ProtoReflect.Descriptor instead.

func (*Quote) GetPcrs

func (x *Quote) GetPcrs() *PCRs

func (*Quote) GetQuote

func (x *Quote) GetQuote() []byte

func (*Quote) GetRawSig

func (x *Quote) GetRawSig() []byte

func (*Quote) ProtoMessage

func (*Quote) ProtoMessage()

func (*Quote) ProtoReflect

func (x *Quote) ProtoReflect() protoreflect.Message

func (*Quote) Reset

func (x *Quote) Reset()

func (*Quote) String

func (x *Quote) String() string

type SealedBytes

type SealedBytes struct {
	Priv          []byte     `protobuf:"bytes,1,opt,name=priv,proto3" json:"priv,omitempty"`
	Pub           []byte     `protobuf:"bytes,2,opt,name=pub,proto3" json:"pub,omitempty"`
	Pcrs          []uint32   `protobuf:"varint,3,rep,packed,name=pcrs,proto3" json:"pcrs,omitempty"`
	Hash          HashAlgo   `protobuf:"varint,4,opt,name=hash,proto3,enum=tpm.HashAlgo" json:"hash,omitempty"`
	Srk           ObjectType `protobuf:"varint,5,opt,name=srk,proto3,enum=tpm.ObjectType" json:"srk,omitempty"`
	CertifiedPcrs *PCRs      `protobuf:"bytes,6,opt,name=certified_pcrs,json=certifiedPcrs,proto3" json:"certified_pcrs,omitempty"`
	CreationData  []byte     `protobuf:"bytes,7,opt,name=creation_data,json=creationData,proto3" json:"creation_data,omitempty"`
	Ticket        []byte     `protobuf:"bytes,8,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// contains filtered or unexported fields
}

SealedBytes stores the result of a TPM2_Seal. The private portion (priv) has already been encrypted and is no longer sensitive. The hash algorithm is assumed to be SHA256.

func (*SealedBytes) Descriptor deprecated

func (*SealedBytes) Descriptor() ([]byte, []int)

Deprecated: Use SealedBytes.ProtoReflect.Descriptor instead.

func (*SealedBytes) GetCertifiedPcrs

func (x *SealedBytes) GetCertifiedPcrs() *PCRs

func (*SealedBytes) GetCreationData

func (x *SealedBytes) GetCreationData() []byte

func (*SealedBytes) GetHash

func (x *SealedBytes) GetHash() HashAlgo

func (*SealedBytes) GetPcrs

func (x *SealedBytes) GetPcrs() []uint32

func (*SealedBytes) GetPriv

func (x *SealedBytes) GetPriv() []byte

func (*SealedBytes) GetPub

func (x *SealedBytes) GetPub() []byte

func (*SealedBytes) GetSrk

func (x *SealedBytes) GetSrk() ObjectType

func (*SealedBytes) GetTicket

func (x *SealedBytes) GetTicket() []byte

func (*SealedBytes) ProtoMessage

func (*SealedBytes) ProtoMessage()

func (*SealedBytes) ProtoReflect

func (x *SealedBytes) ProtoReflect() protoreflect.Message

func (*SealedBytes) Reset

func (x *SealedBytes) Reset()

func (*SealedBytes) String

func (x *SealedBytes) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL