Documentation ¶
Overview ¶
Package register contains measurement register-specific implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( HashSHA1 = HashAlg(tpm2.AlgSHA1) HashSHA256 = HashAlg(tpm2.AlgSHA256) HashSHA384 = HashAlg(tpm2.AlgSHA384) )
Valid hash algorithms.
Functions ¶
This section is empty.
Types ¶
type HashAlg ¶
type HashAlg uint8
HashAlg identifies a hashing Algorithm. Included for backcompat with the go-attestation API.
func (HashAlg) CryptoHash ¶
CryptoHash turns the hash algo into a crypto.Hash
type MRBank ¶
MRBank is a generic interface for a collection of measurement registers associated with the same hash algorithm.
type PCR ¶
type PCR struct { Index int Digest []byte DigestAlg crypto.Hash // contains filtered or unexported fields }
PCR encapsulates the value of a PCR at a point in time.
func (*PCR) QuoteVerified ¶
QuoteVerified returns true if the value of this PCR was previously verified against a Quote, in a call to AKPublic.Verify or AKPublic.VerifyAll. NOT for use in go-eventlog. Included for backcompat with the go-attestation API.
func (*PCR) SetQuoteVerified ¶
func (p *PCR) SetQuoteVerified()
SetQuoteVerified sets that the quote verified is true. NOT for use in go-eventlog. Included for backcompat with the go-attestation API.
type PCRBank ¶
PCRBank is a bank of PCRs that all correspond to the same hash algorithm.
func (PCRBank) CryptoHash ¶
CryptoHash returns the crypto.Hash algorithm related to the PCR bank.
type RTMR ¶
type RTMR struct { // The RTMR Index, not the CC MR Index. e.g., for RTMR[1], put 1, not 2. Index int Digest []byte }
RTMR encapsulates the value of a TDX runtime measurement register at a point in time. The given RTMR must always have a SHA-384 digest.
func (RTMR) Idx ¶
Idx gives the RTMR index. Confusingly, MRTD uses CC Measurement Register Index 0, so RTMR0 uses 1. RTMR1 uses 2, and so on. https://cdrdv2-public.intel.com/726792/TDX%20Guest-Hypervisor%20Communication%20Interface_1.5_348552_004%20-%2020230317.pdf https://github.com/cc-api/cc-trusted-vmsdk/issues/50
type RTMRBank ¶
type RTMRBank struct {
RTMRs []RTMR
}
RTMRBank is a bank of RTMRs that all correspond to the SHA-384 algorithm.
func (*RTMRBank) CryptoHash ¶
CryptoHash returns the crypto.Hash algorithm related to the RTMR bank.