While pairing-based zk-SNARKs achieved miraculous proof sizes, they carry two profound theoretical vulnerabilities: they rely on toxic-waste Trusted Setups, and their elliptic curve hardness breaks completely under Shor’s quantum algorithm. In 2018, Eli Ben-Sasson, Iddo Bentov, Yinon Horesh, and Michael Riabzev published zk-STARKs (Zero-Knowledge Scalable Transparent ARguments of Knowledge): eliminating trusted setups entirely (Transparent), providing post-quantum security, and verifying computations through symmetric cryptographic hashing and the FRI protocol.
1. Algebraic Intermediate Representation (AIR)
zk-STARKs model computation as an Algebraic Intermediate Representation (AIR): an execution trace grid of (T) rows (time steps) and (W) columns (state registers) over a prime field (mathbb{F}_p). The trace must satisfy two polynomial constraint categories:
- Boundary Constraints: Enforce input and output values at specific rows: (P(0) = ext{input}, P(T-1) = ext{output}).
- Transition Constraints: Relate adjacent time steps: (C(T(X), T(g cdot X)) = 0), enforcing that every machine cycle transitions according to valid algebraic logic across all rows (X in mathbb{H}).
The prover combines these constraints into a single Master Composition Polynomial (CP(X) = rac{C(T(X), T(gX))}{Z_{mathbb{H}}(X)}). If the execution trace is honest, (CP(X)) is a low-degree polynomial; if a single calculation was forged, (CP(X)) has degree proportional to (p), destroying low-degree proximity.
2. The Fast Reed-Solomon IOP of Proximity (FRI)
How does a verifier test that a committed function (f: mathcal{D} o mathbb{F}_p) evaluated over domain (mathcal{D}) (where (|mathcal{D}| = 8 cdot ext{deg})) is close to a true Reed-Solomon codeword (a polynomial of degree (< d)) in sub-linear time? zk-STARKs employ the FRI Protocol.
FRI operates analogously to the Fast Fourier Transform (FFT) in reverse: repeatedly halving the degree of the polynomial via randomized folding.
- At round (i), let domain (mathcal{D}_i) have size (N_i). Prover splits polynomial (f_i(X)) into even and odd powers:
[
f_i(X) = g_i(X^2) + X cdot h_i(X^2)
] - Verifier sends random challenge (alpha_i leftarrow mathbb{F}_p).
- Prover constructs the folded polynomial of half the degree over squared domain (mathcal{D}_{i+1} = {x^2 mid x in mathcal{D}_i}):
[
f_{i+1}(Y) = g_i(Y) + alpha_i cdot h_i(Y) = rac{f_i(x) + f_i(-x)}{2} + alpha_i rac{f_i(x) – f_i(-x)}{2x}
] - The prover commits to the evaluations of (f_{i+1}) using a standard Merkle tree.
After (log_2 d) rounds, the polynomial is reduced to a constant degree (e.g., degree 0), which can be transmitted and verified directly. In the Query Phase, the verifier samples paths through the Merkle trees to verify that each folding was computed honestly.
3. Post-Quantum Security & Practical Trade-Offs
Because STARKs rely exclusively on symmetric hash functions (e.g., Blake2s, Keccak, or arithmetic-friendly Rescue/Poseidon) and Merkle trees, they require zero elliptic curves, zero pairings, and zero trusted setups. Their security bounds are proven against quantum adversaries under the collision resistance of the hash function.
The engineering trade-off is proof size: while Groth16 proofs are 128 bytes, STARK proofs contain thousands of Merkle authentication paths, resulting in proof sizes of 40 to 150 Kilobytes. However, STARK prover time scales strictly quasi-linearly (mathcal{O}(N log N)) with negligible memory overhead, making them ideal for massive layer-2 validity rollups (Starknet, Polygon Miden).