Polynomial Commitment Schemes
Last updated
Last updated
And now we arrive at a more complex object, one that is used all over cryptography due to its usefulness, an elliptic curve group. An elliptic curve group consists of all the points that satisfy some elliptic curve equation within some specified finite field.
That’s right, we can make a group using elliptic curves, but they look different to the groups we looked at before because, rather than normal numbers, our set consists of points on an elliptic curve. The binary operation is not multiplication or normal addition, but instead the elliptic curve addition we explored earlier. And the identity element is not 0, but the point at infinity that we refer to as .
That is the final piece of the puzzle for the most important component of zkSNARKs, a polynomial commitment scheme!
So far we have been evaluating our polynomials of interest at values from fields, such as , but that doesn't have to be the case. We could evaluate our polynomials at values from a group too, like an elliptic curve (EC) group.
If our polynomial is , then instead of putting in numbers and getting out numbers, like , we will put in a number and get out an elliptic curve point. For example if is our base point on the EC, we have that .
You may notice that the evaluation of the above 2 look identical, except that the second one has a at the end. The is very useful because it lets us evaluate polynomials at points of unknown order! What does that mean? Let’s explore.
A point of unknown order is where (so the EC point added to itself times) and nobody knows what is. And thanks to the DLOG assumption, nobody can work it out.
How do we get such a point? We use something called a trusted setup, but that takes some more time to explain, so for now, just imagine that somebody you really trust gave it to you, for example David Attenborough. He went on his computer, made , and then deleted from memory, so he can’t even recover it.
Not only did he make , he also made , as well as , and many more of these, up to .
Now that we have and its powers, we can create a polynomial such as like we had above and we can evaluate it at an unknown point!
We have the result , meaning we know that the polynomial evaluates to somewhere. But where does it evaluate to ? We don’t know. Well, we know that it is , where , but nobody knows what is – so it is unknown. Thus we can now evaluate polynomials at points of unknown order.
And that allows us to commit to polynomials and later reveal them. For example, let’s say you and I want to guess the price of three objects, but none of us wants to reveal our guesses before the other. If our three guesses are $37, $65, $134, then we can make a polynomial .
Now, instead of telling me your guesses, you can commit to your polynomial by determining and send me . When I receive , I have no way of determining what your polynomial was and therefore what your guesses are. Similarly I can send you my version of , call my version , which would be the evaluation of my polynomial at .
Now that we have both sent each other our commitments, we can reveal what our guesses were. We refer to this process of revealing our polynomials as an opening.
To summarize, a Polynomial Commitment Scheme (PCS) is a process that involves:
Choosing a polynomial, any we wish
Committing to that polynomial by evaluating it at the point of unknown order
Opening that commitment by revealing our polynomial
Revealing a polynomial that is different to the one we committed to is impossible, because if we did then the Schwartz-Zippel lemma tells us that when the verifier checks it, they will see that it does not match the commitment we sent them earlier
We only need to do the trusted setup ceremony once, and then we can reuse the result from it again and again every time we want to use the PCS.
Once you commit to a polynomial you cannot change it since the commitment can be used to identify that you are lying. All I would need to do is make the polynomial with your guesses (so this happens after you open your commitment), let's call the polynomial I make from the opening you gave me , then evaluate it at and find that does not equal the commitment value that you sent me.
And finally, the Schwartz-Zippel lemma tells us that the chance of guessing the correct is absolutely miniscule. Our polynomials have degree and evaluate to a point in where is absolutely huge. Thus any polynomial we make can evaluate to at at most points. If we want to change our polynomial , we have to make sure that the new polynomial evaluates to at . But we don’t know what is, so we just have to randomly guess. And since is so small compared to , the chances of us guessing correctly are essentially impossible.
Creating a point of unknown order such as where and are known but isn’t ( is kept hidden thanks to the DLOG assumption) via a process known as a trusted setup ceremony (David Attenborough in our example).
Creating powers of that point of unknown order, , , up to for some number