Documentation
¶
Overview ¶
Package storesign is the operator-held Ed25519 key that authenticates a synced store (audit H1). Age provides confidentiality, not authentication; without this signature a backend that knows the (public) recipients can fabricate a policy-stripped store that every machine will pull silently.
The key is store-scoped and operator-anchored, distinct from the per-session audit signers in sign.go. The pin is this machine's memory of which public key it expects: it never travels with the store, and a mismatch is a hard refusal (not overrideable by --force).
Index ¶
- Constants
- Variables
- func Decode(s string) ([]byte, error)
- func DecodePub(s string) (ed25519.PublicKey, error)
- func Encode(b []byte) string
- func EncodePub(pub ed25519.PublicKey) string
- func LoadPin(path string) (ed25519.PublicKey, error)
- func Save(path string, k *Key) error
- func SavePin(path string, pub ed25519.PublicKey) error
- func Sign(priv ed25519.PrivateKey, payload []byte) []byte
- func Verify(pub ed25519.PublicKey, payload, sig []byte) bool
- type Key
Constants ¶
const SeedSize = ed25519.SeedSize
SeedSize is the Ed25519 seed length written to store-signing.key.
Variables ¶
var ErrCorrupt = errors.New("store-signing key or pin is corrupt")
ErrCorrupt is returned when a key or pin file exists but is not a valid 32-byte seed / 32-byte public key. Callers must refuse, never auto-heal: regenerating a corrupt seed would invalidate every prior signature and train the operator to discount a real tamper alarm (audit L3).
Functions ¶
func Encode ¶
Encode is unpadded standard base64 of raw bytes — the wire spelling for both the public key and the signature in S3 user-metadata.
func LoadPin ¶
LoadPin reads the pinned signer public key. A missing pin is os.ErrNotExist (legacy unsigned fleet). A present-but-unparseable pin is ErrCorrupt.