keys

package
v0.0.0-...-554ba31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 7 Imported by: 7

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 AuxKey

type AuxKey [AuxKeySize]byte

AuxKey is the key to bind models to keys.

func NewAuxKey

func NewAuxKey() (AuxKey, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL