Appearance
Zero-equality testing via polynomial division
Now, remember we want to build a protocol that is more efficient than recomputing the original function. In the checks above, we were looping through the values of
In fact, since we are working on a field, we know that if
Checking this relation for the right "vanishing" polynomial Z replaces the need for looping over all indexes.
Exercise 4
Compute
python
#Solve here!
Z = R(1) # Start with the constant polynomial 1
for i in I:
Z *= (x - i)
Q =
Z1 =
Q1 =
Q2 =
If computed correctly you should get:
We can also do the sanity check of recovering
python
print("Is t(x) = Q(x) * Z(x)?", t == Q*Z)
show("Q=",Q)
print("Is f1(x) = Q1(x) * Z1(x)?", f1 == Q1*Z1)
show("Q1=",Q1)
print("Is f2(x) = Q2(x) * Z1(x)?", f2 == Q2*Z1)
show("Q2=",Q2)