Documentation
¶
Overview ¶
Package sealrow seals one record of komando's local store. A sealed row is
format (1 byte) | suite (1 byte) | nonce (12 bytes) | AES-256-GCM ciphertext
and the sealing is bound to the row's ID, type and version, so a row copied to another ID, type or version, or an older version put back in its place, does not open. The ID, type and version stay readable in their own columns; everything else, names included, is inside the seal.
The package holds no key and reads no file or environment: the caller passes the row key, which package sealkey makes from the store's master key.
Index ¶
Constants ¶
const Format byte = 1
Format is the row format this komando writes. A row with a higher number was written by a newer komando.
const (
// KeyLen is the size of the row key.
KeyLen = 32
)
const SuiteAESGCM byte = 1
SuiteAESGCM is AES-256-GCM under the row key, random 96-bit nonces.
Variables ¶
var ( // ErrNewerFormat: the row was written by a newer komando. ErrNewerFormat = errors.New("sealrow: row written by a newer komando; update komando") // ErrOpen: the row is damaged, was sealed with another key, or was moved // to another ID, type or version. ErrOpen = errors.New("sealrow: row does not open (wrong key, damaged, or moved)") )
Functions ¶
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key seals and opens rows. It is safe for use by several goroutines.