LogoLogo
LogoLogo
  • Introduction
    • About Us
    • Notations & Definitions
      • MPC
      • ZK
    • Contribute to this Site!
  • Primitives
    • Multiplication
      • Karatsuba Multiplication
      • Toom-Cook Multiplication
    • NAF (Non-adjacent form)
    • Chinese Remainder Theorem (CRT)
    • Euclidean Algorithm
      • Extended Euclidean Algorithm
      • Binary Euclidean Algorithm
      • Extended Binary Euclidean Algorithm
    • Coding Theory
      • Linear Code
    • Number Theoretic Transform
    • Abstract Algebra
      • Group
        • -Morphisms
        • Batch Inverse
      • Elliptic Curve
        • Weierstrass Curve
          • Coordinate Forms
          • Fast Elliptic Curve Arithmetic and Improved WEIL Pairing Evaluation
        • Edwards Curve
          • Coordinate Forms
          • Twisted Edwards ↔ Short Weierstrass Transformation
        • Batch Inverse for Batch Point Additions
        • Scalar Multiplication
          • Double-and-add
          • GLV Decomposition
        • MSM
          • Pippenger's Algorithm
          • Signed Bucket Index
          • CycloneMSM
          • EdMSM
          • cuZK
        • 2-Chain and 2-Cycle of Elliptic Curves
    • Encryption Scheme
      • ElGamal Encryption
    • Modular Arithmetic
      • Modular Reduction
        • Barrett Reduction
        • Montgomery Reduction
      • Modular Inverse
        • Bernstein-Yang's Inverse
    • Multiset Check
    • Sumcheck
    • Commitment Scheme
      • Fflonk
      • SHPlonk
      • Zeromorph
  • MPC
    • Yao's Garbled Circuits
    • GMW
    • BMR
  • ZK
    • Arithmetization
      • R1CS
      • PLONK
      • AIR
    • Folding
      • LatticeFold
      • Nova
        • Nova over Cycles of Curves
    • Lookup
      • Lasso
      • LogUp-GKR
    • SNARK
      • Groth16
      • HyperPlonk
      • Spartan
        • SPARK
    • STARK
      • Additive NTT
      • Basefold
      • Binius
      • Brakedown
      • CircleSTARK
      • FRI
        • FRI Security Features and Optimizations
      • DEEP FRI
      • STIR
      • WHIR
    • Distributed ZK
      • Ryan's Trick for Distributed Groth16
  • Application
    • zkLogin
    • zkHoldem
    • zkTLS
      • DECO
      • Proxying is enough
  • zkVM
Powered by GitBook
On this page
  • Introduction
  • Background
  • Constrained RS (CRS) Code
  • Protocol Explanation
  • Brief Overview
  • Sumcheck
  • Weight Polynomial
  • The Full WHIR Protocol
  • Conclusion
  • References
Export as PDF
  1. ZK
  2. STARK

WHIR

Presentation: https://youtu.be/JdHqAIMihxg

PreviousSTIRNextDistributed ZK

Last updated 2 months ago

Introduction

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\mathbb{F}F, evaluation domain L⊆F\mathcal{L} \subseteq \mathbb{F}L⊆F, and degree ddd can be interpreted as evaluations over either a univariate polynomial or a multilinear polynomial as follows:

RS[F,L,m]:={f:L→F:∃g^∈F2m[X] s.t. ∀x∈L,f(x)=g^(x)}={f:L→F:∃f^∈F2[X1,…,Xm] s.t. ∀x∈L,f(x)=f^(pow(x,m))}\begin{align*} \mathsf{RS}[\mathbb{F}, \mathcal{L}, m] :&= \{ f:\mathcal{L} \rightarrow \mathbb{F} : \exist \hat{g} \in \mathbb{F}^{2^m}[X] \text{ s.t. }\forall x \in \mathcal{L}, f(x) = \hat{g}(x) \} \\ &= \{ f:\mathcal{L} \rightarrow \mathbb{F} : \exist \hat{f} \in \mathbb{F}^{2}[X_1, \dots, X_m] \text{ s.t. }\forall x \in \mathcal{L}, f(x) = \hat{f}(\mathsf{pow}(x, m)) \} \end{align*}RS[F,L,m]:​={f:L→F:∃g^​∈F2m[X] s.t. ∀x∈L,f(x)=g^​(x)}={f:L→F:∃f^​∈F2[X1​,…,Xm​] s.t. ∀x∈L,f(x)=f^​(pow(x,m))}​

