How to Build a ZK-Powered Medical Credential System
A ZK-powered medical credential system lets a hospital check a licence without seeing the full record. Here are the parts, the build steps and the privacy rules.
On this page
Short answer
A ZK-powered medical credential system lets a hospital check a doctor's licence, degree or privilege with a zero-knowledge proof, which confirms the credential is valid without revealing the record behind it. The issuer signs the credential, the holder keeps it in a wallet, and the verifier checks a proof against public data.
What is a ZK-powered medical credential system?
A ZK-powered medical credential system is a way to check a doctor's licence, degree or hospital privilege without seeing the full record behind it. A zero-knowledge proof is a cryptographic method that lets one party prove a statement is true without revealing the information the statement is about.
In practice, a hospital asks a simple question, such as whether a doctor holds a valid licence, and the doctor's wallet answers with a proof instead of a copy of the licence. The verifier checks the proof against a public record and learns only that the answer is yes, not the doctor's name, number or history.
The system is built for a real problem: medical credential checks are slow, repeated at every hospital, and they pass copies of sensitive documents between offices. A proof-based check can be faster, and it leaves no copy of the record behind to leak later.
How does a zero-knowledge proof check a credential?
A zero-knowledge proof check has three roles and one public record. The issuer signs the credential, the holder keeps it in a wallet, and the verifier checks a proof that the credential is genuine and still valid.
| Role | What it does | What it sees |
|---|---|---|
| Issuer | Signs the credential, publishes revocations | The full credential |
| Holder | Stores the credential, builds the proof | Everything, in their own wallet |
| Verifier | Checks the proof against public data | Only the yes or no answer |
| Registry | Holds hashes and revocation status | Hashes, never the records |
The proof is built by a circuit, a small program that takes the credential as a private input and the public record as a public input. The circuit checks the signature, the expiry date and the revocation list, then outputs a proof that all three checks passed. The verifier runs the same check on the proof, and the credential itself never leaves the holder's device.
Working examples already exist. Aleo's zPass lets a person prove they meet a requirement, such as a vaccination record, without handing over the record, and the proof is checked by validator nodes on the Aleo chain. A guide to zero-knowledge proof use cases covers credentials as one of the main places this pattern fits.
Which medical credentials can it verify?
A ZK-powered system can verify any credential that has a trusted issuer and a clear yes-or-no question. Medical licences are the first fit, because a hospital only needs to know that the licence is valid and current, not the doctor's full registration history.
Board certifications, university degrees and specialist qualifications work the same way, as do hospital privileges, which say what a doctor is allowed to do inside one hospital. Vaccination status is another fit, because a school or employer only needs to know the requirement is met, not which vaccine was given or when.
Some checks do not fit. A proof can confirm that a licence is valid, but it cannot confirm that a doctor is a good fit for a team, and it cannot replace a reference or an interview. The system answers factual questions about documents, and nothing else.
What are the parts of the system?
A working system has five parts, and each one can be built or bought separately. The issuer service signs credentials, the holder wallet stores them, the circuit builds proofs, the verifier checks them, and the registry holds the public data that proofs are checked against.
| Part | Job | Example technology |
|---|---|---|
| Issuer service | Signs credentials, publishes revocations | W3C Verifiable Credentials |
| Holder wallet | Stores credentials, builds proofs | Mobile wallet app |
| Circuit | Turns a credential into a proof | Circom, SnarkJS |
| Verifier | Checks proofs, returns yes or no | Smart contract or server |
| Registry | Holds hashes and revocation status | Public blockchain |
The credential format matters most. W3C Verifiable Credentials give the issuer, the holder and the verifier a shared format, so a credential signed by one hospital can be checked by another without custom code.
For hospital systems, the credential data should map to HL7 FHIR, the common format for exchanging health records, so the issuer can pull the facts from systems the hospital already runs. A guide to what zero-knowledge proofs are explains the cryptography behind the proof layer.
How do you build it in 7 steps?
You build a ZK-powered medical credential system by fixing the credential format first, then the proof, then the checks around it.
- Choose the credentials. Pick one type, such as a medical licence, and agree what the verifier needs to learn.
- Fix the format. Use W3C Verifiable Credentials and decentralised identifiers, so issuers and verifiers share the same shape.
- Set up the issuer. Give the licensing body a signing key and a way to publish revocations.
- Build the wallet. Let holders store credentials, choose what to disclose, and build proofs on their own device.
- Write the circuit. Use Circom to define the checks, and SnarkJS to generate and verify Groth16 proofs.
- Build the verifier. Use a smart contract or a server that checks the proof and returns a yes or no.
- Test with real issuers. Run a pilot with one hospital and one licensing body before adding more.
Do not start with the circuit. The format and the issuer workflow decide whether the system works in practice, and a circuit built before those are settled will need to be rewritten. A guide to zero-knowledge proofs in smart contracts covers the verifier side in more depth.
How do you handle health-data rules and privacy?
You handle health-data rules by keeping personal health data off the chain entirely. The registry holds only hashes and revocation status, while the credential itself stays in the holder's wallet. A hash cannot be reversed into a record, so a breach of the registry reveals nothing about any person.
Selective disclosure is the second rule. The holder chooses which claim to prove, and the proof reveals only that claim. A hospital checking a licence should not learn the doctor's address, and a school checking vaccination status should not learn the doctor's full medical history.
Revocation must work even when the holder is offline. The issuer publishes a revocation list that the verifier checks as part of the proof, so a suspended licence fails the check even if the holder still carries the old credential. Research systems such as Health-zkIDM, published in the journal Sensors in 2022, used this pattern with Hyperledger Fabric and zk-SNARK proofs to check healthcare identities without putting personal data on the chain.
Example (hypothetical): a hospital checks 200 locum doctors
Example (hypothetical): a hospital hires 200 locum doctors for a busy quarter. A manual check takes 3 hours per doctor, because staff must call the licensing body, wait for a reply, and file the documents, so 200 doctors need 600 hours of staff time.
With a ZK-powered check, each doctor builds a proof in their wallet and the hospital verifies it in about 10 minutes, including the revocation check. That is 200 x 10 minutes = 2,000 minutes, or about 33 hours, so the hospital saves about 567 hours of staff time across the quarter.
The saving only holds if the licensing body issues credentials in the agreed format. If half the doctors arrive with paper licences, the hospital still pays the manual cost for those, and the saving falls to about half. The pilot should measure how many doctors arrive with a usable credential before promising a saving.
What are the common mistakes?
The most common mistakes in a ZK medical credential system are putting personal data on chain, building the circuit before the format is settled, and treating a proof as a substitute for judgement.
- Storing credential details on chain. They cannot be deleted, and anyone can read them.
- Choosing a proof system before agreeing the credential format with issuers. The circuit will need to be rewritten.
- Assuming a valid licence means a good hire. A proof cannot replace a reference or an interview.
- Forgetting revocation. A suspended licence still passes the check if the verifier never looks at the revocation list.
- Making the wallet hard to use. Doctors fall back to sending paper copies, and the system is bypassed.
Key takeaways
- A ZK-powered credential system checks a licence or degree with a proof, not a copy of the record
- The issuer signs the credential, the holder keeps it in a wallet, and the verifier learns only a yes or no
- Personal data stays off the chain: the registry holds only hashes and revocation status
- W3C Verifiable Credentials give issuers and verifiers a shared format, and Circom and SnarkJS build the proofs
- Revocation must be checked with every proof, or a suspended licence will still pass
Frequently asked questions
What is a zero-knowledge proof in plain terms?
A zero-knowledge proof is a way to prove a statement is true without revealing the information behind it. For example, a doctor can prove they hold a valid licence without showing the licence number, the issuing body or their full registration history. The verifier checks the proof, not the record.
Does the hospital see the doctor's full licence?
No. The hospital sees only the answer to the question it asked, such as whether the licence is valid and current. The full credential stays in the doctor's wallet, and the proof is built on the doctor's own device. The hospital never receives a copy of the record.
What happens if a licence is suspended?
The issuer publishes a revocation list, and the verifier checks it as part of the proof. A suspended licence fails the check even if the holder still carries the old credential, because the proof cannot be built against a revoked entry. Revocation must work even when the holder is offline.
Which tools build ZK circuits?
Circom is a common language for writing the circuit that defines the checks, and SnarkJS generates and verifies the proofs, usually with the Groth16 scheme. The circuit takes the credential as a private input and public data as a public input, then outputs a proof that the checks passed.
Is a ZK credential system legal for health data?
The design helps with health-data rules because personal data stays off the chain: the registry holds only hashes and revocation status, and the credential stays in the holder's wallet. Even so, a real deployment needs a legal review for the rules that apply where it operates, since health-data law varies by country.
Can the same system check degrees and board certifications?
Yes. Any credential with a trusted issuer and a clear yes-or-no question works the same way, including university degrees, board certifications and hospital privileges. The circuit changes only in which fields it checks, while the issuer, wallet and verifier stay the same.