Skip to content

feat(example): a data room, end to end - #16

Merged
stormer78 merged 1 commit into
mainfrom
feat/data-room-example
Sep 2, 2026
Merged

feat(example): a data room, end to end#16
stormer78 merged 1 commit into
mainfrom
feat/data-room-example

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Track 1 of the delivery plan. Stacked on
#15 (the VAC/VDC types) — review and
merge that first
; this targets that branch, and will retarget to main once it lands.

One example, one process, seven steps. cargo run --example data_room.

What it demonstrates rather than asserts

Step Claim
1 A room is an entity — its own DID, issuing its own credentials
2–3 Joining is a two-party act: the VMC pair completes on Bob's acknowledgement, so a room cannot assert a membership nobody agreed to
4 Access is a chain that reaches the room. The host is not asked
5 An agent runs on strictly less than its human — read-only, four hours, audience-bound — and is refused write, which its parent holds
6 Removal actually removes: the epoch rotates, Bob's key cannot open what comes after. And forward-only is shown honestly — what he already held, he still holds
7 The host view: ciphertext, an epoch number, and nothing else

It closes by proving a relocated record does not open — the AAD binding, demonstrated
rather than described.

Sample output is in the commit; the interesting lines are agent write correctly refused: chain does not confer action write and Bob's key cannot open epoch 2 — removal actually removed.

Why it lives here

examples/ rather than a new repo: it demonstrates this library. Its crypto is a
dev-dependency, so nothing in the library's own graph encrypts — adding a cipher to a
credential crate for the sake of an example would be the wrong trade.

The one structural decision worth reviewing

The store sits behind a narrow RoomHost trait — put, get, list, epoch,
set_epoch — from the first commit. That is the difference between this being a
foundation and being throwaway
: track 2 swaps the implementation for a VTC-backed one,
and that is only a swap if nothing above the trait reaches around it. Worth checking that
nothing does.

What it deliberately is not

Named in the module docs against what each gap does not prove, so the demo cannot quietly
be mistaken for the product:

  • One symmetric key per epoch, not MLS — no post-compromise security, O(n) membership change
  • did:key, not a witnessed did:webvh — no ownership transfer
  • The attributed tier — the acting member is disclosed to the host, not proven in zero knowledge
  • A BTreeMap, not a service — no availability, quota, or multi-party operation

What it does establish is that the credential model works end to end.

Track 1 of the delivery plan. One example, one process, seven steps - and
every claim demonstrated rather than asserted.

A room is minted as its own DID and issues its owner a VAC. Alice invites
Bob by VIC. Bob presents it and the VMC pair completes on his
acknowledgement, so the room cannot assert a membership he never agreed
to. Bob writes a record, sealed under the epoch key and AAD-bound to
room|key|version|epoch. He then equips his agent with a VAC that is read
only, four hours, and audience-bound to the agent - and the demo shows the
agent recalling the record and being refused write, which its parent
holds. Alice removes Bob, the epoch rotates, and Bob's key cannot open
what comes after while what he already held he still holds. The run ends
by printing everything the host stores, and by proving a relocated record
does not open.

Lives in dtg-credentials/examples rather than a new repo: it demonstrates
this library, and its crypto is a dev-dependency so nothing in the
library's own graph encrypts. The store sits behind a narrow RoomHost
trait from the first commit, so track 2 replaces the implementation rather
than rewriting the demo - that separation is the difference between this
being a foundation and being throwaway.

What it deliberately is not: one symmetric key per epoch rather than MLS,
so no post-compromise security and O(n) membership change; did:key rather
than a witnessed did:webvh, so no ownership transfer; the attributed tier
rather than zero-knowledge presentation; and a BTreeMap rather than a
service. Each gap is named in the module docs against what it does not
prove, so the demo cannot quietly be mistaken for the product.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 requested a review from a team as a code owner September 2, 2026 05:59
Base automatically changed from feat/vac-vdc-credentials to main September 2, 2026 06:22
@stormer78
stormer78 merged commit 0c1391a into main Sep 2, 2026
1 check passed
@stormer78
stormer78 deleted the feat/data-room-example branch September 2, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant