is a follow-up paper to , and it has advanced in 2 key aspects: verification speed and use of multilinear polynomials over univariate polynomials. WHIR can replace existing protocols such as FRI, , and .
Background
Please refer to and in advance.
Constrained RS (CRS) Code
An RS (Reed-Solomon) code with field F, evaluation domain L⊆F, and degree d can be interpreted as evaluations over either a univariate polynomial or a multilinear polynomial as follows:
The query complexity in WHIR remains the same as in STIR because the same idea of reducing the rate is applied. WHIR also uses Out-Of-Domain Sampling, which is employed in STIR. However, WHIR does not use Quotienting, or Degree Correction. Instead, it introduces two new methods, described below:
Sumcheck
For example, when k=2, the process operates as follows. First, let us assume that the evaluation constraint claimed by the CRS in the previous round is as follows:
b∈{0,1}m∑w^(f^(b),b)=σ
The prover provides the verifier with a univariate polynomial h^0 defined as follows to prove the constraint:
h^0(X)=b∈{0,1}m−1∑w^(f^(X,b),X,b)
The verifier then checks the following condition and rejects if the two sides are not equal:
h^0(0)+h^0(1)=?σ
The verifier samples a random α0 and sends it to the prover.
The prover, using the random value α0, provides the verifier with another univariate polynomial h^1₁ defined as follows:
h^1(X)=b∈{0,1}m−2∑w^(f^(α0,X,b),α0,X,b)
The verifier checks the following condition and rejects if the two sides are not equal:
h^1(0)+h^1(1)=?h^0(α0)
The verifier samples a random value α1 and sends it to the prover.
The folded polynomial g^ can then be constructed as follows:
g^(X)=f^(α0,α1,X)
Weight Polynomial
Out-Of-Domain Sampling
The verifier samples random value z0←$F.
The prover sends y0=g^(pow(z0,m−k)).
Shift queries
The verifier samples random values z1,…,zti←$Li. The Li is the evaluation domain in each round i, and the value t represents the number of queries required in each round i, determined by the security parameter λ.
For each i∈[t], the verifier obtains yi by querying f:
yi=Fold(f,α0,α1)(zi)
and Fold is defined as:
Fold(f,αi,…,αj)(y)={Fold(Fold(f,αi),αi+1,…,αj)(y2)2f(x)+f(−x)+αi⋅2⋅xf(x)−f(−x) if i<j if i=j
where y=x2=(−x)2.
Recursive Claims
The verifier samples random value γ←$F.
Using the random values and the computed results, the prover and the verifier constructs w^′ and σ′, which will be used in the new CRS[F,L,m−k,w^′,σ′].
a constrained Reed-Solomon code CRS[F,L0,m0,w^0,σ0];
an iteration count M∈N;
folding parameter k0,…,kM−1 such that ∑i=0M−1ki≤m;
evaluation domain L1,…,LM−1⊆F where Li is a smooth coset of F∗ with order ∣Li∣≥2mi;
repetition parameters t0,…,tM−1 with ti≤∣Li∣;
define m0:=m and mi:=m−∑j<ikj;
define d∗:=1+degZ(w^0)+maxi∈[m0]degXi(w^0) and d:=max{d∗,3}.
Inputs
The verifier has oracle access to f0:L0→F. In the honest case, f0∈CRS[F,L0,m0,w^0,σ0] and the prover receives f^0∈F<2[X1,…,Xm] such that f0=f^0(L0) and ∑b∈{0,1}m0w^0(f^0(b),b)=σ0.
Query(Prover side)
Initial sumcheck: Set α0:=∅. For ℓ=1,…,k0:
The prover sends h^0,ℓ∈F<d∗[X]. In the honest case, h^0,ℓ:=∑b∈{0,1}m0−ℓ−1w^0(f^0(α0,X,b),α0,X,b).
The verifier samples α0,ℓ←F. Append α0,ℓ to set α0.
Main loop: For i=1,…,M−1:
Send folded function: The prover sends fi:Li→F. In the honest case, fi is the evaluation of f^i:=f^i−1(αi−1,⋅) over Li.
Out-of-domain sample: The verifier sends zi,0←$F. Set zi,0:=pow(zi,0,mi).
Out-of-domain reply: The prover sends yi,0∈F. In the honest case, yi,0:=f^i(zi,0).
Shift message: The verifier samples zi,1,…,zi,ti−1←$Li−1(2ki−1) and γi←$F. Set zi,j:=pow(zi,j,mi).
Sumcheck rounds: Set α0:=∅. For ℓ=1,…,ki:
The prover sends h^i,ℓ∈F<d[X]. In the honest case, h^i,ℓ(X):=∑b∈{0,1}mi−ℓ−1w^i(f^i(αi,X,b),αi,X,b) where w^i(Z,X1,…,Xmi):=w^i−1(Z,αi−1,X1,…,Xmi)+Z⋅∑j=0ti−1⋅eq(zi,j,(X1,…,Xmi)).
The verifier samples αi,ℓ←F. Append αi,ℓ to set αi.
Send final polynomial: The prover sends f^M∈F<2[X1,…,XmM]. In the honest case f^M:=f^M−1(αM−1,⋅).
Sample final randomness: The verifier samples r1fin,…,rtM−1fin←$LM−1(2kM−1).
Query(Verifier side)
Check initial sumcheck:
Check that ∑b∈{0,1}h^0,1(b)=σ0.
Check that ∑b∈{0,1}h^0,ℓ(b)=h^0,ℓ−1(α0,ℓ−1) for ℓ∈{2,…,k0}.
Check main loop: For i=1,…,M−1:
Let gi−1:=Fold(fi−1,αi−1).
Compute the points {gi−1(zi,j)}j∈[ti−1] by querying fi−1 at the appropriate locations.
Check that ∑b∈{0,1}h^i,1(b)=h^i−1,ki−1(αi−1,ki−1)+γi⋅yi,0+∑j=1ti−1⋅gi−1(zi,j).
Check that ∑b∈{0,1}h^i,ℓ(b)=h^i,ℓ−1(αi,ℓ−1) for every ℓ∈{2,…,ki}.
Check final polynomial:
Check that, for every ℓ∈[tM−1], f^M(rℓfin)=gM−1(rℓfin) where rℓfin:=pow(rℓfin,mM).
For i=1,…,M−1 set w^i(Z,X1,…,Xmi):=w^i−1(Z,αi−1,X1,…,Xmi)+Z⋅∑j=0ti−1γij+1⋅eq(zi,j,X1,…,Xmi)
Check that ∑b∈{0,1}mMw^M−1(f^M(b),αM−1,b)=h^M−1,kM−1(αM−1,kM−1).
Conclusion
The figure above is a table comparing BaseFold, FRI, STIR, and WHIR. It shows that WHIR, like STIR, has the lowest query complexity. Additionally, WHIR also achieves the lowest verifier time complexity. (For details on how WHIR's verifier time complexity is calculated, refer to Section 2.1.4, "Verifier Efficiency," in the paper.)
References
Fig 1. Simple Diagram of the Query Phase in the STIR (left) and WHIR (right) Protocols
For each round in the , the verifier provides a random value, and the prover reduces the number of variables by one. With each variable reduction, the degree is also reduced by one. After k rounds of sumcheck, k variables can be eliminated, reducing the degree by k. This is the folding method used in WHIR, differing from the k-fold approach in STIR.
Fig 2. Comparison Table among BaseFold, FRI, STIR and WHIR
Fig 3. Benchmark Result among FRI, STIR and WHIR
The benchmarking results, as derived from the table above, show a similar trend. In the , Eylon Yogev highlighted that WHIR has lower on-chain gas costs than Groth16. Given that Groth16 is widely recognized for its low on-chain gas costs, this suggests an exciting possibility: we may not need to combine STARK-based proof generation with Groth16 verification in the future. This could mark the beginning of a more efficient era, though significant progress is still needed to make it a reality. For now, Groth16 verification remains the most cost-effective option. For more details, see .