Appearance
An even more efficient version
To put things into perspective, our latest protocol version requires sharing 6 polynomials of degree at most
But there is a goal behind our strategy. Our goal is to make both the communication and the verification constant (
In the following we simply recap some fundamental properties of the needed ingredients while keeping our goal on sight.
What do we want to achieve? In a nutshell what we want to achieve is the following: We want to completely delegate computation of the circuit to the processor, and as before, also the interpolation of the column polynomial and the computation of the quotients. But the twist is, we will not ask for a full copy of a given polynomial
What this accomplishes:
- Instead of sharing a
-size vector for each polynomial over the network, we only share two elements: , where is an elliptic curve, and . - A malicious or misbehaving processor
cannot adapt to the interactive challenge since it has already commited to a polynomial before seeing the challenge. This gives the validator confidence that the value was correctly computed. - We can directly perform the constraint checks
in constant time, regardless of the number of gates in the circuit (that is, the polynomial of the interpolating polynomial). Certainly there are some upper bounds to the size of a circuit and we will come back to this later.
Given that by making this protocol more efficient we have to make it more resilient to misbehaving processors, we are going to call
Cryptographic Pairings
The first ingredient for our new protocol version will be a suitable elliptic curve pairing. We will give you some precomputed functions, but you may reconstruct them on your own.
We need a mapping:
for additive cyclic groups
The mapping
To construct secure pairings, it is important to chose the groups in a particular way which motivates choosing isomorphic but disjoint
python
import kzg
def e(P,Q):
#Base field for BN254
q = 21888242871839275222246405745257275088696311157297823662689037894645226208583
#Number of points on BN254
n = Integer(21888242871839275222246405745257275088548364400416034343698204186575808495617)
k = 12
t = 6*pow(4965661367192848881,2)+1
return P.ate_pairing(Q, n, k, t,q)
python
P = kzg.P
Q = kzg.Q
show("P:",P)
show("Q:",Q)
show(e(P,Q))
Exercise 6
Check that the provided
python
#Solve here!
s=Integer(randrange(1, p))