keys

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

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