Hyrax Polynomial Commitment Scheme
References: WTS+18, page 8.
Prerequisites
As described within the committed input layers section, the Hyrax polynomial commitment scheme (PCS) consists of a and an phase such that
- During , the prover sends a commitment for the input layer MLE .
- After running the rest of the Hyrax IP, we are left with a claim .
- During , the prover sends an evaluation proof showing that .
A Simple Protocol
Note that for an MLE with coefficients in the Lagrange basis the evaluation can be represented by the following inner product:
In the future, we note that the latter vector is simply a tensor product of the smaller vectors , so we represent it as the tensor product
Indeed, this above observation allows us to create a very simple PCS with the help of proof-of-dot-product. In particular,
- During the phase, we produce generators .
- During the phase, the prover generates a blinding factor and computes the commitment
- During the phase, the prover and verifier engage in a proof-of-dot-product, where
- The public vector is
- The committed vector is
- The committed inner product value is
We note that the size of the commitment is since the commitment is a single group element. However, both the verifier runtime and communication cost are (as proof-of-dot-product incurs costs which are linear in the size of the vectors), which is less than ideal. Can we do better?
Vector-Matrix-Vector Product Observation
(Reader's note: the construction described here is identical to that in the Ligero PCS section.) Rather than simply linearly arranging the coefficients of as above, we can instead arrange them in a square matrix (for now, assume that is even) of size by enumerating the coefficients in row-major order:
Given the matrix formulation of above, we can write the evaluation of as the following vector-matrix-vector product:
We denote the left vector as and the right vector as . This allows us to create the following PCS:
Commitment Phase
We assume that has given the prover and verifier a set of common generators . The prover generates random blinding factors and computes the following during the commit phase: where is a Pedersen commitment to the 'th row of . where is a Pedersen commitment to the 'th row of . The prover sends to the verifier.
Evaluation Phase
The prover sends to the verifier, who computes a "squashed" commitment The verifier computes a "squashed" commitment Note that the above is now a blinded Pedersen vector commitment to the vector-matrix product . The verifier can do the above in group operations. Finally, the prover and verifier execute a proof-of-dot-product with the following:
- The public vector is
- The committed vector is
- The committed inner product value is
Note that unlike the simple protocol, this proof-of-dot-product is invoked over two vectors of length rather than . The final evaluation proof size is thus and the final verifier cost is also , although the commitment size is now increased to from earlier.
Costs
Assume that the prover is committing to a multilinear polynomial in variables. Assume that is even, and that are our generators (we implicitly arrange down the polynomial's coefficients into a square matrix, although other matrix shapes are equally valid and result in different costs/proof sizes). For simplicity, assume that computing a multi-scalar multiplication over generators costs (this can be improved with e.g. Pippenger's, of course).
Prover Cost
- During the commitment phase, the prover computes Pedersen vector commitments to each row of . Each Pedersen vector commitment is an MSM of length , and thus the total runtime is group operations.
- During the evaluation phase, the prover computes a proof-of-dot-product over and . This requires roughly group operations.
- The prover's total cost is thus group operations.
Proof Size
- The commitment size is one Pedersen vector commitment per row of the matrix, i.e. group elements.
- The evaluation proof is a proof-of-dot-product where the vector is length , resulting in group elements being communicated.
Verifier Cost
- During the commitment phase, the verifier receives row commitments .
- During the evaluation phase, the verifier first computes by itself, which requires computing a single MSM of length . This costs group operations.
- Next, the verifier engages in verifying a proof-of-dot-product with the prover between and . This costs roughly group operations.
- The verifier's total cost is thus .