Polynomial Commitment Scheme (PCS) - allows a prover to commit to a polynomial such that a verifer can check claimed evaluations o the polynomial using its commitment.
Batched-PCS (BPCS) - allows a prover to commit to multiple polynomials.
Constant-Sized - a PLONK witness can be encoded into a polynomial for which a single-value commitment can be generated using a PCS.
Non-Revealing - a PCS allows the verifer to query (and verify) additional information about without learning any ; other commitment schemes (e.g. Pedersen [vector] commitments and Merkle trees) require the prover to reveal some/all of their committed data.
Homomorphic - a PCS verifier can perform (limited) polynomial arithmetic without having access to the committed polynomial.
Batchable - PLONK requires a prover to commit to multiple polynomials where some/all are evaluated at different inputs which can be accomplished using a BPCS.
If is a polynomial containing the point then the polynomial has a root at .
If has a root at , then its linear factorization contains the degree-1 polynomial .
The PRT can be used to prove that a polynomial contains the point by showing that without remainder.
Here, encryption of an integer means computing where is a generator of a prime order multiplicative cyclic group (which has a hard discrete log).
Allows arithmetic to be performed on plaintext values without leaving encrypted space.
If we have homomorphic addition and scalar mulitplication we can homomorphically evaluate a polynomial at a point , i.e. , given encrypted powers of , i.e. .
We cannot perform homomorphic multiplication using cyclic group encryption alone:
but, we can do so using pairings.
A pairing is a 2:1 function between groups and such that exponents in the inputs (i.e. encrypted integers) are multiplied in the output.
Here, , , and are multiplicative, cyclic, and cryptographic groups of equal prime order .
We can homomorphically evaluate a product of polynomials at an input given encrypted powers of in and .
KZG is parameterized by :
KZG requires homomorphically evaluating a degree- polynomial in and a degree-1 polynomial in at a random input (Schwartz-Zippel). Homomorphic polynomial evaluation requires knowledge of encrypted powers of the polynomial input, thus a trusted-setup is run to generate the random input , known to no party, and outputs encrypted powers of in and , i.e. the structured reference string (SRS).
The prover commits to a polynomial by homomorphically evaluating it at .
The verifier asks the prover to evaluate at a chosen input . The prover calculates , uses polynomial division to create the PRT cofactor polynomial for , and homomorphically evaluates .
can be thought of as a commitment to in the same way that was a commitment to .
The verifier checks the claimed evaluation using the PRT equality evaluated at a random input (Schwartz-Zippel). The verification equation is the PRT equality written homomorphically so that the verifier can evaluate the equality at without knowing .
Which is equivalent to checking the PRT equality at a random input (Schwartz-Zippel).
The prover claims that lies on ; the PRT equality must hold on all inputs if the claim is true.
Schwartz-Zippel says that we can evaluate the equality at a single random input. The SRS contains a random integer , known to no party, which we use for the random input.
Note that this is the exponents in the KZG verification equation.
Rewriting the Schwartz-Zippel-ed PRT equality using homomorphic polynomial evaluation (allows to be unknown) and pairings (allows the verifier to homomorphically multiply evaluated polynomials, i.e., ) yields an equality which can be checked by a verifier without knowledge of .
A linear combination is a sum of binary products. The linear combination of two vectors and is their dot product.
A random linear combination (RLC) of a vector is its dot product with a vector of random values .
The modular powers of an integer form a psuedorandom sequence, thus for a random we consider to be random.
Schwartz-Zippel tells us that for a random , the RLC of a vector with powers of is (w.h.p.) unique.
Multiple polynomials can be compressed into a single polynomial by taking their random linear combination with randomness .
We can compress multiple Schwartz-Zippel evaluations at a random input into a single value using an RLC with randomness which is (w.h.p.) unique.
Multiple polynomial equalites can be compressed into a single polynomial equality by taking a RLC of the left-hand sides and a RLC of the right-hand sides using randomness and equating the two.
We can combine multiple polynomial equalities into a single equality using an RLC with randomness , thus we can write a batched-PRT equality for proving multiple polynomial evaluations and at the same input .
Batched-KZG evaluates the batched-PRT equality at a random input (Schwartz-Zippel) generated during a trusted-setup. Batched-ZKG allows us to commit to multiple polynomials and verify an evaluation for each using a single equality.
Multivariate Schwartz-Zippel:
tells us that a RLC of polynomials is (w.h.p.) unique.
TLDR: an -variate polynomial is a LC of -variate polynomials. A univariate polynomial evaluated at a random input is (w.h.p.) unique, thus a bivariate polynomial having a partially applied random input results in a univariate polynomial which (w.h.p.) has unique coefficients. Partially applying a second random input yields the standard univariate Schwart-Zippel probability. A RLC of -variate polynomials is equivalent to an -variate polynomial evaluated at a random input for the introduced indeterminate.
A degree- bivariate polynomial is a linear combination of powers of with univariate polynomials .
Schwartz-Zippel says us that a univariate polynomial evaluated at a random input is (w.h.p.) unique.
Thus, partially applying to a bivariate polynomial results in a unique coefficient vector .
The probability that the coefficient vectors of two different bivariate polynomials are equal after partially applying the random input is zero.
Thus, partial application of yields a unique univariate polynomial, which Schwartz-Zippel tells us evaluates uniquely on random input .
[Somewhat surprisingly] the bivariate and univariate Schwartz-Zippel probabilities are equal, which by induction can be generalized into the multivariate Schwartz-Zippel expression.
Proof by Induction:
PLONK's BPCS is a batched-batched-ZKG which allows a prover to commit to mulitple polynomials where each may be evaluated at a distinct input. A prover has sets of polynomials where each set is evaluated at the same input and each set's input is distinct. The prover runs batched-KZG for each set producing batched-PRT equalities (one for each distinct input). The prover batches those batched-PRT equalities into a single equality which contains every polynomial's evaluation.
The BPCS is parameterized by where is the number of polynomials that the prover commits to; all other parameters are the same as those used in KZG10.
PLONK's BPCS uses the same trusted-setup and commitment procedures as KZG10 except that PLONK's BPCS makes commitments, one for each polynomial .
The verifier sends the prover each polynomial's evaluation input which may contain duplicated values. For each of the distinct inputs, the verifier samples a random value and sends it to the prover .
The prover partitions their polynomials according to like input, i.e. splits their polynomials into subarrays where each subarray's polynomials are evaluated at the same input.
For each parition , the prover performs a batched-PRT using randomness , i.e. homomorphically computes each then homomorphically computes the RLC of all . Partition contains polynomials denoted .
The prover sends the verifier each polynomial's evaluation and each partition's compressed PRT cofactors .
The verifier compresses each partition's polynomial commitments and polynomial evaluations using randomness .
The verifier now has three values for each partition: the compressed polynomial commitments, the compressed polynomial evaluations, and the compressed PRT cofactor polynomials.
The verifier samples a random and computes the random linear combinations of all , , and :
then checks the verification equation:
which homomorphically checks the batched-batched-PRT equality:
Examples of other commitment schemes are CRHF's, Merkle trees, Pedersen [vector] commitments, accumulators, etc.
KZG10 has constant sized commitments, constant sized openings, opening does not reveal information about the committed polynomial , i.e. , and is a natural commitment choice for polynomial-based protocols.
Hiding - the function's output contains no information about its input, e.g.
committing to via is non-hiding because an adversary can brute-force all commitments to find . Committing to using a random hiding factor via is hiding because an adversary cannot brute-force all commitments without without knowing .
Comparison of Commitment Schemes:
Name | Commitment | Properties |
---|---|---|
CRHF | non-hiding, non-homomorphic | |
CRHF w/ Blinding | hiding, non-homomorphic | |
Enc. | non-hiding, homomorphic | |
Pedersen | hiding, homomorphic | |
CRHF | must reveal all | |
Enc. | partially revealing | |
Pedersen Vector | hiding, homomorphic, must reveal all | |
Merkle Tree | partially revealing, communication | |
KZG10 | hiding, homomorphic, constant commitment size, non-revealing, constant communication |
PLONK represents witnesses using polynomials and uses a PCS to commit to those polynomials.
The PRT equality for a polynomial evaluated at is:
Encryption of an integer using a cyclic group is:
Cyclic group encryption gives us homomorphic addition, scalar multiplication, and polynomial evaluation.
Pairings give us homomorphic multiplication.
KZG10 is a PCS that allows a prover to commit to a polynomial and a verifer to check claimed evaluations of that polynomial . KZG is the PRT equality evaluated at a random input (Schwarz-Zippel) generated during a trusted-setup. Because is known to no party, the PRT equality is rewritten homomorphically.