One Fact, Not Your Whole ID: How Zero-Knowledge Proofs Keep Digital Identity Private

In short: Digital ID wallets let you share only part of your ID, but they can still reveal who issued it and let you be tracked. We built zk-pid, a zero-knowledge program that closes those two gaps on top of an existing credential format. Today it checks exact values, with range checks such as a minimum age to come.
A longer version has the detail.
From an ID card to selective disclosure
Let's start with a concrete situation. Jane is booking a rental car online. Many rental companies price by driver age, so at booking time, before anyone looks at a driving licence, the company needs to know one thing about her: is she at least 24, yes or no? The traditional way to prove this is to upload a scan of an ID card, and the company then sees her full name, exact birth date, nationality and document number. That is full disclosure: to prove one fact, you hand over everything.
Selective disclosure is the idea that Jane should be able to reveal only what the company needs. A digital ID wallet is built on that idea, with three roles: an issuer (a government agency or other authorised body) issues credentials; the wallet (held by the citizen) stores and presents them; and a verifier (a bank, an airport or an online platform) checks a presented credential.
One open internet standard for selective disclosure is SD-JWT (RFC 9901). Each fact about a person, such as a birth date, is an attribute (a claim). The issuer puts each attribute in its own sealed envelope, then signs a list with one fingerprint per envelope. A fingerprint (a hash) identifies an envelope without revealing what is inside. That signed list is the credential, and Jane's wallet keeps the envelopes alongside it. Each time Jane shows the credential (a presentation), she hands over the signed list and only the envelopes she chooses. The verifier checks each envelope against its fingerprint on the list. An attribute whose envelope was never handed over stays hidden. A short token signed by a key on Jane's own device (a KB-JWT) is sent alongside to prove that the person presenting the credential really holds it.

What selective disclosure still leaks
Selective disclosure is a real privacy improvement, but it isn't a full answer. Three things still leak to the verifier:
Every verifier sees the same signature. The issuer's signature is the same bytes every time the credential is presented. If Jane shows it to the rental company on Monday and to an online shop on Tuesday, they can compare notes and conclude it was the same person, even though the disclosed attributes differed.
The issuer's public key reveals who issued your ID. To check the signature, the verifier must see the issuer's public key, and those keys are published. That gives away Jane's country in a cross-border scheme, or, where several providers issue IDs, which one she uses, though she disclosed neither.
The full disclosed attribute value is shown. If the company asks for Jane's birth date, it gets her exact date of birth, not a "yes" for the threshold that mattered. Issuers do pre-compute a few common yes/no answers, such as an "age over 18" flag, but only for thresholds they anticipated.
What zk-pid proves
A zero-knowledge proof shows that a statement is true without revealing the data behind it. Here, the wallet proves that it holds some credential that makes a stated condition true, without revealing that credential. We followed TS13, a draft EU technical specification for layering such proofs on top of SD-JWT. zk-pid is a program written in Noir (a circuit) that proves three things from a single SD-JWT presentation: the credential is genuine and current, it belongs to the person presenting it, and it answers the verifier's question. In detail:
The credential was issued by a legitimate issuer.
The credential is currently valid.
The credential is bound to a specific device key.
The person presenting the credential controls that key, shown by a fresh signature made for this verifier.
A specific attribute matches the verifier's query, and it comes from an envelope whose fingerprint the issuer signed.
The issuer's own key is certified by a certificate authority (CA).
Put together, the verifier only learns: the CA's public key, the attribute name and value being queried, and the fact that everything else holds. Anything that stays constant across multiple presentations (the issuer key, the device key, the issuer's signature) has to stay private, or a verifier could link separate presentations together by that constant value alone.
Jane uses | The rental company sees |
A scan of her ID | Everything on the card |
Selective disclosure | Her exact birth date, who issued her ID, and the same signature every verifier sees |
zk-pid | Only the attribute it asked about, with the issuer and signature hidden |
Where this leaves things
zk-pid is a reference implementation, not a finished product. Today the attribute check is an equality: the disclosed value must match the expected value the verifier supplies, so that value is still shown in full. Range checks, such as Jane's "at least 24", aren't implemented yet, but they're a natural extension, and they are what closes the third leak.
But the design does what we set out for it to do: it shows that adding a genuine zero-knowledge layer on top of an existing, standardised credential format is practical, and it already hides the issuer and anything linkable. These leaks aren't unique to the EU: any credential signed this way has them.
For anyone designing or buying a digital ID scheme, the privacy requirements shouldn't stop at selective disclosure. A verifier can still learn who issued Jane's ID and recognise her the next time she shows it, unless a zero-knowledge layer hides both.
Building with digital credentials? FortID, TBTL's EUDI credential platform, lets you issue, hold and verify them. We also help teams redesign their systems around zero-knowledge proofs, using Noir. Get in touch.
