Skip to content

Reduce the encrypted-content-publishing appendix to a one-paragraph note #1430

Closed

Description

@alpergundogdu

Decision (2026-07 ADR simplification audit). Filed under the Protocol simplifications milestone — sibling to #1396, #1394, #1419. Verdict: DROP the appendix, but KEEP a one-paragraph note (in ADR 002): publishers may encrypt off-protocol using epoch keys; key distribution is an application concern. Keep it very short. (See Open Question 3.)

Drop proposal: remove the encrypted-content-publishing appendix

Status: proposal for discussion, not a decision.

Summary

Delete adr/appendix-encrypted-content-publishing.md in full and the reserved
cdn/keys/v1 ALPN name that only that appendix uses. This removes an entire
subscription-DRM subsystem from the ADR set: envelope encryption with epoch-key
rotation, the server_secret/HSM derivation guidance, epoch_key_revoked
rotation-signaling events, offline lease TTLs, device attestation, and the
companion "app server" component with its three cdn/keys/v1 stream types
(EpochKeyAuth/EpochKey, PlayRequest/PlayResponse,
OfflineLeaseRequest/OfflineLeaseResponse).

Nothing in the CDN protocol depends on any of it. The appendix says so itself,
twice: the app server is "not a CDN protocol participant," and "For the PoC,
none of these apply, because encrypted publishing is not implemented."

Motivation

  1. It is an application, not a protocol. The whole appendix is one deployment
    pattern for one tenant archetype — the "Spotify-clone" subscription-streaming
    scenario named in its own Context section. Broadcast encryption, conditional
    access, epoch rotation, per-device offline leases, watermarking, and behavioral
    anti-piracy detection are content-provider concerns. They sit above the delivery
    network, not inside it. The ADR set documents the protocol; this belongs in a
    downstream app repo (the appendix even anticipates that: "A minimal reference
    implementation may be provided in a separate repository").

  2. The protocol already delivers everything this needs, generically. ADR 002
    makes the load-bearing guarantee: the network is content-agnostic and "sees only
    hashes and bytes." A publisher who XChaCha20-encrypts a blob before upload gets a
    BLAKE3 hash over the ciphertext, and the network caches and serves it like any
    other blob — one ciphertext, one hash, one cached copy for all clients. That is
    the entire intersection between this scheme and the protocol, and it requires zero
    protocol machinery. Everything else in the appendix (how the app server gates
    access and ships K_blob to a subscriber) never touches a CDN node.

  3. This is a layer violation, not scale-deferral. The case for dropping holds at
    every network size. It is not "unneeded at tens of nodes, needed at thousands."
    The key-distribution layer is out of the protocol at ten nodes and at ten thousand
    — a bigger network changes nothing about whether epoch-key rotation is a delivery
    primitive. It is not.

  4. It reserves protocol surface for a spec that has no implementer. The appendix
    claims the cdn/keys/v1 ALPN and defines a KeysMessage protocol enum with six
    variants. None of it is built. Keeping a reserved ALPN and a normative enum for a
    hypothetical downstream tenant is premature generalization — it commits wire
    real-estate and schema-evolution obligations to a product that may never ship on
    this network.

  5. It carries a real, unbuilt cryptographic liability in the design record. The
    appendix's own Consequences section flags "No forward secrecy for epoch keys" as
    "the most significant cryptographic limitation of the current design," then
    prescribes HSM-backed derivation, periodic server_secret rotation, and an
    append-only rotation log to mitigate it. That is an unimplemented DRM subsystem's
    security debt living in a protocol ADR set — and worse, ADR 017 has promoted two
    of its risks (P-19, P-20) into the protocol privacy register with a "Pre-mainnet"
    roadmap item (see blast radius). Deleting the appendix retires that debt cleanly
    instead of carrying it toward mainnet as if it were protocol scope.

What removal touches

Blast radius is docs-only. No Rust and no Solidity change.

Reserved ALPN. cdn/keys/v1 exists only in prose. crates/protocol/src/lib.rs
registers exactly three ALPNs — ALPN_PROBE = b"cdn/probe/v1",
ALPN_CLIENT = b"cdn/client/v1", ALPN_DHT = b"cdn/dht/v1". There is no
ALPN_KEYS. Removing the appendix removes the name entirely.

Rust. Zero real hits. A grep for cdn/keys, keys/v1, KeysMessage,
EpochKey, OfflineLease, epoch_key, server_secret, K_blob, XChaCha
across crates/ and contracts/ returns only false positives:
/var/lib/decdn/keystore.json and eth_keystore config paths, and a local
server_secret variable in crates/node/tests/self_hosted_discovery.rs that is an
unrelated iroh SecretKey for a discovery-endpoint test. Nothing implements the
appendix.

Tests. None. No test references the scheme.

ADRs/docs to update after deletion:

  • adr/architecture.md:128 — appendix list entry pointing at the file and the
    cdn/keys/v1 ALPN. Remove the list item.
  • adr/README.md:42 — "encrypted content publishing (companion app server,
    cdn/keys/v1)" example in the appendix-category description. Remove the example.
  • adr/appendix-fraud-detection.md:50 — uses the appendix as an analogy for
    "operationally relevant, but not a protocol primitive." Drop the cross-ref (or
    re-point to Observability, which is the other example in the same sentence).
  • adr/013-schema-evolution.md:464 — cross-ref noting protocol enums replace "the
    appendix's ad-hoc 1-byte prefix." Reword to drop the reference. (013 does not
    define any KeysMessage/EpochKey variants — it only points at the appendix, so
    no enum surface is lost here.)
  • adr/017-privacy.md — the one substantive entanglement, and it is worth
    discussing on its own.
    The appendix's risks were lifted into the protocol privacy
    register: P-19 (offline lease blast radius, disposition Accept) and P-20 (no
    epoch-key forward secrecy, disposition Mitigate, timeline "Pre-mainnet"). These
    appear across the register table (lines 48-49), the disposition table (lines
    147-148), narrative sections (lines 122, 126, 177), the roadmap table (line 202),
    and the references list (line 229). Removing the appendix means P-19/P-20 must be
    struck from ADR 017 as well — they are application risks that were mis-scoped as
    protocol-privacy risks. ADR 017 line 12 already concedes application-level privacy
    "is out of scope."
  • adr/_history/alternatives-pre-launch.md — contains a reference; a history file, so
    likely leave as-is (it is a record), but note it.
  • adr/_build/part-9-appendices.md and adr/Makefile — the _build file is
    generated; regenerate via the Makefile after deletion. No hand-editing.

