Finally, we reach the conclusion of the series “Understanding the value of a zero-knowledge proof algorithm - Zk-stark”. We discussed the overall structure of the Zk-stark algorithm, the first part of the algorithm, Arithmetization, and the second part of the algorithm, Low Degree Testing, in the previous three articles. I believe that after reading these articles, you will have a general understanding of the outline of the Zk-stark algorithm. However, you may question the accuracy of some sentences or illustrations in the article. Indeed, a more specific introduction and explanation are required for certain contents. Otherwise, misunderstandings may occur.
In the third article, we have discussed the importance of conducting LDT on polynomials to ensure that the values returned by the prover satisfy the equality of polynomial equations are indeed calculated using effective polynomials. In the meantime, to minimize the complexity of the verifier, we have transformed the original polynomial and thus the polynomial to be verified by the verifier is only half the original polynomial. Repeat until the degree of the polynomial can be determined directly. This is the fundamental concept of the FRI protocol. Now, let us go over the FRI protocol in detail.
FRI, Fast RS IOPP, or Fast Reed—Solomon Interactive Oracle Proofs of Proximity, is a more effective proximity test method that is used to determine whether a set of points is mostly on a polynomial with a degree less than a specified value and can achieve linear proof complexity and logarithmic verification complexity or not. Before we introduce the FRI protocol in its entirety, let us consider a simple scenario.
There exists a multiplicative group L_0 of order 2^n on a Galois Field F.
As a result, when f_0=P, there exist polynomials deg(P1,P2)<1/2∗ρ∗2^n whose order satisfy the relationship of and satisfy the following equation:
f_0(x) = P(x) = P1(x^2) + x∗P2(x^2)(1)
Set Q(x, y)=P1(y)+x∗P2(y) we can see the order d<2 of binary polynomial Q(x, y) concerning for variable x; The order d<1/2∗ρ∗2^n. of variable y, and when y=x^2, there is Q(x, y)=f_0(x); At this time, the verifier V randomly selects a value x0x0 and sends it to the prover P. The prover P calculates Q(x_0,y) and sets:
f1(y)=Q(x_0, y)=P1(y)+x_0*P2(y)(2)
For polynomial f1(y), since y=x^2 and x has a value range of the Group L_0, thus there is the equation x^(2^n)=1, which can be further converted to (x^2)^n=1. Therefore, if the value range of the independent variable y is defined as the Group L1, then L1 should have the following properties:
So far, the issue is transformed into the one in which the prover P shall prove whether the order of polynomial f1(y) satisfies d<1/2∗ρ∗2^n or not; at the same time, the consistency of function f1 and f0 shall be ensured. Specific steps are as follows:
Reliability analysis: if the function f1 is not converted from the function f0 according to the above process, then it is in large probability that the polynomial P1(x2) and P2(x2) of formula (1) and the polynomial P1(y) and P2(y) of formula (2) are not equal to each other. Considering that the order of the polynomial satisfies d<1/2∗ρ∗2n, and the value range of the variable is 2(n−1), the probability of equality of the polynomial is (1/2∗ρ∗2^n/2^(n−1))=ρ if a value is randomly selected within this range according to Schwartz Zippel theorem. ρρ represents coderates. If ρ=2^−8, then the probability of successful verification for just one time is merely 2^−8. If it is verified for kk times, the probability of success in operating with bad manners is equal to 2^−8k. With the increase of the value of kk, the probability is infinitely close to 0.
Repeat the above process for the function f1 until the polynomial fr becomes a form that can effectively judge the order, and the whole LDT process is completed.
Next, let’s take a look at the specific contents of the FRI protocol, as shown in Figure 1:
FRI protocol is divided into two stages: commit and query. As can be seen from the previous simple scenario example, an interaction process requires:
Next, we’ll introduce the meaning of parameters and steps in Commit and Query protocols and then summarize the relevant processes.
Commit:
Common input
Prover input
LOOP i ≤ r
Query:
Verifier input
Reconstruct fr
Repeat l times
Si satisfies the set of si in si+1=q0(si)
For example, starting from the Group L0, randomly select an element s0 and calculate s1=q0(s0), then s1 is the element of the Group L1. However, there is also −s0(assuming q0(x)=x2q0(x)=x2) satisfying the above relationship on the Group L0, so there is S0={s0,−s0}; Similarly, continue to repeat the above calculations with s1 for r times, and a series of sets of S0,S1,…,Sr−1 will be obtained.
On the set of S0,S1,…,Sr−1 obtained in step 1, respectively QUERY the value of polynomial fi
Verify that the returned value is consistent with the corresponding polynomial commitment (if the commitment in the COMMIT stage is the merkle-based hash calculation, then here multiple hash calculations are required to obtain the root)
Interpolate P0(x),P1(x),…,Pr−1(x) in turn
Verify fi+1(si+1)=Pi(xi) in sequence
Next, set η=1 (i.e. q0(x)=x2) as an example to describe the two-stage process of FRI protocol, as shown in the following figure: d<ρ∗2^n
As can be seen from the above process:
The process described above is the FRI protocol. As can be seen, the complexity of the verification satisfies the logarithmic relationship . The algorithm ensures that the round consistency verifications can be passed if and only if the initial polynomial satisfies . The actual implementation may vary slightly. For more information, please refer to the DEEP-FRI paper. In comparison to FRI, DEEP-FRI increases the system’s reliability while maintaining an optimal level of proof and verification complexity.
Based on the previous three articles in this series, the Zk-STARK algorithm can be summarized as follows: