crypto

package
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BlobPCR type in PCR 7
	BlobPCR uint32 = 7
	// BootConfigPCR type in PCR 8
	BootConfigPCR uint32 = 8
	// ConfigDataPCR type in PCR 8
	ConfigDataPCR uint32 = 8
	// NvramVarsPCR type in PCR 9
	NvramVarsPCR uint32 = 9
)

Variables

View Source
var (
	// PubKeyIdentifier is the PEM public key identifier
	PubKeyIdentifier = "PUBLIC KEY"
	// PrivKeyIdentifier is the PEM private key identifier
	PrivKeyIdentifier = "PRIVATE KEY"
	// PEMCipher is the PEM encryption algorithm
	PEMCipher = x509.PEMCipherAES256
	// PubKeyFilePermissions are the public key file perms
	PubKeyFilePermissions os.FileMode = 0644
	// PrivKeyFilePermissions are the private key file perms
	PrivKeyFilePermissions os.FileMode = 0600
)

Functions

func GeneratED25519Key

func GeneratED25519Key(password []byte, privateKeyFilePath string, publicKeyFilePath string) error

GeneratED25519Key generates a ED25519 keypair

func LoadPrivateKeyFromFile

func LoadPrivateKeyFromFile(privateKeyPath string, password []byte) ([]byte, error)

LoadPrivateKeyFromFile loads PEM formatted ED25519 private key from file.

func LoadPublicKeyFromFile

func LoadPublicKeyFromFile(publicKeyPath string) ([]byte, error)

LoadPublicKeyFromFile loads PEM formatted ED25519 public key from file.

func TryMeasureData

func TryMeasureData(pcr uint32, data []byte, info string)

TryMeasureData measures a byte array with additional information

func TryMeasureFiles

func TryMeasureFiles(files ...string)

TryMeasureFiles measures a variable amount of files

Types

This section is empty.

Jump to

Keyboard shortcuts

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