Skip to main content

Zero-Knowledge Proofs (ZKP)

Zero-Knowledge Proofs enable you to prove a statement is true without revealing any information beyond the validity of the statement itself. In the context of SSI, ZKPs allow you to prove claims about your credentials without disclosing the actual data.

What is a Zero-Knowledge Proof?

A Zero-Knowledge Proof is a cryptographic method where one party (the prover) can prove to another party (the verifier) that a statement is true, without revealing any information beyond the truth of that statement.
Example: Prove you’re over 21 years old without revealing your exact birthdate, or prove you’re a citizen without showing your passport number.

How ZKP Works

ZKP Properties

A valid zero-knowledge proof must have three properties:

Completeness

If the statement is true, an honest prover can convince an honest verifier

Soundness

If the statement is false, no dishonest prover can convince the verifier (except with negligible probability)

Zero-Knowledge

The verifier learns nothing except that the statement is true

Real-World Examples

Age Verification

Traditional Approach:
❌ Reveals unnecessary personal information Zero-Knowledge Approach:
✅ Proves age without revealing birthdate

Income Verification

Scenario: Loan application requires proof of income over $50,000 Traditional:
Zero-Knowledge:

Citizenship Proof

Scenario: Access to service requires EU citizenship Traditional: Show passport (reveals name, birthdate, passport number, photo) Zero-Knowledge: Prove “I am an EU citizen” without showing passport details

Types of ZKP

Prove a value falls within a range without revealing the exact value.Example: Prove age is between 18-65 without showing exact age
Prove you belong to a set without revealing which member you are.Example: Prove you’re an employee of approved companies without saying which one
Prove two values are equal without revealing the values.Example: Prove your name in two different credentials is the same
Prove the result of a computation without revealing inputs.Example: Prove average salary of a group without revealing individual salaries

ZKP in Sphyre

Sphyre implements ZKP for selective disclosure and privacy-preserving verification:

Implementation

Use Cases in Sphyre

Age Verification

Prove you meet age requirements without revealing exact birthdate

Income Verification

Prove income threshold without disclosing exact salary

Location Proof

Prove residency in a region without revealing exact address

Qualification Proof

Prove you meet educational requirements without showing full transcript

Credit Score Range

Prove credit score is above threshold without exact number

Access Control

Prove membership in authorized group without identifying yourself

ZKP Workflow in Sphyre

1

Verifier Creates Request

Verifier specifies what they want to prove
2

User Receives Request

Request appears in Sphyre ALV wallet
3

User Selects Credential

Choose which credential to use for the proof
4

Generate ZKP

Wallet generates proof using credential data
5

Submit Proof

Send proof to verifier (no raw data included)
6

Verifier Validates

Verifier cryptographically validates the proof

Advanced ZKP Techniques

zk-SNARKs

Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge

Succinct

Proofs are very small (hundreds of bytes)

Non-Interactive

No back-and-forth needed between prover and verifier

Fast Verification

Verification is extremely quick

Privacy-Preserving

Complete privacy for the prover
Use Cases:
  • Complex credential combinations
  • Multiple claim verification
  • Blockchain scalability

zk-STARKs

Zero-Knowledge Scalable Transparent Arguments of Knowledge Advantages:
  • No trusted setup required
  • Quantum-resistant
  • Transparent and auditable
Trade-offs:
  • Larger proof sizes than SNARKs
  • Slower proof generation

Credential Predicates

Predicates define conditions that can be proven with ZKP:

Privacy Levels

Different scenarios require different privacy levels:
When: High trust relationship, legal requirement
Privacy: ⭐ (Low)

Implementation Example

Complete Age Verification Flow

Security Considerations

Risk: Reusing the same proof multiple timesMitigation: Include unique challenges and timestamps
Risk: Correlating proofs to track usersMitigation: Use different credentials or randomized proofs
Risk: Leaking information through timing or resourcesMitigation: Constant-time operations, noise injection
Risk: Proving claims from revoked credentialsMitigation: Include non-revocation proofs

Performance Considerations

Comparison: Traditional vs ZKP

ZKP Libraries & Tools

Sphyre uses and recommends these ZKP libraries:

circom

Circuit compiler for zk-SNARKscircom documentation

snarkjs

JavaScript library for zk-SNARKssnarkjs on GitHub

ZoKrates

High-level language for ZKPZoKrates documentation

libsnark

C++ library for zk-SNARKslibsnark on GitHub

Future of ZKP in Sphyre

1

Enhanced Privacy

More granular ZKP options for complex predicates
2

Performance Optimization

Faster proof generation using optimized circuits
3

Recursive Proofs

Combine multiple proofs into a single compact proof
4

Universal Composability

Standard ZKP format across all SSI systems

Common Use Cases

KYC Compliance

Prove identity verification without revealing PII

Financial Services

Prove creditworthiness without exposing financial details

Healthcare

Prove insurance coverage without sharing medical history

Education

Prove qualifications without full transcript

Employment

Prove work authorization without visa details

Voting

Prove eligibility without revealing identity

Resources

ZKProof Standards

Community-driven ZKP standardization

Zero Knowledge Podcast

Learn about ZKP developments

Awesome ZKP

Curated list of ZKP resources

ZKP Course

Learn ZKP fundamentals

Next Steps

1

Try ZKP in Sphyre

Use ZKP for age verification in the quickstart guide
2

Explore Wallet Features

Learn about Sphyre ALV ZKP capabilities
3

Developer Integration

Implement ZKP in your app with our API guide
4

Verifier Integration