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
  • Brief recap of FRI
  • COMMIT phase:
  • QUERY phase: (executed by the Verifier)
  • Properties
  • Understanding the Soundness
  • Improvements in the soundness lower bound
  • DEEP FRI
  • Quotienting
  • COMMIT phase:
  • QUERY phase: (executed by the Verifier)
  • Resulting soundness
  • Final Remarks
  • References:
Export as PDF
  1. ZK
  2. STARK

DEEP FRI

Brief recap of FRI

In FRI, our starting point is an input function f(0):L(0)→Ff^{(0)} : \mathcal{L}^{(0)} \rightarrow \mathbb{F}f(0):L(0)→F where F\mathbb{F}F is a finite field, L(0)⊂F\mathcal{L}^{(0)} \subset \mathbb{F}L(0)⊂F is the evaluation domain. The FRI protocol is a two-phase protocol (the two phases are called COMMIT and QUERY) that convinces a verifier that f(0)f^{(0)}f(0) is close to the Reed-Solomon code RS[F,L(0),ρ]\mathsf{RS}[\mathbb{F}, \mathcal{L}^{(0)}, \rho]RS[F,L(0),ρ].

COMMIT phase:

  1. For i=0i = 0i=0 to r−1r - 1r−1:

    1. The verifier picks uniformly random βi∈F\beta_i \in \mathbb{F}βi​∈F and sends it to the prover.

    2. The prover sends a merkle proof of a function f(i+1):L(i+1)→Ff^{(i+1)} : \mathcal{L}^{(i+1)} \rightarrow \mathbb{F}f(i+1):L(i+1)→F. (In the case of an honest prover, f(i+1)=feven(i)+βifodd(i)f^{(i+1)} = f^{(i)}_{\mathsf{even}} + \beta_if^{(i)}_{\mathsf{odd}}f(i+1)=feven(i)​+βi​fodd(i)​).

  2. The prover sends a value C∈FqC \in \mathbb{F}_qC∈Fq​. (In the case of an honest prover, f(r)f^{(r)}f(r) is the constant function with value = CCC).

QUERY phase: (executed by the Verifier)

  1. Repeat lll times:

    1. Pick x0∈L(0)x_0 \in \mathcal{L}^{(0)}x0​∈L(0) uniformly at random.

    2. For i=0i = 0i=0 to r−1r - 1r−1:

      1. Define xi+1∈L(i+1)x_{i+1} \in \mathcal{L}^{(i+1)}xi+1​∈L(i+1) by xi+1=xi2x_{i+1} = x_i^2xi+1​=xi2​.

      2. Query f(i)f^{(i)}f(i) at xix_ixi​ and −xi-x_i−xi​ to compute feven(i)(xi+1)f^{(i)}_{\mathsf{even}}(x_{i+1})feven(i)​(xi+1​) and fodd(i)(xi+1)f^{(i)}_{\mathsf{odd}}(x_{i+1})fodd(i)​(xi+1​).

      3. Query f(i+1)(xi+1)f^{(i+1)}(x_{i+1})f(i+1)(xi+1​) and if feven(i)(xi+1)+βifodd(i)(xi+1)≠f(i+1)(xi+1)f^{(i)}_{\mathsf{even}}(x_{i+1}) + \beta_i f^{(i)}_{\mathsf{odd}}(x_{i+1})\neq f^{(i+1)}(x_{i+1})feven(i)​(xi+1​)+βi​fodd(i)​(xi+1​)=f(i+1)(xi+1​), then REJECT.

  2. If f(r)(xr)≠Cf^{(r)}(x_r) \neq Cf(r)(xr​)=C, then REJECT.

  3. ACCEPT

Properties

  • Prover time ≤6n\leq 6n≤6n, proof length ≤n3\leq \frac{n}{3}≤3n​

  • Verifier time ≤21log⁡n\leq 21 \log n≤21logn, query complexity ≤2log⁡n\leq 2 \log n≤2logn

  • Round complexity = log⁡n2\frac{\log n}{2}2logn​

  • Soundness: Rejection probability of δ\deltaδ-far words ≈δ−o(1)\approx\delta-o(1)≈δ−o(1) (which basically means it is a bit smaller but that is ignorable), for sufficiently small δ<δ0\delta < \delta_0δ<δ0​

    • A word www is said to be δ\deltaδ-far from the code C\mathcal{C}C if its Hamming distance from every codeword in C\mathcal{C}C is at least δn\delta nδn)

    • δ0\delta_0δ0​ is a positive constant that depends mainly on the code rate.

  • In other words: Probability of rejecting δ\deltaδ-far word is approximately min⁡(δ,δ0)\min(\delta, \delta_0)min(δ,δ0​).

Understanding the Soundness

The soundness of a proximity testing protocol can be described by a soundness function s(⋅)s(\cdot)s(⋅) that takes as input a proximity parameter δ\deltaδ, and outputs the minimum rejection probability of the verifier, where this minimum is taken over all words that are δ\deltaδ-far from the code.

s(δ)=min⁡{∀w s.t Δ(w,C)≥δ:Prrej(w)}s(\delta)= \min\{\forall w \text{ s.t }\Delta(w, \mathcal{C})\geq \delta: \mathsf{Pr}_{rej}(w)\}s(δ)=min{∀w s.t Δ(w,C)≥δ:Prrej​(w)}

where Prrej(w)Pr_{rej}(w)Prrej​(w) is the rejection probability of the word www.

min⁡(δ0,δ)−o(1)≤s(δ)≤δ\min(\delta_0, \delta) - o(1) \leq s(\delta)\leq \deltamin(δ0​,δ)−o(1)≤s(δ)≤δ

For codes of ho≥1/3ho \geq 1/3ho≥1/3, δ0\delta_0δ0​ becomes non-positive so the FRI protocol becomes meaningless. Even when considering the ideal case of ho→0⇒δ0→1/4ho \rightarrow 0\Rightarrow \delta_0 \rightarrow 1/4ho→0⇒δ0​→1/4. This rather low soundness means that many tests must be applied in order to reach a target soundness error. For example, to achieve a target soundness error of 2−λ2^{-\lambda}2−λ, then how many tests do we need?

min rejection probability s(δ)≥1/4⇒max acceptance probability after l queries ≤(1−14)l\text{min rejection probability } s(\delta)\geq 1/4 \Rightarrow \text{max acceptance probability after }l \text{ queries } \leq(1-\frac{1}{4})^lmin rejection probability s(δ)≥1/4⇒max acceptance probability after l queries ≤(1−41​)l
(1−14)l≤2−λ⇒l⋅log234≤−λ⇒l≥−λlog⁡234≈2.4λ(1-\frac{1}{4})^l \leq 2^{-\lambda}\Rightarrow l\cdot log_2\frac{3}{4}\leq-\lambda\Rightarrow l \geq-\frac{\lambda}{\log_2{\frac{3}{4}}}\approx2.4\lambda(1−41​)l≤2−λ⇒l⋅log2​43​≤−λ⇒l≥−log2​43​λ​≈2.4λ

This shows that for 128-bit security, we need more than 300 queries. So to reduce this number, we need to have a better soundness lower bound.

Improvements in the soundness lower bound

Following the limitations of FRI, there were some works that improved upon the δ0\delta_0δ0​.

δ0≈1−3ρ4⇒l≥2.4λ\delta_0 \approx \frac{1-3\rho}{4} \Rightarrow l \geq 2.4\lambdaδ0​≈41−3ρ​⇒l≥2.4λ
δ0≈1−ρ4⇒l≥4λlog⁡1ρ\delta_0 \approx 1-\sqrt[4]{\rho}\Rightarrow l\geq\frac{4\lambda}{\log\frac{1}{\rho}}δ0​≈1−4ρ​⇒l≥logρ1​4λ​
  1. Improved bound from Lemma 3.1 of [BGKS20]:

δ0≈1−ρ3⇒l≥3λlog⁡1ρ\delta_0\approx 1-\sqrt[3]{\rho}\Rightarrow l\geq \frac{3\lambda}{\log\frac{1}{\rho}}δ0​≈1−3ρ​⇒l≥logρ1​3λ​

From the second result, we can see that when ho→0ho \rightarrow 0ho→0, δ0→1\delta_0 \rightarrow 1δ0​→1 which is a big improvement for the soundness of FRI. Building on top of that, Lemma 3.1 improved the number of tests required for λ\lambdaλ bit security from 4λlog⁡1ρ\frac{4\lambda}{\log\frac{1}{\rho}}logρ1​4λ​ to 3λlog⁡1ρ\frac{3\lambda}{\log\frac{1}{\rho}}logρ1​3λ​ which is ~25% less.

In addition, Lemma 3.1 is shown to be tight under a special case:

  1. F\mathbb{F}F is a binary field

  2. ho=1/8ho = 1/8ho=1/8 precisely

  3. Evaluation domain DDD equals all of F\mathbb{F}F

Therefore, we needed something different to break this soundness barrier and the DEEP (Domain Extension for Eliminating Pretenders) method was introduced.

DEEP FRI

First, what do we mean by “pretenders”? Let's say a malicious prover has a very large degree polynomial that agrees on all of L(0)\mathcal{L}^{(0)}L(0) with a low-degree polynomial. Then how does the verifier differentiate between such pretenders and an actual low-degree polynomial? If we sample x0∈L(0)x_0\in \mathcal{L}^{(0)}x0​∈L(0), we won't find any discrepancies. Therefore, we attempt to sample outside the evaluation domain using quotient functions.

Quotienting

If f(0)f^{(0)}f(0) is indeed evaluations of low-degree polynomial P(X)P(X)P(X) on DDD then verifier should be able to query PPP on an arbitrary z∈Fz\in\mathbb{F}z∈F. Suppose the prover claims P(z)=aP(z)=aP(z)=a, then P(X)−aP(X) - aP(X)−a is divisible by X−zX-zX−z so let's denote it as:

QUOTIENT(P,z,a)=P(X)−aX−z\mathsf{QUOTIENT}(P, z, a) = \frac{P(X) - a}{X-z}QUOTIENT(P,z,a)=X−zP(X)−a​

COMMIT phase:

  1. For i=0i = 0i=0 to r−1r - 1r−1:

    1. The verifier picks uniformly random βi,zi∈F\beta_i, z_i \in \mathbb{F}βi​,zi​∈F.

    2. The prover sends feven(i)(zi)+βifodd(i)(zi)=af^{(i)}_{even}(z_i) + \beta_i f^{(i)}_{odd}(z_i)=afeven(i)​(zi​)+βi​fodd(i)​(zi​)=a.

    3. The prover sends a merkle proof of a function f(i+1):L(i+1)→Ff^{(i+1)} : L^{(i+1)} \rightarrow \mathbb{F}f(i+1):L(i+1)→F. (In the case of an honest prover, f(i+1)(X)=QUOTIENT(feven(i)(X)+βifodd(i)(X),zi,a))f^{(i+1)}(X)=\mathsf{QUOTIENT}(f^{(i)}_{\mathsf{even}}(X) + \beta_i f^{(i)}_{\mathsf{odd}}(X), z_i, a))f(i+1)(X)=QUOTIENT(feven(i)​(X)+βi​fodd(i)​(X),zi​,a)).

  2. The prover sends a value C∈FqC \in \mathbb{F}_qC∈Fq​. (In the case of an honest prover, f(r)f^{(r)}f(r) is the constant function with value = CCC).

QUERY phase: (executed by the Verifier)

  1. Repeat lll times:

    1. Pick x0∈L(0)x_0 \in \mathcal{L}^{(0)}x0​∈L(0) uniformly at random.

    2. For i=0i = 0i=0 to r−1r - 1r−1:

      1. Define xi+1∈L(i+1)x_{i+1} \in \mathcal{L}^{(i+1)}xi+1​∈L(i+1) by xi+1=xi2x_{i+1} = x_i^2xi+1​=xi2​.

      2. Query f(i)f^{(i)}f(i) at xix_ixi​ and −xi-x_i−xi​ to compute fodd(i)(xi+1)f^{(i)}_{\mathsf{odd}}(x_{i+1})fodd(i)​(xi+1​) and feven(i)(xi+1)f^{(i)}_{\mathsf{even}}(x_{i+1})feven(i)​(xi+1​).

      3. If (feven(i)(xi+1)+βifodd(i)(xi+1))−a(xi+1−zi)≠f(i+1)(xi+1)\frac{(f^{(i)}_{\mathsf{even}}(x_{i+1}) + \beta_i f^{(i)}_{\mathsf{odd}}(x_{i+1})) - a}{(x_{i+1} - z_i)}\neq f^{(i+1)}(x_{i+1})(xi+1​−zi​)(feven(i)​(xi+1​)+βi​fodd(i)​(xi+1​))−a​=f(i+1)(xi+1​), then REJECT.

  2. If f(r)(xr)≠Cf^{(r)}(x_r) \neq Cf(r)(xr​)=C, then REJECT.

  3. ACCEPT

Resulting soundness

As a result of applying the DEEP technique, the soundness claim was improved to:

δ0≈1−ρ⇒l≥2λlog⁡1ρ\delta_0 \approx 1-\sqrt{\rho}\Rightarrow l\geq \frac{2\lambda}{\log\frac{1}{\rho}}δ0​≈1−ρ​⇒l≥logρ1​2λ​

Final Remarks

References:

BBHR17

BBHR18b

BKS18

BGKS20

BCIKS2023

PreviousFRI Security Features and OptimizationsNextSTIR

Last updated 3 months ago

For V=RS[F,D,ρ]V=\mathsf{RS}[\mathbb{F}, D, \rho]V=RS[F,D,ρ] where DDD is an FFT-friendly domain (subgroup of size n=2kn=2^kn=2k), showed that FRI satisfies the following:

In the case of FRI soundness for a single test, an upper bound s(δ)≤δs(\delta) \leq \deltas(δ)≤δ is easy to establish but the more important part is establishing a lower bound. The initial analysis in showed a nearly matching lower bound for sufficiently small values of δ\deltaδ. In particular, the bound obtained there gives s(δ)≥min⁡{δ,δ0}−o(1)s(\delta) \geq \min\{\delta,\delta_0\} - o(1)s(δ)≥min{δ,δ0​}−o(1) where δ0≈1−3ρ4\delta_0 \approx \frac{1-3 \rho}{4}δ0​≈41−3ρ​.

Original FRI paper []:

Worst-to-average case reduction []:

The special case for tightness of the lower bound in Lemma 3.1 is something we can ignore. If we assume that the length of the code nnn is much smaller than the size of the field qqq (which is the case for practical STARK implementations), this bound can be improved significantly. Investigating this further, the authors of figured that when working with RS code over a sufficiently large field—polynomially large in the code’s blocklength—and when δ∈(0,1−ρ)\delta \in (0, 1 - \sqrt{\rho})δ∈(0,1−ρ​), the average-case distance is almost the same as the worst-case distance. With this, they claim that FRI can achieve the same soundness as DEEP FRI without its added prover complexities. However, the out-of-domain sampling method introduced in this paper is still used widely to improve the soundness of the underlying protocol (for example STIR).

Eli Ben-Sasson, Iddo Bentov, Ynon Horesh, and Michael Riabzev. 2018. Fast Reed-Solomon interactive oracle proofs of proximity. In Proceedings of the 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018). Retrieved from

Eli Ben-Sasson, Iddo Bentov, Ynon Horesh, and Michael Riabzev. Fast Reed-Solomon Interactive Oracle Proofs of Proximity. In Proceedings of the 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018). Retreived from

Eli Ben-Sasson, Swastik Kopparty, and Shubhangi Saraf. 2018. Worst-case to average case reductions for the distance to a code. In Proceedings of the 33rd Computational Complexity Conference. 24:1–24:23. DOI: LIPIcs.CCC.2018.24

Eli Ben-Sasson, Lior Goldberg, Swastik Kopparty, and Shubhangi Saraf. 2020. DEEP-FRI: Sampling outside the box improves soundness. In Proceedings of the 11th Innovations in Theoretical Computer Science Conference (LIPIcs), Thomas Vidick (Ed.), Vol. 151. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 5:1–5:32. DOI:. ITCS.2020.5

Eli Ben-Sasson, Dan Carmon, Yuval Ishai, Swastik Kopparty, and Shubhangi Saraf. 2023. Proximity Gaps for Reed–Solomon Codes. J. ACM 70, 5, Article 31 (October 2023), 57 pages.

Written by from

BBHR17
BBHR18b
BBHR17
BKS18
BCIKS2023
https://eccc.weizmann.ac.il/report/2017/134
https://drops.dagstuhl.de/storage/00lipics/lipics-vol107-icalp2018/LIPIcs.ICALP.2018.14/LIPIcs.ICALP.2018.14.pdf
https://doi.org/10.4230/
https://doi.org/10.4230/LIPIcs
https://doi.org/10.1145/3614423
A41
Batzorig Zorigoo