Documentation
¶
Overview ¶
Package approvalcrypto encrypts host-owned approval checkpoints without knowing their plaintext schema or persistence backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidKeyProvider = errors.New("invalid approval key provider") ErrInvalidKeyMaterial = errors.New("invalid approval key material") ErrInvalidEnvelope = errors.New("invalid approval ciphertext envelope") // ErrKeyMaterialChanged reports that the key stored under the envelope's // key id is not the key that encrypted it, for example because a deleted // keychain item was regenerated. The checkpoint cannot be recovered. ErrKeyMaterialChanged = errors.New("approval key was replaced since the checkpoint was encrypted") )
View Source
var (
)
Functions ¶
func OpenMacOSKeychainKeyProvider ¶
OpenMacOSKeychainKeyProvider is unavailable outside a local macOS host.
Types ¶
type AESGCMCipher ¶
type AESGCMCipher struct {
// contains filtered or unexported fields
}
AESGCMCipher encrypts versioned checkpoint envelopes with AES-256-GCM.
func NewAESGCMCipher ¶
func NewAESGCMCipher(keys KeyProvider) (*AESGCMCipher, error)
type KeyMaterial ¶
KeyMaterial is a host-owned data encryption key. Bytes must contain exactly 32 random bytes for AES-256-GCM and must never be persisted with ciphertext.
type KeyProvider ¶
type KeyProvider interface {
Active(ctx context.Context) (KeyMaterial, error)
Resolve(ctx context.Context, keyID string) (KeyMaterial, error)
}
KeyProvider returns the active key for new checkpoints and resolves keys named by older ciphertext envelopes during a key-rotation window.
Click to show internal directories.
Click to hide internal directories.