Protocol Deep Dives

Zero-Knowledge Proofs: SNARKs vs. STARKs, Plonk & Arithmetic Circuits

By NorwegianSpark Editorial — written with AI assistance and reviewed by the NorwegianSpark SA editorial team | Last updated: 2026-04-02

A person working at a laptop with a phone in hand at a café table

This article contains affiliate links. We may earn a commission at no extra cost to you. Full disclosure

A foundational cryptographic journey through ZK theory: R1CS constraints, QAP formulation, polynomial commitment schemes (KZG vs FRI), and quantum resistance.

What is a Zero-Knowledge Proof? Completeness, Soundness & Zero-Knowledge Properties

A Zero-Knowledge Proof (ZKP)—first introduced by Shafi Goldwasser, Silvio Micali, and Charles Rackoff in 1985—is a cryptographic protocol between two parties: a Prover (P) and a Verifier (V). The prover aims to convince the verifier that a statement is mathematically true (or that they possess a secret witness w satisfying a public relation R(x,w)=1) without disclosing any auxiliary information about the witness w beyond the validity of the statement itself.

A cryptographic system is classified as a true Zero-Knowledge Proof if and only if it satisfies three rigorous mathematical properties:

  1. Completeness: If the statement is true and both the prover and verifier follow the protocol honestly, the verifier will always accept the proof (P(accept)=1).
  2. Soundness: If the statement is false, no cheating prover can convince an honest verifier that it is true, except with a negligibly small cryptographic probability ϵ (Soundness Error: P(acceptstatement false)ϵ).
  3. Zero-Knowledge: If the statement is true, the verifier learns nothing other than the fact that the statement is true. Formally, there exists a probabilistic polynomial-time Simulator (S) that can produce a transcript indistinguishable from a real interaction with the prover without having access to the secret witness w.

In modern Web3 applications, zero-knowledge proofs serve two distinct superpowers:

  • Privacy: Shielding user account balances, identities, and transaction amounts from public visibility (e.g., Tornado Cash, Zcash, Semaphore).
  • Succinct Scalability (Verifiable Computation): Proving that a massive off-chain computation involving thousands of complex transactions was executed correctly, condensing gigabytes of execution state into a tiny 300-byte proof that can be verified on Ethereum for a fixed minimal gas cost.

From Computation to Polynomials: The Compilation Pipeline (AST -> R1CS -> QAP)

Standard programming code (such as checking if a password hash matches or executing a token transfer loop) cannot be proven directly by zero-knowledge algorithms. The code must undergo a specialized cryptographic compilation pipeline that transforms high-level logic into an algebraic system of polynomial equations over a finite field Fp.

The standard compilation pipeline proceeds through four stages:

  1. Computation to Arithmetic Circuit:

High-level code is flattened into an directed acyclic graph (DAG) of basic arithmetic gates consisting exclusively of addition (+) and multiplication (×) operations over Fp. Non-linear logic (like Boolean conditionals and bit-shifts) are decomposed into polynomial equations (b(b1)=0 enforces that b{0,1}).

  1. Arithmetic Circuit to R1CS (Rank-1 Constraint System):

The circuit is expressed as a system of matrix constraints of the form:

(As)(Bs)=(Cs)

where s=[1,x1,,xm,w1,,wn]T is the complete witness vector containing all intermediate wire values, A,B,C are sparse matrices representing gate connections, and denotes the Hadamard (element-wise) vector product. Each row in the matrix system represents a single multiplication gate: (Lis)×(Ris)=Ois.

  1. R1CS to QAP (Quadratic Arithmetic Program):

Using Lagrange Polynomial Interpolation, the discrete matrix equations are encoded into continuous polynomials A(x),B(x),C(x). The prover demonstrates that the constraint holds across all evaluation points by showing that:

P(x)=A(x)B(x)C(x)=H(x)T(x)

where T(x)=i=1m(xi) is the public Target Polynomial with roots at every gate index, and H(x) is the quotient polynomial.

