Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProduceOuterWrap ¶
func ProduceOuterWrap(hashAlg tpm2.HashAlgorithmId, symmetricAlg *tpm2.SymDefObject, name tpm2.Name, seed []byte, useIV bool, data []byte) ([]byte, error)
ProduceOuterWrap adds an outer wrapper to the supplied data. The supplied name is associated with the data.
It encrypts the data using the specified symmetric algorithm and a key derived from the supplied seed and name.
It then prepends an integrity HMAC of the encrypted data and the supplied name using the specified digest algorithm and a key derived from the supplied seed.
func UnwrapOuter ¶
func UnwrapOuter(hashAlg tpm2.HashAlgorithmId, symmetricAlg *tpm2.SymDefObject, name tpm2.Name, seed []byte, useIV bool, data []byte) ([]byte, error)
UnwrapOuter removes an outer wrapper from the supplied sensitive data blob. The supplied name is associated with the data.
It checks the integrity HMAC is valid using the specified digest algorithm and a key derived from the supplied seed and returns an error if the check fails.
It then decrypts the data blob using the specified symmetric algorithm and a key derived from the supplied seed and name.
Types ¶
This section is empty.