Skip to content

Choose how to disclose

View Markdown

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.

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.

One salary, six ways · Carol earns 5,000 a month

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.

Carolthe employee
SEES ITholds the signed credential (salary 5,000, name, role, …)
Landlordasks "earns at least 3,000?"
SEES ITsalary = 5,000, signed by the employer
Tax authorityan auditor
NOTHINGnot involved
Everyone elsethe public chain
NOTHINGnothing; revealed values become public only if the presentation goes on-chain
Needs
An issuer with a BBS key. No circuit, no trusted setup.
On Cardano
BbsProofVerify, one fixed credential shape
Maturity
Beta (IRTF draft)
How to use it
SEES IT learns the salaryPROVEN learns only a checked factSEALED sees a commitment or ciphertext

Start from the question “does anyone need the exact value?”

You need…UseNeedsMaturity
The verifier to see some signed attributes exactly (“country = NZ”) and nothing elseReveal the value with BBSAn issuer; no circuit, no trusted setupBeta (IRTF draft)
A yes/no answer about private data (“over 21”, “income ≥ 50,000”)Prove a rule with a Groth16 predicateA circuit and a trusted setupBeta
A number kept sealed on-chain that can be checked, added up or opened laterHide a number with a Pedersen commitmentA circuit for each statementReady (pending external review) in-circuit; sums experimental
Named parties (the owner, an auditor) to read the value from the chainTell chosen readers with a confidential noteA viewing key per readerExperimental
An authority to read it, with no way for the sender to lieEncrypt for an auditor with ElGamal plus a proofAn auditor key and a circuitExperimental
No single party to see individual values; a quorum decrypts only the agreed result (a policy, not a guarantee)Split the trust with threshold ElGamalA key-generation ceremony among trusteesExperimental

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.

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)

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.

New to the underlying ideas? Read Commitments & encryption, explained.