where pow\mathsf{pow}pow is defined as:

pow(x,m)=(x20, …, x2m−1)\mathsf{pow}(x, m) = ({x}^{2^0}, \space \dots, \space {x}^{2^{m - 1}})pow(x,m)=(x20, …, x2m−1)

A CRS (Constrained Reed-Solomon) code extends the traditional RS code by introducing additional evaluation constraint f^(z)=σ\hat{f}(\bm{z})=\sigmaf^​(z)=σ.

Recall that f^\hat{f}f^​ is defined as:

f^(X)=∑b∈{0,1}mf^(b)⋅eq(b,X)\hat{f}(\bm{X}) = \sum_{\bm{b}\in \{0, 1\}^m} \hat{f}(\bm{b}) \cdot \mathsf{eq}(\bm{b}, \bm{X})f^​(X)=b∈{0,1}m∑​f^​(b)⋅eq(b,X)

To incorporate the additional constraint f^(z)=σ\hat{f}(\bm{z})=\sigmaf^​(z)=σ,

f^(z)=∑b∈{0,1}mf^(b)⋅eq(b,z)=∑b∈{0,1}mw^(f^(b),b)=σ\hat{f}(\bm{z}) = \sum_{\bm{b} \in \{0, 1\} ^m } \hat{f}(\bm{b}) \cdot \mathsf{eq}(\bm{b}, \bm{z}) = \sum_{\bm{b} \in \{0, 1\}^m} \hat{w}(\hat{f}(\bm{b}), \bm{b}) = \sigmaf^​(z)=b∈{0,1}m∑​f^​(b)⋅eq(b,z)=b∈{0,1}m∑​w^(f^​(b),b)=σ

where w^\hat{w}w^ is defined as: (and we call this weight polynomial, which we'll explain later).

w^(Z,X)=Z⋅eq(X,z)\hat{w}(Z, \bm{X}) = Z \cdot \mathsf{eq}(\bm{X}, \bm{z})w^(Z,X)=Z⋅eq(X,z)

Hence, CRS (Constrained Reed-Solomon) code code can be written as:

CRS[F,L,m,w^,σ]:={f∈RS[F,L,m]:∑b∈{0,1}mw^z(f^(b),b)=σ}\mathsf{CRS}[\mathbb{F}, \mathcal{L}, m, \hat{w}, \sigma] := \left\{ f \in \mathsf{RS}[\mathbb{F}, \mathcal{L}, m] : \sum_{\bm{b} \in \{0, 1\}^m} \hat{w}_z(\hat{f}(\bm{b}), \bm{b}) = \sigma \right\}CRS[F,L,m,w^,σ]:=⎩⎨⎧​f∈RS[F,L,m]:b∈{0,1}m∑​w^z​(f^​(b),b)=σ⎭⎬⎫​

Protocol Explanation

Brief Overview

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=2k = 2k=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}mw^(f^(b),b)=σ\sum_{\bm{b} \in \{0, 1\}^m} \hat{w}(\hat{f}(\bm{b}), \bm{b}) = \sigmab∈{0,1}m∑​w^(f^​(b),b)=σ
  1. The prover provides the verifier with a univariate polynomial h^0\hat{h}_0h^0​ defined as follows to prove the constraint:

h^0(X)=∑b∈{0,1}m−1w^(f^(X,b),X,b)\hat{h}_{0}(X) = \sum_{\bm{b} \in \{0, 1\}^{m-1}} \hat{w}(\hat{f}(X, \bm{b}), X, \bm{b})h^0​(X)=b∈{0,1}m−1∑​w^(f^​(X,b),X,b)
  1. The verifier then checks the following condition and rejects if the two sides are not equal:

h^0(0)+h^0(1)=?σ\hat{h}_0(0) + \hat{h}_0(1) \stackrel{?}= \sigmah^0​(0)+h^0​(1)=?σ
  1. The verifier samples a random α0\alpha_0α0​​ and sends it to the prover.

  2. The prover, using the random value α0\alpha_0α0​, provides the verifier with another univariate polynomial h^1\hat{h}_1h^1​₁ defined as follows:

h^1(X)=∑b∈{0,1}m−2w^(f^(α0,X,b),α0,X,b)\hat{h}_1(X) = \sum_{\bm{b} \in \{0, 1\}^{m-2}} \hat{w}(\hat{f}(\alpha_0, X, \bm{b}), \alpha_0, X, \bm{b})h^1​(X)=b∈{0,1}m−2∑​w^(f^​(α0​,X,b),α0​,X,b)
  1. The verifier checks the following condition and rejects if the two sides are not equal:

h^1(0)+h^1(1)=?h^0(α0)\hat{h}_1(0) + \hat{h}_1(1) \stackrel{?}= \hat{h}_0(\alpha_0)h^1​(0)+h^1​(1)=?h^0​(α0​)
  1. The verifier samples a random value α1\alpha_1α1​​ and sends it to the prover.

  2. The folded polynomial g^\hat{g}g^​ can then be constructed as follows:

g^(X)=f^(α0,α1,X)\hat{g}(\bm{X}) = \hat{f}(\alpha_0, \alpha_1, \bm{X})g^​(X)=f^​(α0​,α1​,X)

Weight Polynomial

Out-Of-Domain Sampling

  1. The verifier samples random value z0←$Fz_0 \stackrel{\$}\leftarrow \mathbb{F}z0​←$F.

  2. The prover sends y0=g^(pow(z0,m−k))y_0 = \hat{g}(\mathsf{pow}(z_0, m - k))y0​=g^​(pow(z0​,m−k)).

Shift queries

  1. The verifier samples random values z1,…,zti←$Liz_1, \dots, z_{t_i} \stackrel{\$}\leftarrow \mathcal{L}_iz1​,…,zti​​←$Li​. The Li\mathcal{L}_iLi​ is the evaluation domain in each round iii, and the value ttt represents the number of queries required in each round iii, determined by the security parameter λ\lambdaλ.

  2. For each i∈[t]i \in [t]i∈[t], the verifier obtains yiy_iyi​ by querying fff:

yi=Fold(f,α0,α1)(zi)y_i = \mathsf{Fold}(f, \alpha_0, \alpha_1 )(z_i)yi​=Fold(f,α0​,α1​)(zi​)

and Fold\mathsf{Fold}Fold is defined as:

Fold(f,αi,…,αj)(y)={Fold(Fold(f,αi),αi+1,…,αj)(y2) if i<jf(x)+f(−x)2+αi⋅f(x)−f(−x)2⋅x if i=j\mathsf{Fold}(f, \alpha_i, \dots, \alpha_{j})(y) = \begin{cases} \mathsf{Fold}(\mathsf{Fold}(f, \alpha_i), \alpha_{i + 1}, \dots, \alpha_{j})(y^2) &\text{ if } i < j \\ \frac{f(x) + f(-x)}{2} +\alpha_i \cdot \frac{f(x) - f(-x)}{2 \cdot x} & \text { if } i = j \end{cases}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)2y = x^2 = (-x)^2y=x2=(−x)2.

Recursive Claims

  1. The verifier samples random value γ←$F\gamma \stackrel{\$}\leftarrow \mathbb{F}γ←$F.

  2. Using the random values and the computed results, the prover and the verifier constructs w^′\hat{w}'w^′ and σ′\sigma'σ′, which will be used in the new CRS[F,L,m−k,w^′,σ′]\mathsf{CRS}[\mathbb{F}, \mathcal{L}, m - k, \hat{w}', \sigma']CRS[F,L,m−k,w^′,σ′].

w^′(Z,X):=w^(Z,α0,…,αk−1,X)+Z⋅∑i=0tγi+1⋅eq(X,zi)σ′:=h^k−1(αk−1)+∑i=0tγi+1⋅yi\hat{w}'(Z, \bm{X}) := \hat{w}(Z, \alpha_0, \dots, \alpha_{k-1}, \bm{X}) + Z \cdot \sum_{i = 0}^t \gamma^{i+1}\cdot \mathsf{eq}(\bm{X}, \bm{z_i}) \\ \sigma' := \hat{h}_{k-1}(\alpha_{k-1}) + \sum_{i = 0}^t \gamma^{i+1} \cdot y_iw^′(Z,X):=w^(Z,α0​,…,αk−1​,X)+Z⋅i=0∑t​γi+1⋅eq(X,zi​)σ′:=h^k−1​(αk−1​)+i=0∑t​γi+1⋅yi​

The Full WHIR Protocol

