BenchmarksStack Ranking
APIsPricingDocsWhite PaperTokenBlogAboutSecurity Demo
Log InGet API Key
Zero-Knowledge · 5 min read

Zero-Knowledge Voting:
Private and Verifiable Elections

How ZK proofs enable private voting while maintaining election integrity.

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

Voting systems face a fundamental challenge: ballots must be secret, but elections must be verifiable. ZK proofs solve this paradox, enabling elections that are simultaneously private and transparent.

Voting System Requirements

Secure elections need:

These requirements often conflict -- traditional paper ballots offer privacy but limited verifiability, while open ledger systems provide transparency at the cost of anonymity. Government election bodies increasingly recognize this tension. ZK proofs reconcile them by allowing a prover to convince a verifier of a statement's truth without revealing any underlying data.

ZK Voting Architecture

Vote Flow

1. Voter proves eligibility without revealing identity
2. Vote encrypted and submitted
3. ZK proof ensures vote is valid
4. Tally computed without decrypting individual votes
5. ZK proof of correct tally published

Each step in this pipeline produces a cryptographic proof that can be independently verified by any observer. The system never requires trust in a single authority -- anyone with the public verification key can confirm that the election was conducted honestly.

Proving Eligibility

Voters prove they're eligible without revealing who they are. The key mechanism is a nullifier: a deterministic hash derived from the voter's credential and the election ID. Because the nullifier is unique per voter per election, the system detects double-voting without ever learning the voter's identity.

// Eligibility proof
const eligibilityProof = await zkVote.proveEligibility({
  credential: voterCredential,  // Private
  electionId: currentElection,   // Public
  nullifier: generateNullifier() // Prevents double voting
});

// Proof shows:
// - Voter has valid credential from registrar
// - Voter hasn't voted in this election
// - No linkage to voter identity

Under the hood, the registrar commits voter credentials into a Merkle tree. The ZK proof demonstrates membership in that tree -- a classic Merkle inclusion proof -- without revealing the leaf index or credential value. The nullifier is published to a public set, so any duplicate submission is rejected before tallying begins.

Vote Validity

Beyond eligibility, the system must ensure that every ballot is well-formed. A malicious voter might try to submit an encrypted value that selects two candidates, or encode a negative vote to subtract from an opponent's total. Range proofs embedded in the ZK circuit prevent both attacks.

// Vote validity proof
const voteProof = await zkVote.proveValidVote({
  encryptedVote: myEncryptedVote,
  electionParameters: {
    candidates: ['Alice', 'Bob', 'Carol'],
    maxSelections: 1
  }
});

// Proves:
// - Vote selects exactly one candidate
// - Vote is correctly encrypted
// - No information about which candidate

Verifiable Tallying

Count votes without decrypting:

This is where fully homomorphic encryption (FHE) becomes essential. H33's BFV scheme processes encrypted ballots at production scale -- the same engine that sustains 2,172,518 authentications per second on Graviton4 hardware can batch-tally thousands of encrypted votes in a single operation. Each encrypted ballot is an FHE ciphertext; the tallying authority computes the homomorphic sum across all ciphertexts, then performs a single threshold decryption to reveal only the final totals.

Why FHE + ZKP Together

FHE keeps individual votes encrypted during tallying. ZK proofs guarantee the tally was computed correctly. Neither primitive alone is sufficient -- FHE without ZKP leaves the decryption step unverifiable, and ZKP without FHE requires revealing votes to compute the sum.

Voter Verification

Each voter can verify their vote was included:

This property is called individual verifiability. Combined with universal verifiability -- anyone can check the published ZK proof of correct tallying -- the system achieves end-to-end verifiability without relying on trusted observers or exit polls.

Preventing Coercion

ZK voting can include anti-coercion features:

This technique, originally proposed in the JCJ (Juels-Catalano-Jakobsson) protocol, leverages ZK proofs at every layer. The re-voting mechanism works because the tallying authority can identify and discard superseded ballots using encrypted credential comparisons -- again, without learning which voter re-voted or how.

Performance at Scale

The primary criticism of ZK voting has always been computational cost. Generating a SNARK proof per voter is expensive, and tallying under FHE adds latency that paper counting avoids. Recent advances have changed the equation dramatically.

OperationLatencyNotes
ZKP proof verify (SHA3-256)0.085 µsDashMap in-process lookup
FHE ballot encrypt (BFV)~35 µsSingle ciphertext, N=4096
Full auth pipeline (32-user batch)~1,109 µsFHE + ZKP + Dilithium attestation
Per-voter cost~42 µsAmortized across batch

At ~42 microseconds per voter, a single H33 node can process over 1.5 million voter verifications per second. A national election with 150 million ballots could be cryptographically verified in under two minutes of wall-clock compute time. Post-quantum security comes at no additional cost -- H33's pipeline uses Dilithium (ML-DSA) signatures for attestation and lattice-based FHE throughout, ensuring the entire voting stack resists quantum attacks.

Implementation Challenges

Real Deployments

ZK voting is being deployed:

ZK voting achieves what was previously thought impossible: elections that are private, verifiable, and resistant to fraud -- all simultaneously. As FHE performance reaches millions of operations per second and post-quantum signatures become standard, the remaining barriers are political and logistical, not cryptographic.

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