Documentation ¶
Overview ¶
Package pcr contains code that handles PCR operations.
Index ¶
- func CalculateBankData(pcrNumber int, alg tpm2.TPMAlgID, sectionData map[constants.Section]string, ...) ([]types.BankData, error)
- func CalculateBankDataForFile(pcrNumber int, alg tpm2.TPMAlgID, file string, rsaKey RSAKey) ([]types.BankData, error)
- func CalculatePolicy(pcrValue []byte, pcrSelection tpm2.TPMLPCRSelection) ([]byte, error)
- func CreateSelector(pcrs []int) ([]byte, error)
- type Digest
- type RSAKey
- type Signature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateBankData ¶
func CalculateBankData(pcrNumber int, alg tpm2.TPMAlgID, sectionData map[constants.Section]string, rsaKey RSAKey) ([]types.BankData, error)
CalculateBankData calculates the PCR bank data for a given set of UKI file sections.
This mimics the process happening in the TPM when the UKI is being loaded.
func CalculatePolicy ¶
func CalculatePolicy(pcrValue []byte, pcrSelection tpm2.TPMLPCRSelection) ([]byte, error)
CalculatePolicy calculates the policy hash for a given PCR value and PCR selection.
func CreateSelector ¶
CreateSelector converts PCR numbers into a bitmask.
Types ¶
type Digest ¶
type Digest struct {
// contains filtered or unexported fields
}
Digest implements the PCR extension algorithm.
Each time `Extend` is called, the hash of the previous data is prepended to the hash of new data and hashed together.
The initial hash value is all zeroes.
Click to show internal directories.
Click to hide internal directories.