Pairing-based polynomial commitments and Kate polynomial commitments
There’s this thing called a Kate polynomial commitment, which is a polynomial commitment primitive that makes use of pairings. There’s an excellent post from Dankrad which I would recommend reading instead of this post. I wrote this as a shorter summary of how you can commit to a polynomial, and then prove any evaluation .
Here’s how it works:
You have a polynomial
and some public parameters:
where for some generator of an elliptic curve group.
and is a toxic waste (something that no one should know) hidden behind an elliptic curve point G (some people call that “hidden in the exponent”).
to commit to
To commit to this polynomial, evaluate it at the unknown point . You can do that by playing with the :
to prove that
One day, the verifier asks “what’s the evaluation at ?” And the prover responds by sending the answer, , and a proof (, see below).
The idea behind the proof
Notice that because is a root of , then for some polynomial :
Due to this, must be a valid polynomial.
At a high-level:
- the verifier will compute what they think should be at some random point
- the prover will send the actual value
- the verifier will check if they match
This works because the Schartz-Zippel lemma tells us that two polynomials that are different are different in most points.
The proof
Here’s the protocol:
- the prover sends the verifier a commitment evaluated at some random point (the toxic waste).
- the verifier constructs a similar but with the expected value of instead: . The verifier then checks if it’s equal to .
Note:
-
The prover can compute easily, because they can just compute the polynomial first, and then reconstruct it at with the . and then
for example with our previous and
-
The verifier cannot compute their own because they cannot divide by (remember, nobody knows ). They need a pairing. Remember, you want to check the following identity hidden in the exponent (using commitments): But since you can’t divide with commitments, you can’t compute what’s on the left-hand side. You can multiply thanks to pairings though. So instead, you could check the following equation: and with pairings, you can multiply with the proof :
PS: Thanks to h for pointing out a mistake