If the prover knows a valid witness, P(x) is perfectly divisible by T(x) with zero remainder. Checking polynomial equality at a single secret random challenge point s (via the Schwartz-Zippel Lemma) verifies the correctness of millions of arithmetic gates simultaneously.

SNARKs (zk-SNARKs): KZG Commitments, Groth16 & PlonK Universal Systems

zk-SNARK stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge:

  • Succinct: The proof size is tiny (typically 128 to 800 bytes) and can be verified in milliseconds.
  • Non-Interactive: The prover generates the proof in a single message without requiring back-and-forth interactive rounds with the verifier (via the Fiat-Shamir Heuristic).
  • Argument of Knowledge: Computationally sound under cryptographic hardness assumptions.

The evolution of zk-SNARK proving systems represents one of the most remarkable algorithmic advances in cryptography:

  1. Groth16 (2016):
  2. Uses bilinear pairings on elliptic curves (e.g., BN254 / alt_bn128).
  3. Produces the absolute smallest proofs (3 group elements, ~130 bytes) with hyper-fast on-chain verification (~200,000 gas on Ethereum).
  4. Major Drawback: Requires a Circuit-Specific Trusted Setup ceremony (Powers of Tau). If the smart contract circuit is modified by a single line of code, an entirely new multi-party trusted setup ceremony must be conducted.

  1. PlonK (Permutations over Lagrange-bases for Oecumenical Non-interactive arguments of Knowledge - 2019):
  2. Introduces Universal and Updatable Trusted Setup: A single global setup ceremony can be used for any arbitrary circuit up to a maximum degree bound.
  3. Uses Grand Product Permutation Arguments to enforce copy constraints between circuit wire inputs and outputs.
  4. Polynomial Commitments (KZG / Kate-Zaverucha-Goldberg): Commits to high-degree polynomials using a single elliptic curve point [P(τ)]1=pi[τi]1. The verifier uses elliptic curve bilinear pairings e(A,B)=e(C,D) to verify polynomial evaluations without revealing the underlying coefficients.

PlonK and its modern variants (Plonky2, HyperPlonk, Halo2) form the foundational backbone of modern zkEVMs and enterprise ZK scaling solutions.

STARKs (zk-STARKs): FRI Protocols, Hash-Based Security & Quantum Resistance

Invented by Eli Ben-Sasson et al. (the founders of StarkWare), zk-STARKs (Zero-Knowledge Scalable Transparent Argument of Knowledge) offer an alternative proving paradigm that eliminates the limitations of elliptic curve SNARKs.

