Currently, the concrete single point commitment scheme being used is not listed because its not important to understand the multipoint scheme. Should we make another document for this? (Edited)
It looks like r^0, r^1...r^m-1 represents fiat-shamir random challenges (derived from H (hash function - in the case of verkle trie it's sha256 per specs)). But the author can confirm better
Vector Commitment Scheme - Multipoint/Index
Vector Commitment Scheme vs Polynomial Commitment Scheme
We may use these two terms interchangeably however they are not the same, a vector commitment scheme is strictly more powerful than a polynomial commitment scheme. One can take the dot product between two vectors and if one vector is of the form then one can realise the dot product as the evaluation of a polynomial in monomial basis at the point .
Converting a vector to a polynomial can be done by either interpreting the elements in the vector as the coefficients for the polynomial or interpreting the elements as evaluations of the polynomial. Hence, we can state our schemes in terms of a polynomial commitment scheme and the translation would be done as mentioned above.
Similarly, the term multipoint will be used when referring to a polynomial commitment scheme and multi-index when referring to a vector commitment scheme. they mean the same thing, but just in different contexts.
Introduction
A vector commitment scheme allows you to prove that an element in a vector is indeed at some specific index , ie the fact that .
A multi-index vector commitment scheme, takes in a list of vectors , a list of indices and a list of values and produces a proof that for all the following holds : .
One could simply call a single index vector commitment scheme times and produce proofs in order to simulate a multi-index vector commitment scheme. However we are interested in multi-index vector commitment schemes which are more efficient than doing this. The most common strategy to do this, is to call a function which aggregates all of the tuples into a single tuple and calls the single index vector commitment scheme on the aggregated tuples.
This is the strategy that our specific algorithm will also follow.
Assumptions
The particular single index vector commitment scheme being used does not matter. We only require it to be homomorphic.
This means that commitments to polynomials can be summed, and the result will be a commitment to the sum of polynomials.
KZG and IPA/bulletproofs both have this property. Hash based commitment schemes do not have this property.
Multipoint scheme
Singlepoint scheme
We describe a singlepoint polynomial scheme using the following algorithms:
Commit
Input: A univariate polynomial, Output: A commitment to denoted or
Prove
Input: A polynomial , an evaluation point and a purported evaluated point Output : A proof that the polynomial gives a value of when evaluated at
Verify
Input: A proof , a commitment to a polynomial, an evaluation point and a purported evaluation Output: True if the committed polynomial in does indeed evaluate to on
Quotient styled commitment schemes
A quotient styled polynomial commitment scheme is one which uses the factor theorem, in order to provide opening proofs. The factor theorem, is well known, so the proof is omitted for brevity.
Theorem 1: Given a polynomial , if then factors .
Theorem 2: Given a polynomial , if , then there exists a polynomial
If , then this implies that
Let , this means we have
Using Theorem 1, this implies that factors
Which implies the following equation for some
Rearranging, we have
Observe that , the quotient, is only a polynomial, if . If it is not, then will be a rational function. We then use the fact that a polynomial commitment scheme is only able to commit to polynomials, in order to provide soundness guarantees.
In what follows, we will describe the multipoint scheme using the singe point scheme as an opaque algorithm.
Statement
Given commitments , we want to prove evaluations:
where
Observations
refers to a commitment to the univariate polynomial
The evaluation points must be taken from the domain , we can apply this restriction without loss of generality. Noting that will be the length of our vectors.
It is possible to open the same polynomial at different points and different polynomials at the same points.
It is also possible to open the same polynomial twice at the same point, it would only be wasting time.
Proof
We will first detail two sub-optimal proofs for explanation purposes and optimise after. For the final proof, you can click here
We use to denote a hash function which can heuristically be realised as a random oracle.
Let
The prover starts off by committing to using the commit function from the single point commitment scheme, we denote this by or .
The prover's job is to now convince the verifier that is a commitment to a polynomial . We do this by evaluating at some random point . If is not a polynomial, then it is not possible to commit to it.
Let
We split the evaluation of into two parts and , can be computed by the verifier, while cannot, because it involves random evaluations at the polynomials .
The verifier is able to compute the .
The prover will compute and send a proof of it's correctness.
We note that , however, we specify it as because the latter is also able to prove an opening for and the verifier is able to compute the commitment for it.
Now we form two proofs using a single point polynomial commitment scheme:
One for at . We call this . This is computed using
One for at . We call this . This is computed using
The proof consists of
Verification
The Verifier ultimately wants to verify that is the commitment to the polynomial .
The verifier computes the challenges and .
The verifier also computes , we mentioned above that they can do this by themselves.
Computing
The verifier now needs to compute :
was supplied in the proof.
can be computed by the verifier.
Hence the verifier can compute .
Note however, the verifier cannot be sure that is the correct computation by the prover ie they cannot be sure that it is indeed the evaluation of at . They need to build themselves and verify it against
Computing
Consider :
is therefore:
The verifier is able to compute this commitment themselves, and so is able to verify that was computed correctly using the function .
The verifier now calls and aborts if the return value is false.
Correctness of
Since was verified to be correct and was computed by the verifier, is correct.
Verify at
The verifier now calls and aborts if the return value is false.
Aggregated Proof
In the above protocol, the prover needed to compute two proofs, one for and another for . We now present a protocol which aggregates both proofs together.
Let
The prover no longer computes an IPA proof for and instead they combine both polynomials using a new random challenge .
Now we form an single polynomial commitment scheme proof for at . Lets call this . This is computed using
The prover still computes .
The proof consists of
Aggregated Verification
In the previous step, the verifier called . Instead they now delay this verification and instead compute the commitment to the aggregated polynomials and the evaluation of the aggregated polynomial at :
The verifier now computes
With overwhelming probability over this will only return true iff and opened at are and respectively.
Opening
This optimisation allows us to reduce the proof size by one element, by revisiting and opening at . The gist is that if we open at then we do not need to send any evaluations since the verifier can compute this themselves.
In particular, we opened the polynomial :
First note that which implies that
It is argued that if the verifier can open at using , then this implies that can be correctly opened at using .
We now list out the full protocol using this optimisation.
Proof - Final
Let
The prover starts off by committing to using the commit function from the single point commitment scheme, we denote this by or .
The prover's job is to now convince the verifier that is a commitment to a polynomial . We do this by indirectly evaluating at some random point . If is a rational function, then it is not possible to commit to it as a polynomial, and consequently, it is not possible to prove that using .
Let
It is clear to see that .
can be computed by the verifier, while cannot, because it involves random evaluations at the polynomials .
We note that the natural definition for would be , however, we specify it as because the latter is also able to prove an opening for and the verifier is able to compute the commitment for it.
The prover will compute an opening proof for . Correctness of implies correctness for since .
The prover forms an opening proof for using a single point polynomial commitment scheme:
We call this . This is computed using
The proof consists of
Verification - Final
The Verifier ultimately wants to verify that is the commitment to the polynomial .
The verifier computes the challenges , and
Computing
Consider :
is therefore:
Noting that the verifier is able to compute this value themselves.
Verifying
Since :
The commitment to with respects to * is therefore:
*We again note that is only valid, if the point being evaluated is because has already been partially evaluated at .
Since the verifier computed , if is indeed a commitment to , then is a commitment to .
Now if is a commitment to , then it will pass the following verification check .
Summary
We describe the multipoint commitment scheme which we will use for verkle trees.
We did not describe the exact single point commitment scheme being used, however we note that at the time of writing this document, the bulletpoofs variant described in section A.1 of BCMS20 is what has been implemented.