Proving System: Plonky3
Plonky3 is a batteries-included framework for building succinct proof systems. It is a collection of Rust crates providing a very small set of core traits around which various cryptographic primitives and examples are built.
Plonky3 consists of the following functional components, listed in a linearization of their dependency ordering:
A collection of simple utility functions. This is located in the
utilsubdirectory.A feature-gated wrapper around parts of rayon. This is located in the
maybe-rayonsubdirectory.A field abstraction with various implementations and associated algorithms. This is located in the
fieldsubdirectory.A collection of utilities for testing field implementations. This is located in the
field-testingsubdirectory.A matrix abstraction with various implementations and associated algorithms. This is located in the
matrixsubdirectory.A collection of AIR-related traits and implementations, including a two-row matrix view and affine functions over columns in a pair (“virtual columns”). This is located in the
airsubdirectory.A framework for symmetric crypto primitives, including compression function related traits and implementations, a padding-free, overwrite-mode sponge function, a hasher trait, a serializing hasher, and cryptographic permutation related traits. This is located in the
symmetricsubdirectory.An implementation of the Baby bear field (i.e., the finite field of size 2^31 - 2^27 + 1) and its quartic and quintic extension fields. This is located in the
baby-bearsubdirectory.An implementation of the Goldilocks field (i.e., the finite field of size 2^64 - 2^32 + 1) and its quadratic extension field. This is located in the
goldilockssubdirectory.An implementation of the Mersenne-31 field (i.e., the finite field of size 2^31 - 1) and some of its field extensions, as well as DFT implementations for Mersenne-31. This is located in the
mersenne-31subdirectory.A Keccak permutation and hash function implementation. This is located in the
keccaksubdirectory.A Blake3 hash function implementation. This is located in the
blake3subdirectory.A library of DFT-related traits and implementations. This is located in the
dftsubdirectory.A collection of coding theoretic traits. This is located in the
codesubdirectory.A collection of coset low degree extension related traits and implementations. These are used to take a polynomial, represented as its 2^k evaluations over the multiplicative subgroup of a finite field generated by a primitive 2^k-th root of unity, and compute the evaluations of the polynomial over a multiplicative-group coset of a primitive 2^(k+added_bits)-th root of unity. This is located in the
ldesubdirectory.An implementation of Reed-Solomon codes. This is located in the
reed-solomonsubdirectory.A collection of traits and implementations for generating Fiat-Shamir challenges based on an interactive proof’s transcript. This is located in the
challengersubdirectory.A collection of commitment scheme traits. This is located in the
commitsubdirectory.A collection of maximum distance separable (MDS) permutation related traits and implementations. (An MDS permutation is an MDS code which is also a permutation.) This is located in the
mdssubdirectory.A Poseidon permutation implementation. This is located in the
poseidonsubdirectory.A Poseidon2 permutation implementation and related traits and implementations. This is located in the
poseidon2subdirectory.A Rescue-XLIX permutation implementation. This is located in the
rescuesubdirectory.A binary Merkle tree implementation and a vector commitment scheme backed by binary Merkle trees. This is located in the
merkle-treesubdirectory.An implementation of the Spielman-based code described in the Brakedown paper. This is located in the
brakedownsubdirectory.A couple of functions to help with Lagrange interpolation, specifically Barycentric interpolation. This is located in the
interpolationsubdirectory.A polynomial commitment scheme using degree 2 tensor codes, based on BCG20. This is located in the
tensor-pcssubdirectory.An implementation of the Monolith-31 permutation. This is located in the
monolithsubdirectory.An implementation of FRI. This is located in the
frisubdirectory.A minimal univariate STARK framework. This is located in the
uni-starksubdirectory.A minimal multivariate STARK framework. This is located in the
multi-starksubdirectory.An AIR for the Keccak-f permutation. This is located in the
keccak-airsubdirectory. This is provided as an example.
A common misconception about Plonky3 is that Plonky3 provides a reusable STARK framework. This is not really the case, because the univariate STARK framework isn't general enough to work for a wide enough variety of commercially relevant use cases. Making it general enough for that is a hard problem, due in part to the limitations of abstraction capabilities in Rust. This is the reason why Valida, for example, doesn't leverage the univariate STARK framework in Plonky3, but instead contains its own implementation of univariate STARKs.
Valida leverages Plonky3 for some core bits of Valida's proving system, including key abstractions such as Plonky3's AIR builder, and Plonky3's FRI polynomial commitment scheme.
Last updated