Parameters

  • a constrained Reed-Solomon code CRS[F,L0,m0,w^0,σ0]\mathsf{CRS}[\mathbb{F}, \mathcal{L}_0, m_0, \hat{w}_0, \sigma_0]CRS[F,L0​,m0​,w^0​,σ0​];

  • an iteration count M∈NM \in \mathbb{N}M∈N;

  • folding parameter k0,…,kM−1k_0, \dots, k_{M-1}k0​,…,kM−1​ such that ∑i=0M−1ki≤m\sum_{i=0}^{M-1}k_i \le m∑i=0M−1​ki​≤m;

  • evaluation domain L1,…,LM−1⊆F\mathcal{L}_1, \dots, \mathcal{L}_{M-1} \sube \mathbb{F}L1​,…,LM−1​⊆F where Li\mathcal{L}_iLi​ is a smooth coset of F∗\mathbb{F}^*F∗ with order ∣Li∣≥2mi|\mathcal{L}_i| \ge 2^{m_i}∣Li​∣≥2mi​;

  • repetition parameters t0,…,tM−1t_0, \dots, t_{M-1}t0​,…,tM−1​ with ti≤∣Li∣t_i \le |\mathcal{L}_i|ti​≤∣Li​∣;

  • define m0:=mm_0 := mm0​:=m and mi:=m−∑j<ikjm_i := m - \sum_{j<i}k_jmi​:=m−∑j<i​kj​;

  • define d∗:=1+deg⁡Z(w^0)+max⁡i∈[m0]deg⁡Xi(w^0)d^* := 1 + \deg_Z(\hat{w}_0) + \max_{i \in [m_0]} \deg_{X_i}(\hat{w}_0)d∗:=1+degZ​(w^0​)+maxi∈[m0​]​degXi​​(w^0​) and d:=max⁡{d∗,3}d := \max \{ d^*, 3\}d:=max{d∗,3}.

Inputs

The verifier has oracle access to f0:L0→Ff_0: \mathcal{L}_0 \rightarrow \mathbb{F}f0​:L0​→F. In the honest case, f0∈CRS[F,L0,m0,w^0,σ0]f_0 \in \mathsf{CRS}[\mathbb{F}, \mathcal{L}_0, m_0, \hat{w}_0, \sigma_0]f0​∈CRS[F,L0​,m0​,w^0​,σ0​] and the prover receives f^0∈F<2[X1,…,Xm]\hat{f}_0 \in \mathbb{F}^{< 2} [X_1, \dots, X_m]f^​0​∈F<2[X1​,…,Xm​] such that f0=f^0(L0)f_0 = \hat{f}_0(\mathcal{L}_0)f0​=f^​0​(L0​) and ∑b∈{0,1}m0w^0(f^0(b),b)=σ0\sum_{\bm{b} \in \{0,1\}^{m_0}} \hat{w}_0(\hat{f}_0(\bm{b}), \bm{b} ) = \sigma_0∑b∈{0,1}m0​​w^0​(f^​0​(b),b)=σ0​.

