Choose how to disclose
Selective disclosure means showing each party exactly what it needs and nothing more. A landlord needs to know you earn enough, not your payslip. A tax authority needs every salary, but the public needs none. An election needs the total, and nobody should see a single ballot.
ZeroJ gives you six tools for this. They differ in who learns what, what they need (an issuer, a circuit, a key) and how mature they are. This page compares them on one example. Each option has its own page with simple code and real use cases.
One salary, six ways
Section titled “One salary, six ways”Carol earns 5,000 a month. Pick an option to see what Carol, a landlord, the tax authority and everyone else learn. Not sure where to start? Press Help me choose.
Does anyone need to learn the exact value?
Does the value also need to live on-chain, to be added up or checked again later?
Who should learn it?
The employer signs a credential once. Carol shows the landlord only the salary line and hides the rest, and the landlord checks the employer signed it.
- Needs
- An issuer with a BBS key. No circuit, no trusted setup.
- On Cardano
- BbsProofVerify, one fixed credential shape
- Maturity
- Beta (IRTF draft)
Which one do I need?
Section titled “Which one do I need?”Start from the question “does anyone need the exact value?”
| You need… | Use | Needs | Maturity |
|---|---|---|---|
| The verifier to see some signed attributes exactly (“country = NZ”) and nothing else | Reveal the value with BBS | An issuer; no circuit, no trusted setup | Beta (IRTF draft) |
| A yes/no answer about private data (“over 21”, “income ≥ 50,000”) | Prove a rule with a Groth16 predicate | A circuit and a trusted setup | Beta |
| A number kept sealed on-chain that can be checked, added up or opened later | Hide a number with a Pedersen commitment | A circuit for each statement | Ready (pending external review) in-circuit; sums experimental |
| Named parties (the owner, an auditor) to read the value from the chain | Tell chosen readers with a confidential note | A viewing key per reader | Experimental |
| An authority to read it, with no way for the sender to lie | Encrypt for an auditor with ElGamal plus a proof | An auditor key and a circuit | Experimental |
| No single party to see individual values; a quorum decrypts only the agreed result (a policy, not a guarantee) | Split the trust with threshold ElGamal | A key-generation ceremony among trustees | Experimental |
Two quick rules of thumb:
- BBS reveals, circuits compute. If the verifier only needs a fact about a value, don’t reveal the value: prove the fact.
- Commitments are for the owner, encryption is for someone else. Only the person holding the opening (the value and its random blinding) can open a commitment. If a third party must read the value without the owner’s help, encrypt it to them.
They combine
Section titled “They combine”Real applications use several options at once:
- Confidential payroll hides each salary in a commitment, delivers it to the employee and the tax authority, and encrypts it to the tax authority with a proof so the employer can’t under-report. (use case)
- A private vote encrypts each ballot to a key shared by trustees, proves each ballot is a 0 or a 1, and decrypts only the total. The demo needs all three trustees (n-of-n); threshold key generation is the t-of-n upgrade. (use case)
- KYC could reveal a country with BBS and prove an age rule with a small circuit; the two demos show each half. (use case)
What disclosure doesn’t cover
Section titled “What disclosure doesn’t cover”Choosing what to reveal is half the job. Every option above also needs the usual application checks:
- Replay. A presentation or proof can be copied. Bind it to a fresh challenge or to the UTxO being spent.
- Authorization. A valid proof says nothing about who may spend or receive funds.
- Metadata. Transaction graphs, timing and fees can reveal more than the data you hid.
See Application security.
The options
Section titled “The options”New to the underlying ideas? Read Commitments & encryption, explained.