Documentation
¶
Overview ¶
Package secrets holds Beacon's master key (master.key in the data directory) and the sealing that the settings and the vault (package vault) build on: AES-256-GCM under keys derived with HKDF, each bound to its context.
Index ¶
- func DeriveAEAD(key []byte, domain string) (cipher.AEAD, error)
- func DeriveKey(key []byte, domain string) ([]byte, error)
- func LoadOrCreateKey(path string) ([]byte, error)
- func ReadKey(path string) ([]byte, error)
- func SealValue(a cipher.AEAD, plain []byte, context string) ([]byte, error)
- func UnsealValue(a cipher.AEAD, box []byte, context string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveAEAD ¶
DeriveAEAD derives a domain-separated AES-256-GCM cipher from a 256-bit root key.
func LoadOrCreateKey ¶
LoadOrCreateKey loads the 256-bit master key from path, or creates it atomically with mode 0600 on first start.
Types ¶
This section is empty.