Documentation
¶
Overview ¶
Package kdf implements the key deriviation function (KDF) for creation of encryption keys to protect the Vault key shares
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyDeriver ¶
type KeyDeriver interface {
// DeriveKey returns a byte array that is of keyLen length and
// an error if errors where encountered while deriving the key
// inputKeyingMaterial and info are inputs
// to the key deriviation function, an keyLen
// is the desired length of the derived key.
// inputKeyingMaterial is a secret
// and info is used to cause the KDF to generate
// different output keys from the same inputKeyingMaterial.
// Please see the application notes for RFC 5869
// https://tools.ietf.org/html/rfc5869#3 for
// details for details about the key derivation algorithm.
DeriveKey(inputKeyingMaterial []byte, keyLen uint, info string) ([]byte, error)
}
KeyDeriver is the interface that the main program expects for returning a derived key.
func NewKdf ¶
func NewKdf(fileIoPerformer fileioperformer.FileIoPerformer, persistencePath string, hashConstructor func() hash.Hash) KeyDeriver
NewKdf creates a new KeyDeriver
Click to show internal directories.
Click to hide internal directories.