What we keep

The single load-bearing guarantee that makes encrypted publishing possible without
any of this machinery
stays, and it is already in ADR 002: the protocol is
content-agnostic and "sees only hashes and bytes." A publisher may encrypt content
before upload; the network shuttles the resulting ciphertext as an ordinary
content-addressed blob, caches it once, and serves it to every client — with global
content-addressing intact because BLAKE3 hashes the ciphertext. That is the only
protocol-level fact the appendix actually relies on, and dropping the appendix does
not weaken it.

Counter-argument

The strongest honest case for keeping it:

  • It is well-written reference material with real security analysis. The forward-
    secrecy discussion, the online/offline tradeoff table, and the analog-hole framing
    are genuinely good. Deleting them throws away work that a future app-repo author
    would want. Counter: that is an argument for moving it to an app/examples repo
    or a wiki, not for keeping it in the protocol ADR set. The value is real; the
    location is wrong.

  • A concrete "here's how you'd build a paid-streaming product on us" story helps
    fundraising and adoption.
    The Spotify-clone walkthrough is a compelling demo of
    what deCDN enables. [your call] — if the project wants a flagship worked example
    living inside the protocol repo for narrative reasons, that is a deliberate
    documentation choice, not a protocol requirement. It could live under a clearly
    labeled examples/ or internal/ surface rather than adr/, so it is not mistaken
    for normative protocol scope.

  • Reserving cdn/keys/v1 now avoids an ALPN collision later. If some future tenant
    does build this, having the name pre-claimed is tidy. Counter: the name is
    trivially re-claimable when someone actually builds it, and reserving wire surface
    for an unbuilt downstream app is exactly the premature-generalization pattern this
    proposal targets. Costs nothing to reclaim; costs clarity to hold.

  • The ADR 017 entanglement is the real cost of removal. P-19/P-20 are woven through
    the privacy register, and unpicking them is more than a one-line delete. [your
    call]
    — but the fix is straightforward (strike two application-scoped rows and a
    roadmap item that ADR 017 itself flags as out-of-scope application privacy), and
    leaving them in is arguably worse: it presents an unimplemented DRM subsystem's debt
    as a protocol mainnet-readiness item.

On balance this reads as a clean DROP: docs-only blast radius, no code, holds at all
scales, and its removal actually reduces mis-scoped security debt in ADR 017. The
one thing worth preserving — that publishers may encrypt before upload — is already
guaranteed by ADR 002 and stays.

Open questions

  1. Relocate or delete outright? Move the appendix verbatim to a future app/examples
    repo (or internal/), or delete it and let a downstream author rewrite when a real
    product needs it? Relocation preserves the analysis; deletion is cleaner.
  2. ADR 017 cleanup scope. Confirm P-19 and P-20 should be struck entirely (they are
    application risks) versus reworded to a one-line "encryption is an app concern; app
    servers own their own key hygiene" note. Recommend strike-and-summarize.
  3. Keep a one-paragraph pointer in ADR 002? Should ADR 002 gain a short sentence
    ("publishers who need confidentiality encrypt before upload; key distribution is an
    application concern outside this protocol") so the capability is discoverable without
    the full appendix? Low cost, preserves the narrative thread.
  4. cdn/keys/v1 reservation. Formally un-reserve the ALPN, or leave a one-line note
    in ADR 005 that it is available/unclaimed? Recommend un-reserve; reclaim on demand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions