Repository navigation
docs: specify XChaCha20-Poly1305 nonce storage in ADR 006 - #112
Conversation
…R 006 ADR 006 omitted how the 24-byte nonce is stored and transmitted for both blob encryption and key wrapping. Without this, clients cannot decrypt. All XChaCha20-Poly1305 outputs now use an explicit nonce || ciphertext || tag wire format with the nonce prepended to the AEAD output. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR clarifies ADR 006’s XChaCha20-Poly1305 usage by explicitly specifying how the 24-byte nonce is stored/transmitted so clients can reliably decrypt blobs and wrapped keys.
Changes:
- Define a consistent wire format for all XChaCha20-Poly1305 outputs:
nonce (24B) || AEAD output (ciphertext||tag). - Update pseudocode and client decryption steps to generate, prepend, parse, and use nonces for both blob encryption and key wrapping.
- Update mermaid sequence diagrams and the offline playback flowchart to reflect nonce handling.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request updates the ADR for end-to-end encryption to incorporate a 24-byte nonce into the XChaCha20-Poly1305 encryption scheme for both blob storage and per-request sealed envelopes. The documentation and sequence diagrams have been updated to reflect this change, ensuring nonce uniqueness. I have provided feedback regarding the consistent use of terminology throughout the document to avoid ambiguity between the full encrypted package and the AEAD ciphertext component.
Address review feedback: "impossible" was too strong for a probabilistic claim. Also clarify wire format description to avoid overloading the term "ciphertext" between the variable and the AEAD component. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
nonce || ciphertext || tagwire format (nonce prepended to AEAD output)Test plan
🤖 Generated with Claude Code