Zero-Knowledge · 6 min read

ZK Age Verification:
Proving You're Over 18 Without Sharing Your Birthday

Implementing privacy-preserving age verification using zero-knowledge proofs.

67ns
Proof Verify
SHA3-256
Hash
PQ
Secure
Zero
Knowledge Leaked

Age verification is required for many services—alcohol, gambling, adult content. Traditional methods expose birthdates unnecessarily. ZK proofs enable proving "I am over X" without revealing when you were born.

The Problem with Current Age Verification

We need to verify age without collecting age.

ZK Age Verification Design

The circuit proves a simple predicate:

The Proof Statement

"I possess a valid credential containing a birthdate, and today's date minus that birthdate is greater than or equal to the required age."

// Simplified age verification circuit
template AgeVerification() {
  signal private input birthYear;
  signal private input birthMonth;
  signal private input birthDay;
  signal private input credentialSignature;

  signal input currentYear;
  signal input currentMonth;
  signal input currentDay;
  signal input minimumAge;

  signal output isOldEnough;

  // Verify credential signature (not shown)
  // Calculate age from dates
  // Compare to minimum
  // Output 1 if old enough, 0 otherwise
}

Implementation Architecture

  1. Credential Setup: User obtains signed credential with birthdate
  2. Proof Request: Service requests age proof with minimum age
  3. Proof Generation: User generates ZK proof on device
  4. Verification: Service verifies proof, learns only pass/fail

Security Considerations

Credential Security

Proof Freshness

Performance

ZK age verification is fast:

This is practical for real-time verification.

Integration Example

// Client-side proof generation
const proof = await h33.zk.proveAge({
  credential: storedCredential,
  minimumAge: 21,
  verifierNonce: serviceProvidedNonce
});

// Server-side verification
const valid = await h33.zk.verifyAge(proof, {
  minimumAge: 21,
  nonce: serviceProvidedNonce
});

if (valid) {
  // Grant access - age confirmed, birthdate unknown
}

Regulatory Landscape

Regulations are evolving toward privacy-preserving verification:

ZK age verification protects user privacy while meeting regulatory requirements. It's the future of age-gated services.

Ready to Go Quantum-Secure?

Start protecting your users with post-quantum authentication today. 1,000 free auths, no credit card required.

Get Free API Key →

Build With Post-Quantum Security

Enterprise-grade FHE, ZKP, and post-quantum cryptography. One API call. Sub-millisecond latency.

Get Free API Key → Read the Docs
Free tier · 10,000 API calls/month · No credit card required
Verify It Yourself