Phase 3 W3: selective-disclosure UI + endpoints#32
Merged
Conversation
W3 of the web demo. Add two SD endpoints — derive a minimal reveal (/api/sd/disclose/:mode) and verify it (/api/sd/verify) — driving the holder Model B flow server-side: a wallet holds the full credential and derives a reveal disclosing only age_over_21. Only the reveal document crosses to the browser; the birthdate and the other claims never leave the wallet. The client gains a tabbed shell over a delegation view and a new disclosure view: a wallet/verifier split showing which claims stay hidden and which one crosses, the verifier's verdict, and — for bbs-2023 — that two derivations of the same fact produce different (uncorrelatable) proofs. Both cryptosuites are exposed: ecdsa-sd-2023 (linkable) and bbs-2023 (unlinkable). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #31 (W2). Base is
phase-3-w2-pipeline-ui; merge #31 first.What (W3 of the web-demo plan)
The L3 selective-disclosure story, end to end.
Server (2 new endpoints):
POST /api/sd/disclose/:mode—modeislinkable(ecdsa-sd-2023) orunlinkable(bbs-2023). A server-side wallet holds the full SD credential and derives a reveal disclosing onlyage_over_21. Returns the reveal + a manifest of held/disclosed claim names and the hidden count. The unlinkable mode derives twice so the UI can show non-correlation. The full credential (birthdate, name) never crosses.POST /api/sd/verify— verifies a reveal's derived proof via the genuineverifyDisclosureTool.Client: a tabbed shell over the existing Delegation (L1/L2) view and a new Selective disclosure (L3) view — a wallet/verifier split: the wallet lists all held claims (which stay hidden), only
age_over_21crosses to the verifier pane, the verdict renders, and for bbs-2023 a one-line confirmation that two derivations produced different (uncorrelatable) proofs.Tests
sdHandlers.test.js— 5 integration cases viaapp.inject: real derive + verify for both cryptosuites, a value-leakage canary (birthdate value / name never appear in the response), the unlinkability assertion (two proofs differ), 404 (unknown mode), 400 (missing reveal).npm run typecheck+npm run lintclean; web suite 23 passing; client builds clean (vue-tsc+ vite). Live-smoke-tested: 4 claims hidden, onlyage_over_21disclosed, no value leak, unlinkable proofs differ.W4 (the applied-demo runner for cloudflare/dmv) is next.
🤖 Generated with Claude Code