Query(Prover side)

  1. Initial sumcheck: Set α0:=∅\pmb{\alpha}_0 := \emptysetα0​:=∅. For ℓ=1,…,k0\ell = 1, \dots, k_0ℓ=1,…,k0​:

    1. The prover sends h^0,ℓ∈F<d∗[X]\hat{h}_{0, \ell} \in \mathbb{F}^{< d^*}[X]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)\hat{h}_{0, \ell} := \sum_{\bm{b} \in \{0, 1\}^{m_0 - \ell - 1}} \hat{w}_0(\hat{f}_0(\alpha_0, X, \bm{b}), \bm{\alpha}_0, X, \bm{b})h^0,ℓ​:=∑b∈{0,1}m0​−ℓ−1​w^0​(f^​0​(α0​,X,b),α0​,X,b).

    2. The verifier samples α0,ℓ←F\alpha_{0, \ell} \leftarrow \mathbb{F}α0,ℓ​←F. Append α0,ℓ\alpha_{0, \ell}α0,ℓ​ to set α0\bm{\alpha}_0α0​.

  2. Main loop: For i=1,…,M−1i = 1, \dots, M - 1i=1,…,M−1:

    1. Send folded function: The prover sends fi:Li→Ff_i: \mathcal{L}_i \rightarrow \mathbb{F}fi​:Li​→F. In the honest case, fif_ifi​ is the evaluation of f^i:=f^i−1(αi−1,⋅)\hat{f}_i := \hat{f}_{i-1}(\bm{\alpha}_{i-1}, \cdot)f^​i​:=f^​i−1​(αi−1​,⋅) over Li\mathcal{L}_iLi​.

    2. Out-of-domain sample: The verifier sends zi,0←$Fz_{i, 0} \stackrel{\$}\leftarrow \mathbb{F}zi,0​←$F. Set zi,0:=pow(zi,0,mi)\bm{z}_{i, 0} := \mathsf{pow}(z_{i, 0}, m_i)zi,0​:=pow(zi,0​,mi​).

    3. Out-of-domain reply: The prover sends yi,0∈Fy_{i, 0} \in \mathbb{F}yi,0​∈F. In the honest case, yi,0:=f^i(zi,0)y_{i, 0} := \hat{f}_i(\mathbb{z}_{i, 0})yi,0​:=f^​i​(zi,0​).

    4. Shift message: The verifier samples zi,1,…,zi,ti−1←$Li−1(2ki−1)z_{i, 1}, \dots, z_{i, t_ {i- 1}} \stackrel{\$}\leftarrow \mathcal{L}_{i-1}^{(2^{k_{i - 1}})}zi,1​,…,zi,ti−1​​←$Li−1(2ki−1​)​ and γi←$F\gamma_i \stackrel{\$}\leftarrow \mathbb{F}γi​←$F. Set zi,j:=pow(zi,j,mi)\bm{z}_{i, j} := \mathsf{pow}(z_{i, j}, m_i)zi,j​:=pow(zi,j​,mi​).

    5. Sumcheck rounds: Set α0:=∅\pmb{\alpha}_0 := \emptysetα0​:=∅. For ℓ=1,…,ki\ell = 1, \dots, k_iℓ=1,…,ki​:

      1. The prover sends h^i,ℓ∈F<d[X]\hat{h}_{i, \ell} \in \mathbb{F}^{< d}[X]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)\hat{h}_{i, \ell}(X) := \sum_{\bm{b} \in \{0, 1\}^{m_i - \ell - 1}} \hat{w}_i(\hat{f}_i(\alpha_i, X, \bm{b}), \bm{\alpha}_i, X, \bm{b})h^i,ℓ​(X):=∑b∈{0,1}mi​−ℓ−1​w^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))\hat{w}_i(Z, X_1, \dots, X_{m_i}) := \hat{w}_{i -1}(Z, \bm{\alpha}_{i-1}, X_1, \dots, X_{m_i}) + Z \cdot \sum_{j = 0}^{t_{i-1}}\cdot \mathsf{eq}(\bm{z}_{i, j} , (X_1, \dots, X_{m_i}))w^i​(Z,X1​,…,Xmi​​):=w^i−1​(Z,αi−1​,X1​,…,Xmi​​)+Z⋅∑j=0ti−1​​⋅eq(zi,j​,(X1​,…,Xmi​​)).

      2. The verifier samples αi,ℓ←F\alpha_{i, \ell} \leftarrow \mathbb{F}αi,ℓ​←F. Append αi,ℓ\alpha_{i, \ell}αi,ℓ​ to set αi\bm{\alpha}_iαi​.

  3. Send final polynomial: The prover sends f^M∈F<2[X1,…,XmM]\hat{f}_M \in \mathbb{F}^{<2}[X_1, \dots, X_{m_M}]f^​M​∈F<2[X1​,…,XmM​​]. In the honest case f^M:=f^M−1(αM−1,⋅)\hat{f}_M := \hat{f}_{M-1}(\bm{\alpha}_{M-1}, \cdot)f^​M​:=f^​M−1​(αM−1​,⋅).

  4. Sample final randomness: The verifier samples r1fin,…,rtM−1fin←$LM−1(2kM−1)r_1^{\mathsf{fin}}, \dots, r_{t_{M-1}}^{\mathsf{fin}} \stackrel{\$}{\leftarrow} \mathcal{L}_{M - 1}^{(2^{k _{M - 1}})}r1fin​,…,rtM−1​fin​←$LM−1(2kM−1​)​.