The architectural hallmarks of STARKs:

  1. Transparent (No Trusted Setup):
  2. STARKs require zero multi-party trusted setup ceremonies. All randomness is generated transparently using public collision-resistant cryptographic hash functions (such as Keccak-256 or algebraic hashes like Rescue and Poseidon).

  1. Algebraic Intermediate Representation (AIR):
  2. Rather than R1CS circuits, STARKs express computations as Execution Traces (two-dimensional tables where each row represents a CPU state transition over time) governed by polynomial Transition Constraints and Boundary Constraints.

  1. FRI Protocol (Fast Reed-Solomon Interactive Oracle Proof of Proximity):
  2. To prove that the execution trace polynomial is low-degree without using elliptic curve pairings, STARKs utilize the FRI protocol.
  3. FRI uses iterative folding algorithms: the prover repeatedly folds a polynomial of degree d into a polynomial of degree d/2 using random challenge scalars, committing to the intermediate evaluations in Merkle Trees.
  4. After log2(d) rounds, the polynomial is reduced to a constant, proving low-degree proximity using Merkle inclusion authentication paths.

  1. Post-Quantum Cryptography:
  2. Because STARKs rely exclusively on symmetric hash functions and information-theoretic polynomial commitments (rather than the discrete logarithm or elliptic curve pairing problems that can be solved by Shor's algorithm on a quantum computer), STARKs are inherently Quantum-Resistant.

The tradeoff: STARK proofs are significantly larger than SNARK proofs (typically 40 KB to 100 KB compared to 300 bytes), resulting in higher L1 on-chain verification gas costs unless proofs are recursively aggregated into an outer SNARK wrapper before settlement.

Deep Comparison Matrix: SNARKs vs. STARKs vs. Bulletproofs

Selecting the optimal zero-knowledge proving system requires analyzing the strict tradeoffs across proof size, prover memory, verification complexity, and cryptographic assumptions.

Cryptographic MetricGroth16 SNARKPlonK (KZG)STARK (FRI)Bulletproofs
Proof Size~130 bytes (Smallest)~400 - 800 bytes~40 - 100 KB (Large)~1.5 - 2.5 KB
Verification TimeO(1) (~1-2 ms)O(1) (~3-5 ms)O(log2N) (~10-20 ms)O(N) (Linear, Slow)
Trusted SetupPer-Circuit SetupUniversal SetupNone (Transparent)None (Transparent)
Math PrimitivesBilinear PairingsBilinear PairingsHash Functions + FRIDiscrete Logarithm
Quantum ResistanceNo (Vulnerable)No (Vulnerable)Yes (Quantum-Safe)No (Vulnerable)
Prover ComplexityHigh (O(NlogN))MediumFast (Linear O(N))Very High
Primary Use CasesZcash, Tornado CashScroll, Linea, zkSyncStarknet, Polygon MidenMonero (Range Proofs)

Modern zero-knowledge architectures frequently employ Hybrid Recursive Proof Pipelines: a high-throughput STARK or Plonky2 prover generates fast proofs for millions of execution steps off-chain, and an outer Groth16/PlonK wrapper compresses the STARK proof into a single 300-byte SNARK for ultra-cheap verification on Ethereum Layer-1.

Modern ZK Engineering Frontiers: Folding Schemes, Nova & ZK Coprocessors

The cutting edge of zero-knowledge research is moving beyond traditional monolithic circuits toward Incremental Verifiable Computation (IVC) and ZK Coprocessing:

  1. Folding Schemes (Nova, SuperNova, HyperNova):
  2. Traditional recursion requires verifying a full SNARK verifier circuit inside another SNARK circuit, incurring massive arithmetic overhead.
  3. Nova introduced non-interactive folding: instead of proving each step, two R1CS instances are mathematically "folded" into a single relaxed R1CS instance of the same size using a simple random linear combination.
  4. The heavy cryptographic proof is generated only once at the very end of millions of execution steps, reducing prover memory and overhead by up to 100×.

  1. ZK Coprocessors (Axiom, Brevis, Herodotus):
  2. Smart contracts on Ethereum cannot access historical blockchain state (older than 256 blocks) without incurring astronomical gas costs.
  3. ZK Coprocessors allow smart contracts to query terabytes of historical L1/L2 data, execute complex quantitative calculations (such as calculating a user's 1-year average DeFi balance or credit score) off-chain, and return the verifiable cryptographic result with a SNARK validity proof directly into Solidity contract state in a single transaction.

## Frequently asked questions

Why do STARKs not require a trusted setup ceremony?

STARKs replace elliptic curve pairings with transparent collision-resistant hash functions and the FRI protocol, allowing all protocol randomness to be derived publicly via Fiat-Shamir without private toxic waste.

What is "toxic waste" in a ZK trusted setup?

Toxic waste refers to the secret random evaluation points (trapdoor values) generated during a multi-party setup. If malicious actors retain these values, they can forge false proofs that steal funds, though they cannot compromise privacy.

What is a ZK Coprocessor?

A ZK coprocessor allows smart contracts to trustlessly offload heavy historical data queries and complex computations to off-chain provers, verifying the final output on-chain with a succinct ZK proof.

Related reading

## Sources

No contributor to this article holds a professional cryptography or security credential. Every technical claim above is sourced to primary protocol documentation rather than to personal authority — follow the sources and verify anything you intend to act on.

Not financial advice. Crypto assets are volatile and can lose value. This article describes how protocols work, not what you should buy.

Content on AICryptoCoin is for informational purposes only and does not constitute financial advice. Always do your own research and consult a qualified financial advisor before making investment decisions.