device

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 (
	SealingMethodLegacyTPM    = SealingMethod("")
	SealingMethodTPM          = SealingMethod("tpm")
	SealingMethodFDESetupHook = SealingMethod("fde-setup-hook")
)

Variables

View Source
var ErrNoSealedKeys = errors.New("no sealed keys")

/ ErrNoSealedKeys error if there are no sealed keys

Functions

func DataSealedKeyUnder

func DataSealedKeyUnder(deviceFDEDir string) string

DataSealedKeyUnder returns the path of the sealed key for ubuntu-data.

func FactoryResetFallbackSaveSealedKeyUnder

func FactoryResetFallbackSaveSealedKeyUnder(seedDeviceFDEDir string) string

FactoryResetFallbackSaveSealedKeyUnder returns the path of a fallback ubuntu save key object generated during factory reset.

func FallbackDataSealedKeyUnder

func FallbackDataSealedKeyUnder(seedDeviceFDEDir string) string

FallbackDataSealedKeyUnder returns the path of a fallback ubuntu data key.

func FallbackSaveSealedKeyUnder

func FallbackSaveSealedKeyUnder(seedDeviceFDEDir string) string

FallbackSaveSealedKeyUnder returns the path of a fallback ubuntu save key.

func HasEncryptedMarkerUnder

func HasEncryptedMarkerUnder(deviceFDEDir string) bool

HasEncryptedMarkerUnder returns true when there is an encryption marker in a given directory.

func ReadEncryptionMarkers

func ReadEncryptionMarkers(dataFDEDir, saveFDEDir string) ([]byte, []byte, error)

ReadEncryptionMarkers reads the encryption marker files at the appropriate locations.

func RecoveryKeyUnder

func RecoveryKeyUnder(deviceFDEDir string) string

RecoveryKeyUnder returns the path of the recovery key.

func SaveKeyUnder

func SaveKeyUnder(deviceFDEDir string) string

SaveKeyUnder returns the path of a plain encryption key for ubuntu-save.

func StampSealedKeys

func StampSealedKeys(rootdir string, content SealingMethod) error

StampSealedKeys writes what sealing method was used for key sealing

func TpmLockoutAuthUnder

func TpmLockoutAuthUnder(saveDeviceFDEDir string) string

TpmLockoutAuthUnder return the path of the tpm lockout authority key.

func WriteEncryptionMarkers

func WriteEncryptionMarkers(dataFDEDir, saveFDEDir string, markerSecret []byte) error

WriteEncryptionMarkers writes the encryption marker files at the appropriate locations.

Types

type SealingMethod

type SealingMethod string

SealingMethod represents the sealing method

func SealedKeysMethod

func SealedKeysMethod(rootdir string) (sm SealingMethod, err error)

SealedKeysMethod return whether any keys were sealed at all

Jump to

Keyboard shortcuts

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