Repository navigation
docs(adr): reframe encrypted-content appendix away from "E2E encryption" - #351
Conversation
Closes #350. True end-to-end encryption means per-recipient encryption; this appendix's mechanism is closer to **broadcast encryption with subscription-gated access** or **conditional access** — the same ciphertext is served to all authorized clients, with access granted (and revoked) at the key-distribution layer via epoch-rotated wrapping. Mislabeling it as E2E was confusing. Changes: - Appendix: added a "Not end-to-end encryption" disclaimer at the top explaining the actual mechanism and its closest formal analogues (broadcast encryption, conditional access). - Appendix Context: replaced "must be encrypted end-to-end" with "encrypted at rest with subscription-gated decryption". The surrounding constraints already correctly describe the model (one hash, one ciphertext, all clients) — only the term was wrong. - Appendix §Decryption proxy alternative: replaced "breaks end-to-end encryption" with "exposes plaintext to a non-authorized intermediary, defeating the 'only authorized clients can decrypt' property". - Appendix §PoC Scope table: row label "E2E encryption" → "Encrypted publishing". - Appendix §forward-secrecy mitigations: "E2E encryption is not implemented" → "encrypted publishing is not implemented". - ADR 002 §Decision: "When end-to-end encryption is active" → "When content-level encryption is active". This is the only core ADR cross-ref to the appendix that used the E2E label. Other "end-to-end" / "E2E" mentions in the repo are unrelated: - TLS transport encryption ("traffic is end-to-end encrypted") in ADR 017 and architecture.md — these correctly describe QUIC TLS. - "End-to-end procedure", "end-to-end USDC flow", "validates the format end-to-end" — non-encryption uses meaning "thoroughly / complete path". Mechanism unchanged. Only the name.
The base protocol has no notion of encryption being "active". It
hashes bytes, full stop. Content addressing is a byte-level property;
whether those bytes happen to be plaintext or ciphertext is opaque to
the protocol and is the publisher's choice (documented in the
encrypted-content-publishing appendix as one possible deployment
pattern).
Two paragraphs in ADR 002 contradicted the content-agnostic principle
stated three lines earlier ("The protocol is content-agnostic. It
stores and delivers arbitrary blobs with no assumptions about format,
structure, or metadata."):
- §Decision: "When content-level encryption is active... the BLAKE3
hash covers the ciphertext..." — implied a protocol-level concept of
active/inactive encryption modes.
- §Decision: "Encrypted and unencrypted versions... are distinct
blobs" — same problem; framed in terms of encryption modes the
protocol doesn't see.
Both dropped. Same-bytes-same-hash already implies that ciphertext and
plaintext produce different hashes. The appendix specifies its own
encrypt-once-at-rest scheme without needing ADR 002 to anticipate it.
Also dropped the §Consequences "Content-addressing composes cleanly
with encryption" bullet — the underlying point is already captured by
"content-agnostic" + "same bytes always produce the same hash".
Calling out one specific publisher-side transformation in a content-
addressing ADR is appendix-flavored.
ADR 002 no longer references the appendix at all. Discoverability of
the appendix lives in `architecture.md` § Reading Order and
`adr/README.md` § ADRs vs appendices.
There was a problem hiding this comment.
Code Review
This pull request updates the documentation to clarify that the encryption scheme used is 'content-level encryption' rather than 'end-to-end encryption,' which is incompatible with content-addressed caching. It introduces a distinction between per-recipient encryption and subscription-gated access to commonly-encrypted content. Feedback suggests further refining the terminology by replacing 'at rest' with 'content-level' in specific sections to avoid ambiguity with storage-provider encryption and to maintain consistency across the ADRs.
Address Gemini review on PR #351. Both spots in the appendix used "encrypted at rest" / "encrypted once at rest" — ambiguous because "at rest" is also the standard term for storage-layer encryption (disk-encrypted volumes, encrypted databases) and because the preceding sentence in the Context paragraph uses "at rest" to describe what nodes hold in their cache. Aligned both spots to the "content-level encryption" term already established in ADR 002: - Disclaimer (line 5): "encrypted once at rest" → "undergoes content-level encryption once at ingest". Adds "at ingest" for temporal clarity (when, not where) since "at rest" was carrying both meanings. - Context paragraph (line 9): "content must be encrypted at rest with subscription-gated decryption" → "content must use content-level encryption with subscription-gated decryption". Also tightened the preceding "nodes see plaintext at rest" to "...for unencrypted blobs" so the cache-state "at rest" usage doesn't collide with content-level framing. Mechanism unchanged.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation to clarify that the system uses 'content-level encryption' for subscription-gated access rather than 'end-to-end encryption'. Feedback indicates that a deleted section explaining how BLAKE3 hashes apply to ciphertext should be restored with updated terminology, as it defines a core property of the content-addressing model.
I am having trouble creating individual review comments. Click here to see my feedback.
adr/002-content-addressing.md (18-21)
The PR description and test plan indicate that the cross-reference to the encryption appendix should be updated to use the new terminology ("content-level encryption"), but the diff shows the entire section was deleted. This paragraph is important as it defines the protocol's behavior regarding hashing ciphertext vs. plaintext, which is a core property of the content-addressing model. Restoring this ensures the documentation accurately reflects the implementation's security properties.
When content-level encryption is active ([Appendix: Encrypted Content Publishing](appendix-encrypted-content-publishing.md)), the BLAKE3 hash covers the ciphertext — not the plaintext. The origin encrypts content once at ingest, producing nonce || AEAD output, and the hash is computed over that entire byte sequence. This preserves global content-addressing: one ciphertext, one hash, one cached copy for all clients. CDN nodes never see or hash plaintext. When encryption is not active, the hash covers the raw blob bytes directly.
Encrypted and unencrypted versions of the same logical content are distinct blobs with distinct hashes. Content providers choose the encryption mode at ingest time; there is no protocol-level link between an encrypted and unencrypted variant of the same content.
References
- Ensure documentation, especially concerning security mechanisms like backward compatibility checks, accurately reflects the implementation.
|
@gemini-code-assist re: the review-summary suggestion to restore the deleted paragraph in ADR 002: Won't fix. The deletion is intentional and is the load-bearing change in this PR's last commit ( The deleted paragraph used "When content-level encryption is active..." framing, which contradicts the content-agnostic principle stated three lines earlier in the same ADR:
The base protocol has no notion of encryption being "active" or "inactive" — it just hashes blob bytes. Whether the bytes are plaintext or ciphertext is a publisher choice that's opaque to the protocol layer. Mentioning encryption modes in a content-addressing ADR re-introduces the same protocol/appendix coupling that #349 worked to remove. The properties the paragraph described are still preserved:
The cross-reference to the appendix lives in |
|
Thank you for the detailed clarification. Your reasoning regarding the removal of that paragraph from ADR 002 is sound. Maintaining the content-agnostic principle of the base protocol and avoiding coupling it with specific encryption implementation details is the correct architectural approach. The cross-references you mentioned in |
* docs(adr): Tier 2 — chapter intros + ADR 026 connective opener Closes #345. Most of Tier 2's originally-scoped work (cross-cutting concept lifts: epoch mechanics, FeeRouter surface, reentrancy, challenge bonds, slashing schedule) was absorbed by earlier passes: - #338 reframe: cross-cutting concepts framed as definitive design in their canonical homes (ADR 026 §2, §8; ADR 014 § Bond Handling). - #343 cleanup: ADR 004 deletion forced canonical-cross-ref discipline across the set; 60+ inbound links repointed. - #349 demotion: 5 implementation/deployment ADRs moved to appendices; protocol-level invariants extracted to consuming ADRs along the way. - #351 reframe: encrypted-content publishing terminology aligned with ADR 002. Remaining Tier 2 deliverables that this commit lands: 1. **Chapter intros in `architecture.md` § Reading Order.** Each of the 8 chapters now opens with a one-paragraph intro framing what the chapter is for and how the ADRs in it relate. Chapter 4 (Tokenomics) explicitly directs readers at ADR 026 first and ADR 027 second; Chapter 5 cross-refs the slashing schedule's canonical home; thin chapters (7, 8) get a one-sentence frame so they don't read as orphaned ADRs. 2. **ADR 026 Context opener.** Replaced "A bandwidth-CDN protocol with paid byte delivery, slashable operator stake, and on-chain settlement needs an economic model..." (project-level restatement at chapter-4 entry) with "The economic model — sitting on top of paid byte delivery (ADR 003) and the slashing primitive (ADR 014) — has to hold up under four pressures..." The four-pressure framing carries the load; the new opener connects to the chapters the reader has just finished. What was considered and skipped: - ADR section structure standardization (forcing all ADRs into Context/Decision/Consequences with explicit Positive/Negative/ Risks subsections). The current variation is intentional and works for each ADR's content shape; mass-converting would be cosmetic churn. - ADR 022's `## §N — Title` non-canonical heading style. Works in context; standardizing to plain `## ` would reorder the existing numbered sub-decisions. Skip. - Aggressive Context-section trimming. Spot-checks of the longest Contexts (ADR 029 44 lines, ADR 032 50 lines) found each was carrying its own load; tightening would lose context. * docs(adr): correct chapter 4 launch-vs-deferred categorization Address Gemini review on PR #352 + sharpen post-launch framing. **Gemini's points (both valid):** - ADR 030 (pre-seed USDC) is an explicit mainnet-launch prerequisite ($1M floor required before launch), not a "program/follow-up". - ADR 018 (Balancer V3 POL) is the destination for the 10% genesis liquidity allocation and is required at launch for buyback + delegator-pool mechanics, not an "extension". **Reframed categorization:** - **Launch-required:** 026 (canonical), 027 (gauge security), 018 (Balancer V3 POL), 030 (pre-seed USDC pool). - **Deferred adoption:** 028 (sveTOKEN wrapper), 029 (adaptive FeeRouter) — spec lands now, deployment decision waits on post-launch dynamics; either may close as Rejected if launch dynamics make them unnecessary. - **Post-launch additions:** 031 (BME prepay), 032 (bandwidth futures + Enterprise SLA) — they build on launch-time infrastructure to deliver the demand-side TOKEN sink and the Enterprise revenue tier. "Deferred from launch, not from the design" — these are crucial parts of the long-term economic model that don't ship at launch but are not optional/nice-to-have. The earlier "post-launch follow-ups" framing understated their importance; the reframe makes their role explicit. * docs(adr): tighten chapter 4 intro Same launch-vs-deferred-vs-additive structure, ~80% shorter: launch-required path enumerated as a list (ADRs without sub-explanations — those live in each ADR), deferred and additive each get one clause. Length now matches other chapter intros (3 sentences, ~50 words).
Closes #350.
True end-to-end encryption means per-recipient encryption; this appendix's mechanism is closer to broadcast encryption with subscription-gated access or conditional access — the same ciphertext is served to all authorized clients, with access granted (and revoked) at the key-distribution layer via epoch-rotated wrapping. Mislabeling it as E2E was confusing.
Changes
Appendix: Encrypted Content Publishing
Core ADR cross-ref
What stayed
Other "end-to-end" / "E2E" mentions in the repo are unrelated to this concern and were left alone:
architecture.md— these correctly describe QUIC TLS, which IS end-to-end at the transport layer between two peers.What didn't change
Test plan
^>lines in the appendix and TLS-transport contexts in 017/architecture.md mention "end-to-end encryption".🤖 Generated with Claude Code