Documentation ¶
Index ¶
- Constants
- Variables
- func GeneratED25519Key(password []byte, privateKeyFilePath string, publicKeyFilePath string) error
- func LoadPrivateKeyFromFile(privateKeyPath string, password []byte) ([]byte, error)
- func LoadPublicKeyFromFile(publicKeyPath string) ([]byte, error)
- func TryMeasureData(pcr uint32, data []byte, info string) error
- func TryMeasureFiles(files ...string) error
Constants ¶
View Source
const ( // BlobPCR type in PCR 7 BlobPCR uint32 = 7 // BootConfigPCR type in PCR 8 BootConfigPCR uint32 = 8 // ConfigDataPCR type in PCR 8 ConfigDataPCR uint32 = 8 // NvramVarsPCR type in PCR 9 NvramVarsPCR uint32 = 9 )
Variables ¶
View Source
var ( // PubKeyIdentifier is the PEM public key identifier PubKeyIdentifier = "PUBLIC KEY" // PrivKeyIdentifier is the PEM private key identifier PrivKeyIdentifier = "PRIVATE KEY" // PEMCipher is the PEM encryption algorithm PEMCipher = x509.PEMCipherAES256 // PubKeyFilePermissions are the public key file perms PubKeyFilePermissions os.FileMode = 0644 // PrivKeyFilePermissions are the private key file perms PrivKeyFilePermissions os.FileMode = 0600 )
Functions ¶
func GeneratED25519Key ¶
GeneratED25519Key generates a ED25519 keypair
func LoadPrivateKeyFromFile ¶
LoadPrivateKeyFromFile loads PEM formatted ED25519 private key from file.
func LoadPublicKeyFromFile ¶
LoadPublicKeyFromFile loads PEM formatted ED25519 public key from file.
func TryMeasureData ¶
TryMeasureData measures a byte array with additional information
func TryMeasureFiles ¶
TryMeasureFiles measures a variable amount of files
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.