Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The encryption key size is set so it has the same entropy as the derived // key. EncryptionKeySize = 32 // XXX: needs to be in sync with // github.com/snapcore/secboot/crypto.go:"type RecoveryKey" // Size of the recovery key. RecoveryKeySize = 16 // The auxiliary key is used to bind keys to models AuxKeySize = 32 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptionKey ¶
type EncryptionKey []byte
EncryptionKey is the key used to encrypt the data partition.
func NewEncryptionKey ¶
func NewEncryptionKey() (EncryptionKey, error)
func (EncryptionKey) Save ¶
func (key EncryptionKey) Save(filename string) error
Save writes the key in the location specified by filename.
type RecoveryKey ¶
type RecoveryKey [RecoveryKeySize]byte
RecoveryKey is a key used to unlock the encrypted partition when the encryption key can't be used, for example when unseal fails.
func NewRecoveryKey ¶
func NewRecoveryKey() (RecoveryKey, error)
func RecoveryKeyFromFile ¶
func RecoveryKeyFromFile(recoveryKeyFile string) (*RecoveryKey, error)
func (RecoveryKey) Save ¶
func (key RecoveryKey) Save(filename string) error
Save writes the recovery key in the location specified by filename.
func (RecoveryKey) String ¶
func (k RecoveryKey) String() string
Click to show internal directories.
Click to hide internal directories.