Documentation
¶
Overview ¶
Package backupseal encrypts the backups of the key store with age (filippo.io/age), for the public key of the owner (#75): the process that seals a backup cannot open it. It also opens a dump sealed for a key drawn for one restore in production (#297).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrSigningKey means the signing key is not 32 bytes of hex, the seed // of an Ed25519 private key. ErrSigningKey = errors.New("backup signing key must be 32 bytes of hex") // ErrVerifyKey means the verify key is not 32 bytes of hex, an Ed25519 // public key. ErrVerifyKey = errors.New("restore verify key must be 32 bytes of hex") // ErrSignature means the dump carries no signature, or one the verify // key does not accept: it was not made by the backup job. ErrSignature = errors.New("dump signature missing or invalid") )
var ErrIdentity = errors.New("restore identity must be one age private key")
ErrIdentity means the identity is not one native age private key.
var ErrNoSigner = errors.New("backup sealer needs a signer")
ErrNoSigner means a Sealer was asked for without a Signer: every backup is signed.
var ErrRecipient = errors.New("backup recipient must be one age public key")
ErrRecipient means the recipient is not one native age public key.
Functions ¶
This section is empty.
Types ¶
type Opener ¶ added in v0.58.0
type Opener struct {
// contains filtered or unexported fields
}
Opener decrypts a dump sealed for one identity: in production, a key drawn for one restore, never the owner's (#297). It implements app.KeyDumpOpener.
func NewOpener ¶ added in v0.58.0
NewOpener returns an Opener for identity, one native age private key, such as the "AGE-SECRET-KEY-PQ-1…" printed by age-keygen -pq, or ErrIdentity, whose dumps verifier checks. The error never quotes identity.
type Sealer ¶
type Sealer struct {
// contains filtered or unexported fields
}
Sealer encrypts backups for one recipient. It implements app.BackupSealer.
type Signer ¶ added in v0.63.0
type Signer struct {
// contains filtered or unexported fields
}
Signer signs dumps with the private key of the backup job.
type Verifier ¶ added in v0.63.0
type Verifier struct {
// contains filtered or unexported fields
}
Verifier checks the signature of a clear dump. It implements app.KeyDumpOpener for a dump the owner already decrypted.
func NewVerifier ¶ added in v0.63.0
NewVerifier returns a Verifier for key, the hex of a 32-byte Ed25519 public key, or ErrVerifyKey.