Query(Verifier side)

  1. Check initial sumcheck:

    1. Check that ∑b∈{0,1}h^0,1(b)=σ0\sum_{b \in \{0, 1\}} \hat{h}_{0,1}(b) = \sigma_0∑b∈{0,1}​h^0,1​(b)=σ0​.

    2. Check that ∑b∈{0,1}h^0,ℓ(b)=h^0,ℓ−1(α0,ℓ−1)\sum_{b \in \{0, 1\}} \hat{h}_{0, \ell}(b) = \hat{h}_{0, \ell-1}(\alpha_{0, \ell-1})∑b∈{0,1}​h^0,ℓ​(b)=h^0,ℓ−1​(α0,ℓ−1​) for ℓ∈{2,…,k0}\ell \in \{2, \dots, k_0\}ℓ∈{2,…,k0​}.

  2. Check main loop: For i=1,…,M−1i = 1, \dots, M - 1i=1,…,M−1:

    1. Let gi−1:=Fold(fi−1,αi−1)g_{i-1} := \mathsf{Fold}(f_{i-1}, \bm{\alpha}_{i-1})gi−1​:=Fold(fi−1​,αi−1​).

    2. Compute the points {gi−1(zi,j)}j∈[ti−1]\{g_{i-1}(z_{i, j})\}_{j \in [t_{i-1}]}{gi−1​(zi,j​)}j∈[ti−1​]​ by querying fi−1f_{i-1}fi−1​ at the appropriate locations.

    3. 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)\sum_{b \in \{0, 1\}} \hat{h}_{i,1}(b) = \hat{h}_{i-1, k_{i-1}}(\alpha_{i-1, k_{i - 1}}) + \gamma_i \cdot y_{i, 0} + \sum_{j=1}^{t_{i-1}} \cdot g_{i-1}(z_{i, j})∑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​).

    4. Check that ∑b∈{0,1}h^i,ℓ(b)=h^i,ℓ−1(αi,ℓ−1)\sum_{b \in \{0, 1\}} \hat{h}_{i, \ell}(b) = \hat{h}_{i, \ell -1}(\alpha_{i, \ell - 1})∑b∈{0,1}​h^i,ℓ​(b)=h^i,ℓ−1​(αi,ℓ−1​) for every ℓ∈{2,…,ki}\ell \in \{2, \dots, k_i\}ℓ∈{2,…,ki​}.

  3. Check final polynomial:

    1. Check that, for every ℓ∈[tM−1]\ell \in [t_{M-1}]ℓ∈[tM−1​], f^M(rℓfin)=gM−1(rℓfin)\hat{f}_M(\bm{r}^{\mathsf{fin}}_\ell) = g_{M-1}(r^{\mathsf{fin}}_\ell)f^​M​(rℓfin​)=gM−1​(rℓfin​) where rℓfin:=pow(rℓfin,mM)\bm{r}_\ell^{\mathsf{fin}} := \mathsf{pow}(r^\mathsf{fin}_\ell, m_M)rℓfin​:=pow(rℓfin​,mM​).

    2. For i=1,…,M−1i = 1, \dots, M - 1i=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)\hat{w}_i(Z, X_1, \dots, X_{m_i}) := \hat{w}_{i-1}(Z, \bm{\alpha}_{i-1}, X_1, \dots, X_{m_i}) + Z \cdot \sum_{j=0}^{t_{i-1}} \gamma_i^{j+1} \cdot \mathsf{eq}(\bm{z}_{i,j}, X_1, \dots, X_{m_i})w^i​(Z,X1​,…,Xmi​​):=w^i−1​(Z,αi−1​,X1​,…,Xmi​​)+Z⋅∑j=0ti−1​​γij+1​⋅eq(zi,j​,X1​,…,Xmi​​)

    3. Check that ∑b∈{0,1}mMw^M−1(f^M(b),αM−1,b)=h^M−1,kM−1(αM−1,kM−1)\sum_{\bm{b} \in \{0, 1\}^{m_M}} \hat{w}_{M-1}(\hat{f}_M(\bm{b}), \bm{\alpha}_{M-1}, \bm{b}) = \hat{h}_{M-1, k_{M-1}}(\alpha_{M-1, k_{M-1}})∑b∈{0,1}mM​​w^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 kkk rounds of sumcheck, kkk variables can be eliminated, reducing the degree by kkk. This is the folding method used in WHIR, differing from the kkk-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 .

Written by from

WHIR
STIR
STIR
Basefold
Basefold
STIR
Sumcheck protocol
ZK Summit 12 presentation
this discussion
https://gfenzi.io/papers/whir/
A41
ryan Kim