Repository navigation
docs(site): selective disclosure section, commitments & encryption guides, confidential use cases - #88
Conversation
…ides, confidential use cases
Document the Pedersen, ElGamal, threshold DKG/HPKE and confidential-note work
(ADR-0051..0055) for beginners, and help readers choose between disclosure options.
- New "Selective disclosure" section: a chooser ("one salary, six ways" with a
help-me-choose tree) and six option pages (reveal with BBS, prove a rule,
hide a number, tell chosen readers, encrypt for an auditor, split the trust),
each with short code and real-world uses. The BBS guide stays as it was, plus
one pointer to the chooser.
- New guides (Guides > Commitments & encryption): Pedersen commitments, ElGamal
encryption, threshold decryption (DKG + HPKE share delivery), confidential
notes. Complete examples were compiled and run against a pre13 build.
- New Learn page "Commitments & encryption, explained" with interactive
commitment and encryption explainers.
- New use cases with walkthroughs: confidential payroll, sealed-bid auction,
confidential loyalty points, proof of solvency with hidden balances; private
voting gains the encrypted-tally section (zeroj-usecases PR #8). The demos
are on open zeroj-usecases PRs #8/#9 and the pages say so.
- Reference updates: status matrix, glossary, modules, API cheatsheet, AI
starter pack, gadgets.
- On-chain Groth16 costs re-measured at 6a89f8a after ADR-0056 (1 input:
2,052,276,435 CPU / 138,837 memory; +0.14e9 per input).
- SinceNotice component marks pages whose APIs are newer than the published
release; check-api-refs honours non-ZeroJ imports of a same-named type.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Private voting now describes the encrypted-ballot demo (usecases ADR-0005) as the design: ElGamal ballot, trustee key proofs, homomorphic tally, the PrivateBallotProof circuit (compiled: 9,477 constraints, 9 public inputs) and script-parameter pinning. A new "Why not just hash the vote?" section with BallotPrivacyExplainer shows why Poseidon(vote, nullifier) is readable by anyone (public nullifier, 0/1 vote), why a salt breaks the tally, and why encryption fixes both. VotingWalkthrough shows the encrypted ballot. Assuming zeroj-usecases #8/#9 and ZeroJ 0.1.0-pre13 land first: Try-it sections point at main and ./demo.sh pedersen, branch/PR-pending notes and "use a snapshot until release" prose are removed (SinceNotice still hides itself once release.json reaches pre13), and demo cost notes say they were measured before #85/#86. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…doesn't hide the vote Poseidon(vote, nullifier) is decodable by anyone (public nullifier, 0/1 vote). Adds a correction note pointing to the encrypted ballot (zeroj-usecases ADR-0005), and fixes the claims that the public can't learn the vote (overview, who-sees-what table, circuit comment, tally phase, security properties, MACI comparison). The registry analysis is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The use-case pages now describe the demos as they behave after the privacy and binding hardening in zeroj-usecases (ADR-0009): - Product passport: rewritten around auditor-issued Pedersen vector commitments, the locked, auditor-co-signed passport record and the four claim circuits; new PassportPrivacyExplainer lets readers run the 65,536-value search that broke the old keyed hash. - NFT gate: circuit v2 nullifier with a holder secret, the sound insert-only list, event parameters, CIP-8 registration, and the trust shift to the indexer. - Airdrop: holder-chosen identifier, one credential per person, epoch domain tag, recipient-bound payout, pay-once ledger; only nullifiers are unlinkable (the recipient is public). - Proof of reserves: salted leaves, locked proof-checked attestation tokens, the browser check against the chain indexer. - Vouchers (BBS, account recovery): outref-tagged payouts. - Solvency, payroll, points, auction, KYC, selective disclosure and voting: the remaining limitations ADR-0009 states. Walkthroughs updated to match; design notes in docs/usecases gain correction notes. Reviewed for accuracy against the hardened code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed PR head
The main Pedersen guide otherwise correctly covers modulo- Validation: Local site checks and build passed, including the API-reference and link checks. Eight runnable programs produced the documented results, and eight circuit-count checks matched. Direct Java compilation exposed the missing import despite the API checker passing. I did not rerun Yaci E2E tests. Merge prerequisites: At review time, zeroj-usecases PRs #8, #9 and #10 were still open, and |
…s, DPP import, Pedersen maturity 1. CommitmentExplainer: a blinding that opens C to any other amount exists (perfect hiding); binding is computational, so the text now says Alice can't feasibly find a second opening. 2. Confidential payroll (page and walkthrough): salary totals count only the notes a pay run minted, spent ones included, as AuditorView.issuedNotes() does. Notes minted by a transfer or cash-out (including change) stay readable but are not added, which would double-count. 3. Digital product passport: the complete CarbonClaimProof listing imports java.util.List. Compiled verbatim against 0.1.0-pre13: 2,192 constraints, 4 public inputs, as the page says. 4. Pedersen maturity: Ready covers ZkPedersen only. ZkPedersenCommitment is part of the experimental homomorphic API, as in zeroj-circuit-lib/README.md (pedersen guide, status page, gadget matrix). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Author reply · head d746b6d Thanks. All four findings checked out against the code and specs, and all four are fixed in
Checks:
Merge prerequisites. ZeroJ
|
Summary
This PR adds beginner-friendly docs for the new commitment and encryption features:
It also adds a Selective disclosure section that explains what to use when. It's docs only: just
www/, and nothing outside it.New: Selective disclosure (top-level sidebar section)
/selective-disclosure/): an interactive "one salary, six ways" explainer. It shows what Carol, a landlord, the tax authority and the public learn under each option, and includes a Help me choose question tree. A comparison table follows.New guides (Guides → Commitments & encryption)
0.1.0-pre13build (identical tomainfor these modules). Each page shows the output from that run, and the constraint counts match.New Learn page
Use cases
Other updates
6a89f8aafter ADR-0056. CPU is about 22% lower:<SinceNotice since="0.1.0-pre13" />marks pages whose APIs are newer than the published release. It disappears automatically oncerelease.jsonpoints at a release that is on Maven Central at or after that version, and the AI Markdown exports get the same note.check-api-refsnow honours a block's own non-ZeroJ import of a type whose simple name matches a ZeroJ type (java.security.SignaturevsEdDSAJubjub.Signature).Merge order
This PR merges after zeroj-usecases PRs #8, #9 and #10. ZeroJ 0.1.0-pre13 is released, and those PRs now pin it.
mainand use./demo.sh pedersen/./demo.sh voting.SinceNoticehides itself oncewww/release.jsonis bumped to0.1.0-pre13. It still says pre12. This PR doesn't bump it; that is the release-step PR, as docs: mark ZeroJ 0.1.0-pre12 as released #72 was for pre12.Hardened demos (b06e4a4)
The use-case pages describe the demos as hardened by zeroj-usecases #10 (ADR-0009). Changes:
docs/usecases/*.mddesign notes get correction notes.Every page was checked for accuracy against the hardened code, and the findings are fixed. The ADR-0009 links resolve once #10 merges.
Review fixes (d746b6d)
Responds to the review of b06e4a4:
Cto any amount exists, which is what makes hiding perfect. The explainer now says Alice can't feasibly find a second opening.AuditorView.issuedNotes(). Transfer, cash-out and change notes are readable but not added. Fixed on the page and in the walkthrough.CarbonClaimProoflisting importsjava.util.List.ZkPedersenonly.ZkPedersenCommitmentis experimental, matchingzeroj-circuit-lib/README.md. Fixed in the guide, the status page and the gadget matrix.Private voting (d8632c0)
PrivateBallotProof, which compiles to 9,477 constraints with 9 public inputs.Poseidon(vote, nullifier)is readable by anyone, because the nullifier is public and a vote is 0 or 1, so an observer can hash both choices and compare. Adding a salt stops that, but then nobody can count the votes. Encrypting the ballot fixes both.Review and evidence
mainprogram on the new pages compiled and ran, with matching constraint counts; fragments were checked against the source signatures.eligible = 1requirement in the predicate example;t + 1decrypt, and2t + 1 ≤ nis the fault rule;Test plan
npm run check: 0 errors, 0 warnings, 0 hints;check-api-refsreports 128 Java blocks and no unknown APIs.npm run buildpluscheck-site: 62 HTML pages, 60 Markdown twins and 5 AI artifacts, with links, anchors and repository paths verified.🤖 Generated with Claude Code