Skip to content

ADR: define authenticated encrypted representations and key capabilities #86

Description

@flyingrobots

Outcome

Define a native Keep representation contract for authenticated encryption that preserves BlobId and LayoutId across encryption, re-encryption, recipient changes, and key rotation.

Dependencies

Decision questions

  • Which audited AEAD suite and nonce strategy are admitted first?
  • How are independently authenticated frames encoded and bounded?
  • Which AAD fields bind blob, layout, representation version, frame coordinate, and declared context?
  • How are random DEKs wrapped for multiple recipient KEKs?
  • What semantic key capability crosses the Keep port without importing a Keychain, KMS, CLI, or application keyRef type?
  • Which metadata remains visible, confidential, or equality-revealing?
  • How do rotation, recipient addition or removal, missing keys, and revoked keys affect representation identity and receipts?
  • What must be authenticated before any plaintext reaches a caller?

Acceptance criteria

  • A numbered ADR freezes the identity, framing, AAD, nonce, recipient-envelope, and verification laws.
  • BlobId continues to name exact logical plaintext and does not move under key rotation.
  • RepresentationId names exact authenticated encoded bytes and changes when representation bytes change.
  • Random per-representation DEKs and multi-recipient KEK wrapping are specified.
  • Convergent or deterministic encryption is explicitly excluded from the private-content profile.
  • Key material never enters durable formats, diagnostics, receipts, or test logs.
  • Missing, unavailable, unauthorized, revoked, malformed, and authentication-failed key paths remain distinct.
  • Streaming restore never releases unauthenticated plaintext.
  • Dependency, side-channel, zeroization, crash, backup, and recovery implications are reviewed.
  • Independent golden and mutation corpora are required before the codec is admitted.

Non-goals

  • Owning external key custody or application purge authority.
  • Copying git-cas manifests or Git object identity.
  • Choosing an algorithm by implementation convenience before the ADR.
  • Metadata-oblivious storage without a separately proved design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:formatCanonical durable formats and decodingarea:identityLogical content identity and typed coordinatesarea:integrationEcho, Graft, and external integration boundariesarea:verificationIntegrity verification and corruption posturekind:adrArchitecture decision record requiredkind:designDesign contract or executable specificationpriority:P1Must fix before closing out the current milestone

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions