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
  • Protocol Explanation
  • Conclusion
Export as PDF
  1. ZK
  2. STARK

STIR

This article outlines the goal and process of the STIR (Shift To Improve Rate) protocol as intuitively as possible.

PreviousDEEP FRINextWHIR

Last updated 3 months ago

Introduction

has achieved the fewest number of queries among IOPP (Interactive Oracle Proof of Proximity) systems based on RS codes. To achieve λ\lambdaλ-bit security, the query complexity, which was O(λlog⁡d)O(\lambda \log d)O(λlogd) in the traditional FRI, can be reduced to O(log⁡d+λlog⁡log⁡d)O(\log d + \lambda \log \log d)O(logd+λloglogd). As the number of queries decreases, the verifier time also decreases, and particularly, the number of verifier hash operations is reduced. In the FRI family, proofs are often generated recursively, and reducing the constraints on the verifier hash in recursive proofs is particularly meaningful. Thanks to this optimization, the corresponding research paper was awarded Best Paper at CRYPTO 2024.

Background

In coding theory, a code is a set of rules or patterns used to encode information, particularly to detect and correct errors that might occur during data transmission or storage. A codeword is an individual element within a code, representing a specific valid encoded message according to the code's rules.

Now, let’s briefly talk about RS (Reed-Solomon) codes. RS can be expressed as RS(F,N,d)\mathsf{RS}(\mathbb{F}, N, d)RS(F,N,d), where F\mathbb{F}F is the field, NNN is the size of the evaluation domain, and ddd is the maximum degree of the polynomial PPP. A codeword consists of the values evaluated from the polynomial PPP over NNN.

An Interactive Oracle Proof of Proximity (IOPP) is a framework used to verify that a large dataset or computation is close to a specific structure (such as a low-degree polynomial) without requiring an exhaustive check of the entire dataset. In an IOPP, only a few random queries are made, meaning the verifier does not have direct access to the entire function. Instead, it verifies proximity—checking whether the function is sufficiently close to the intended structure.

Protocol Explanation

STIR implements each round using four different techniques:

When creating the codeword, FRI and STIR use domains of different sizes, resulting in a different rate, as shown in the table below. This difference allows for fewer queries to achieve the same security level.

FRI
STIR

The figure above illustrates the differences in argument size, verifier hash complexity, prover time, and verifier time between the FRI and STIR protocol at different rates. From the above graph, the following facts can be observed:

  • The argument size and verifier hash complexity of STIR is smaller than that of FRI, and it decreases further as the degree increases.

  • The prover time of STIR is slightly slower than that of FRI.

  • When the degree is small, the verifier time of STIR is slower than FRI, but as the degree increases, it becomes faster.

Conclusion

Codewords must correspond to polynomials of (at most) a prescribed degree d or else be classified as invalid. In the example above, our required ddd is 1. Since the red codeword in the rightmost figure has a degree of 2, it does not satisfy the condition of being a degree of 1 and is therefore invalid; however as the red codewords in the middle two graphs are of degree 1, they are valid. From this, we can infer that given NNN and ddd, uniquely valid codewords must differ from each other by at least N−dN - dN−d (3 in this example) values.

Now, imagine that a function is δ\deltaδ-far from the code. This means that there is a fraction δ=N−dN=1−dN\delta = \frac{N - d}{ N} = 1 - \frac{d}{ N}δ=NN−d​=1−Nd​ of the function’s values that deviate from what would be expected if it belonged to the code. The remaining 1−δ1−\delta1−δ portion agrees with the code, meaning that these points behave as if the function were correct.

When the verifier makes only a limited number of queries, there’s a chance it might sample only from the portion of the function that agrees with the code—the 1−δ1−\delta1−δ part. If the verifier’s queries happen to avoid the parts where the function diverges (the δ\deltaδ-far parts), completeness would require the verifier to conclude that the function is close to the code.

This is why, with a limited number of queries, there’s a trade-off: more queries increase confidence that the function is close to the code, while fewer queries make it easier for the function to “pass” without actually being in close proximity. This is why the probability (1−δ)t(1−\delta)^t(1−δ)t becomes significant, where ttt is the number of queries. This probability is known as the soundness error, and reducing it enhances the protocol’s security. Here rate ρ is defined as d+1N\frac{d + 1}{ N}Nd+1​, so δ≈1−ρ\delta \approx 1 - \rhoδ≈1−ρ. Therefore, lowering the rate preserves security while minimizing the number of queries required.

Here, mmm represents each round, and kkk is a constant that is a power of 2.

1. kkk-fold: This method creates a degree dk\frac{d}{ k}kd​ polynomial ggg from a degree d polynomial fff using random values, with the following features.

The verifier should be able to compute the next round’s evaluations using kkk evaluations obtained from the previous round.

The distance between fff and ggg should be preserved with high probability.

folded degree at round

domain size at round

rate at round

2. Quotienting: After creating a polynomial through kkk-folding, its validity needs to be checked. Since FRI and STIR use domains of different sizes, the method used in FRI cannot be applied here. Instead, as shown in the diagram below, a method called Quotienting is used with the following features:

The verifier should be able to compute Quotient(x)\mathsf{Quotient}(x)Quotient(x) from a sampled point x in the domain excluding SSS in F\mathbb{F}F.

Suppose that every codeword close to f disagrees from p^\hat{p}p^​ (which is derived from ppp and SSS). Then Quotient(f,S,p)\mathsf{Quotient}(f, S, p)Quotient(f,S,p) is far from the code.

3. Out Of Domain Sampling: Multiple polynomials may satisfy the conditions above, so out of domain sampling narrows it down to the one unique polynomial. To do this, additional random points are added to the subdomain SSS used in Quotienting, and values from substituting f at these points are added to ppp.

4. Degree Correction: The degree of the Quotient polynomial becomes deg⁡(f)−∣S∣\deg(f) - |S|deg(f)−∣S∣, which isn’t a power of 2 as required at the beginning of each round. Therefore, a technique is needed to adjust it to a power of 2, called Degree Correction. It maintains the following characteristics:

The verifier should be able to compute DegCor(f)\mathsf{DegCor}(f)DegCor(f) from fff.

The distance between fff and DegCor(f)\mathsf{DegCor}(f)DegCor(f) should be preserved with high probability.

(The argument size can be found at this , and it can be considered equivalent to the proof size.)

In conclusion, these four techniques collectively reduce the rate, enabling a reduction in the number of queries. This approach is referred to as "Shift," resulting in the protocol name of STIR (Shift To Improve Rate). Recently, the same authors of the STIR paper presented a new technique called , which was introduced at zkSummit 12, so interested readers may consider watching the presentation. I’ve skipped the explanation of how STIR achieves O(log⁡d+λlog⁡log⁡d)O(\log d + \lambda \log \log d)O(logd+λloglogd). For those interested in the details, please refer to sections C.1 and C.2 of the paper.

Written by from

Reviewed by from

mmm
dkm\frac{d}{k ^ m}kmd​
dkm\frac{d}{k ^ m}kmd​
mmm
Nkm\frac{N}{k ^ m}kmN​
N2m\frac{N}{2 ^ m}2mN​
mmm
d+1N=ρ\frac{d+1}{N} = \rhoNd+1​=ρ
d+1N⋅(2k)m=ρ⋅(2k)m\frac{d+1} {N} \cdot (\frac{2}{k})^m = \rho \cdot (\frac{2}{k})^mNd+1​⋅(k2​)m=ρ⋅(k2​)m
link
Giacomo Fenzi
EPFL
WHIR
STIR
A41
ryan Kim
Fig 1. The blue points represent an RS(F,N,2)\mathsf{RS}(\mathbb{F}, N, 2)RS(F,N,2) codeword, where NNN, the evaluation domain, has a size of 4. From left to right, if we label the graphs as 1 through 4, then graphs 2 and 3 illustrate possible valid RS(F,N,2)\mathsf{RS}(\mathbb{F}, N, 2)RS(F,N,2) codewords. In contrast, the red points in graph 4 depict an invalid RS(F,N,2)\mathsf{RS}(\mathbb{F}, N, 2)RS(F,N,2) codeword due to the degree constraint. The purple points indicate intersections between the blue and red lines.
Fig 2. A simple diagram of the query phase of the FRI(left) and STIR(right) protocol.
Fig 3. Description of univariate function quotienting
Fig 4. Description of degree correction
Fig 5. Comparison of FRI and STIR at different ρ\rhoρ. Lower is better.