Repository navigation
Open
Milestone
Description
Parent: #91. This is the proposed last layer (L5) of #388. It is open for discussion. @andersalm @SashaMIT, please comment on the options below.
Problem
base.ela.city (elacity-web on Base) already does mint, buy and marketplace in its own way. It cannot open content that the Runtime mints. We do not want to port the Runtime into base.ela.city.
Goal
An entitled Base user opens Runtime-minted video and documents on base.ela.city. The Runtime security boundary stays intact.
Constraints agreed so far
- The seed node is the first entry point. It never sees a content key (CEK) or plaintext.
- base.ela.city changes as little as possible.
- The Runtime code is reused, not ported.
Shared base (the same for all options)
- Caller identity: the user's wallet signs a short delegation that binds an ephemeral recipient key, the asset and an expiry. This is a new "external viewer" principal. It is not a Runtime sign-in, and it only grants "read this asset if entitled".
- Rights: each custody node checks the Base
AuthorityGatewayitself, as in feat(protected-content): buy from any live offer #206. - Keys: custody nodes seal their shares end-to-end to the recipient key. The seed holds one share and routes requests. It never holds two shares in the clear.
- Seed role: a public HTTPS edge served by the Runtime gateway, with a new, explicit admission class for allowed origins. It relays to the second custody node over Carrier.
Option A: Embedded Runtime viewer (the Runtime renders in a frame)
base.ela.city page --iframe--> viewer frame (Runtime origin; seed for now)
wallet signs delegation <--postMessage--+ | decrypt core (Rust -> WASM)
| | Runtime player / reader UI
seed edge -+---> custody nodes -> shares sealed to the frame key
- How: base.ela.city adds an iframe and a small
postMessageclient (open(asset)and events). The frame runs the Runtime decrypt core as WASM and the existing Runtime player and reader. The host page only relays the wallet signature. - base.ela.city work: very small. media-player and ddrm-reader do not change.
- Runtime work: a WASM build of the decrypt core, a frame-hosted viewer, and the external-viewer admission class.
- Security: plaintext is in the browser, inside the frame. This is the same as the Runtime viewer today. The frame protects against third-party scripts, but not against the entitled user, because the host page holds the wallet.
- For: one surface for all content types. Format changes stay in the Runtime. Later, the user's own Runtime can serve the same frame (a service worker, if needed, goes inside the frame).
- Against: phone and full-screen reading inside an iframe need care. COEP
require-corpandframe-ancestorsneed setup. The UI is less native.
Option B: Key-release protocol (base.ela.city renders with its own readers)
media-player WASM --license(Runtime system ID)--> seed edge -> custody -> shares sealed to the WASM key
ddrm-reader backend --CekRecoveryStrategy-------> seed edge -> custody -> shares sealed to the backend
- How: the Runtime publishes a versioned key-release contract (delegation in, sealed shares out), and the seed serves it over HTTPS. base.ela.city adds two adapters: a media-player license handler that combines two shares in WASM, and a ddrm-reader
CekRecoveryStrategythat keeps the CEK on the ddrm-reader backend. - base.ela.city work: medium, in two repositories.
- Runtime work: small (the edge and the contract).
- Security: strongest for documents, because the CEK never reaches a browser. Video has the same trust as the current Chipotle flow.
- For: native UX. Each product keeps its own renderers.
- Against: base.ela.city must read Runtime formats. Runtime media is fMP4 parts, but media-player expects DASH and PSSH. Runtime documents use chunk identity, but ddrm-reader expects
encryptedDataCid. Public reads of the encrypted bytes are also necessary. Each Runtime format change can break another repository.
Option C: Dual wrap at mint (no Runtime at read time)
Runtime mint -> CEK to dKMS custody (2-of-3) AND CEK wrapped for Chipotle/Lit
base.ela.city -> current Chipotle flow, no change
- How: the Runtime also writes a Chipotle-compatible PSSH, and DASH packaging for video, when it mints.
- base.ela.city work: none.
- Runtime work: large and permanent (the Lit encoder, DASH packaging, and parity with the transcoder).
- Security: two custody systems hold every key. Revocation and policy are split. The seed sees no CEK, but the Lit TEE does.
- For: no new read-time service.
- Against: it ties dKMS to Lit/Chipotle and works against the purpose of dKMS. Content that is already minted needs a re-wrap.
Proposal for discussion
- First, define the key-release contract (delegation, external-viewer principal, sealed shares) in L1/L2 of After 0.8.0: Rebuild protected content on develop as a layered stack (successor of #203–#206) #388. Options A and B both use it.
- Ship Option A as L5: one embedded viewer for all content types, with almost no work in base.ela.city.
- Keep the Option B ddrm-reader adapter in reserve, in case documents must keep the CEK off browsers.
- Do not do Option C.
- Longer term, Option A is the first capability of a general interop surface: an external principal, a Runtime-origin frame and typed Runtime operations. Mint or buy from other apps can be added later, after a security review. The seed is only the first host.
Open questions
- Which option do we adopt?
- Is the "external viewer" principal (a wallet delegation, not a Runtime sign-in) acceptable under PRINCIPLES §16 and the deferred "Mode B" wallet work?
- Custody release waits for Base finality (about 15 to 20 minutes after a buy). Is that acceptable for buy-then-open on base.ela.city?
- Which origins does the seed admit, and who maintains that list?
Metadata
Metadata
Assignees
Labels
No labels
Activity
andersalm commentedon Oct 16, 2026
@irzhywau @SashaMIT
I propose that #400 first proves access-controlled browser playback using Runtime's existing native decrypt provider, with an input adapter for base.ela.city's
media-player. The first test is whether a small adapter can expose Runtime's clear fMP4 parts through a DASH manifest and session-authorized segment reads. It must support seeking and retries while enforcing session limits and bounded buffering.The reusable asset key stays inside the selected decrypt provider.
media-playerreceives the media output permitted by an authorized viewer session. We should describe this accurately: it preserves key confinement and service access control, while the browser can retain media it receives. Stronger control over copying requires a controlled viewer and separate evidence for its outputs.Runtime owns authorization, provider selection and session lifecycle. Each custody node independently checks entitlement. A wallet signature proves control of the account and authorizes the bounded request; the rights check establishes entitlement. The new piece is admission: a cross-origin, wallet-only viewer session for a browser without a Runtime sign-in, which the front door refuses today. This needs review of the external-viewer principal and custody recipient authorization, as well as the origin policy. Home authority stays separate.
Decryption can run in the buyer's Home or an explicitly trusted decrypt node. The seed may retain its own custody share and handle admission and routing. The selected decrypt provider reconstructs the content key and processes plaintext. Protected payloads that pass through the seed remain opaque to it. Who operates the node running the decrypt provider for browser users is an open decision. The same operation should work as services become more distributed through Carrier.
Before committing to full implementation, prove one Runtime-minted video through the actual base.ela.city
media-player. Include audio, seeking, phone playback, reconnect and Close. Check expiry and revocation against later reads, and measure startup time, buffering, concurrency and delivery cost. Existing source paths are inputs to this test, rather than completed product proof.If adapting
media-playercosts too much, evaluate Runtime's own Elacity Player capsule (elacity-player) backed by the same native decrypt provider. That can reduce player integration work, although hosted playback still has delivery costs.Browser key release remains a separate policy decision for content whose accepted terms permit reusable client decryption. An expiring licence around an unchanged asset key cannot provide revocable playback after that key has been retained.
Please record the chosen boundary and exact source candidates in #400. Track the shared admission, contract-wallet (ERC-1271), metadata and entitlement-check work under #388. Video can be the first acceptance slice; documents retain a separate acceptance requirement. The Base finality wait and the origin-list owner are still open from your list.
Please confirm this direction and name an owner and time limit for the one-asset prototype, and record its playback results, security findings, delivery costs and remaining work in #400.
On your four questions, my positions:
irzhywau commentedon Oct 20, 2026
Agreed: native decrypt replaces Options A and B. Option A is withdrawn (no CEK in the browser), and Option C stays excluded.
Conditions: the decrypt node runs on its own host and OS account, never on the seed (#174). Each CEK lives for one session and is wiped after it. Sessions are short. Segments are session-bound and
no-store, under/api/. The UI says where content is decrypted. A TEE (#212) comes later.The prototype must also prove clear DASH playback with seeking in
media-player, and measure egress and concurrency. The prototype owner and time limit will follow.