Finite Fields (Galois Fields)
ZKP arithmetic operates over large prime fields $\mathbb{F}_p$ where all calculations are performed modulo a large prime $p$ (e.g. the BN254 or BLS12-381 scalar field). This guarantees exact, closed mathematical computation without floating-point precision loss.
- Prime Field $\mathbb{F}_p$: All operations are performed modulo $p$.
- Multiplicative Inverses: Computed via the Extended Euclidean Algorithm or Fermat's Little Theorem.
- Roots of Unity: Powers of a generator element forming cyclic subgroups used for Fast Fourier Transforms (FFT).
The Schwartz-Zippel Lemma
If two distinct polynomials $P(x)$ and $Q(x)$ of degree $d$ are evaluated at a random secret point $s$, the probability that $P(s) = Q(s)$ is at most $d/p$. Because $p \approx 2^{256}$, evaluating polynomials at a single random challenge point proves polynomial equality with near-absolute cryptographic certainty.
KZG (Kate-Zaverucha-Goldberg) Commitments
KZG allows a prover to commit to a polynomial of degree $d$ in a single $O(1)$ 32-byte group element. The verifier can later verify an evaluation $P(z) = y$ using elliptic curve bilinear pairings $e(A, B)$ in constant time, forming the foundation of Plonk and Ethereum EIP-4844 blobs.