Advanced Technology · 🕑 20 min read PRO

Zero-Knowledge Proofs: The Math Behind Privacy and Scaling

zkSNARKs, zkSTARKs, and how zero-knowledge cryptography enables you to prove something is true without revealing why it is true and why this property is reshaping both blockchain scaling and financial privacy.

The Core Concept

A zero-knowledge proof allows one party (the prover) to convince another party (the verifier) that a statement is true, without revealing any information beyond the fact that the statement is true.

The classic illustration: imagine you want to prove to a colorblind friend that two balls are different colors, without telling them which is which. You hand them the balls. They put both hands behind their back and either swap or do not swap. They show you the balls. You correctly identify whether they swapped every time, for 20 rounds. The probability of guessing correctly by chance is 1 in 2^20 (roughly 1 in a million). You have proven the balls are different colors without revealing what those colors are.

The Core Concept

A zero-knowledge proof allows one party (the prover) to convince another party (the verifier) that a statement is true, without revealing any information beyond the fact that the statement is true.

The classic illustration: imagine you want to prove to a colorblind friend that two balls are different colors, without telling them which is which. You hand them the balls. They put both hands behind their back and either swap or do not swap. They show you the balls. You correctly identify whether they swapped every time, for 20 rounds. The probability of guessing correctly by chance is 1 in 2^20 (roughly 1 in a million). You have proven the balls are different colors without revealing what those colors are.

Three Properties of a Valid ZK Proof

Completeness: If the statement is true, an honest prover can always convince the verifier.

Soundness: If the statement is false, no cheating prover can convince the verifier (except with negligible probability).

Zero-knowledge: The verifier learns nothing about the statement beyond its truth value.

zkSNARKs

zkSNARK stands for Zero-Knowledge Succinct Non-interactive Argument of Knowledge. The critical properties:

Succinct: the proof is small and fast to verify, regardless of the complexity of the underlying computation. A proof verifying 10,000 transactions might be just a few hundred bytes.

Non-interactive: the prover sends a single message to the verifier. No back-and-forth required. This is essential for blockchain applications where you need to post a proof to a smart contract.

The tradeoff: zkSNARKs require a trusted setup ceremony. A set of parameters must be generated, and if the original randomness used is ever revealed, the system could be compromised. Many projects have moved to eliminate this requirement through multi-party computation ceremonies.

zkSTARKs

zkSTARK (Scalable Transparent Argument of Knowledge) removes the trusted setup requirement entirely. The proof relies only on hash functions and publicly verifiable randomness. This is a significant security improvement.

Tradeoff: STARK proofs are larger than SNARK proofs. For on-chain verification where every byte costs gas, this matters. The field is actively working to compress STARK proof sizes.

Applications in Blockchain

Scaling: ZK-rollups use SNARKs or STARKs to prove that thousands of transactions are valid without re-executing them on Ethereum. The proof is verified by an Ethereum smart contract in a single operation.

Privacy: Zcash uses zkSNARKs to let users prove a transaction is valid (inputs equal outputs, no double spend) without revealing sender, receiver, or amount. The math confirms everything is correct with zero information disclosed.

Identity: ZK proofs can prove you are over 18, are a citizen of a particular country, or have a minimum credit score without revealing your age, nationality, or exact score. This is one of the most significant near-term applications outside finance.

Key Takeaways

  • ZK proofs let you prove a statement is true without revealing why
  • Three properties: completeness, soundness, zero-knowledge
  • SNARKs are small and fast to verify but require a trusted setup
  • STARKs eliminate the trusted setup but produce larger proofs
  • Applications span scaling (ZK-rollups), privacy (Zcash), and identity verification
🔒
This is a Pro Lesson
Upgrade to Pro to access all advanced lessons, the full PLR library, and new content added monthly.
All advanced lessons unlocked
PLR Library — crypto books, audio series & educational guides
New lessons and resources added monthly
Quiz score tracking & progress
10% discount in the shop
$7/month
Cancel anytime — no contracts
Go Pro →
← Back to all lessons
Scroll to Top