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
  • Embedding Overhead
  • Binary Field
  • Protocol Explanation
  • Block-level Encoding-based PCS
  • Pack Virtual Polynomial
  • Shift Virtual Polynomial
  • Conclusion
Export as PDF
  1. ZK
  2. STARK

Binius

This article aims to intuitively explain the objectives and process of the Binius protocol.

PreviousBasefoldNextBrakedown

Last updated 3 months ago

Introduction

In recent STARKs, there has been a trend of using smaller fields to achieve faster performance, such as Goldilocks (64-bit) and smaller 32-bit fields like Baby Bear and Mersenne 31. Naturally, this leads to the question: Can we use the smallest field, the binary field?

Given that computers are optimized for bit operations, using a binary field could promise better performance. Additionally, if we can express constraints efficiently using the binary field, this would allow us to handle binary operations in commonly used hash functions like Keccak more effectively.

While the paper attempted to use binary fields, it faced challenges:

  1. The binary field was too small to serve as an "alphabet" in Reed-Solomon (RS) codes compared to the block length, necessitating embedding.

  2. As noted in , using a shift function to traverse the entire evaluation domain introduced overhead.

This article will explore how overcomes these issues.

Background

Embedding Overhead

Embedding overhead refers to the inefficiency caused when representing values smaller than a given field F\mathbb{F}F and filling the space difference with zero padding or similar techniques. This overhead often occurs during range checks or when binary operations are arithmetized.

Binary Field

Addition in a binary field operates as follows:

0+0≡0(mod2)0+1≡1(mod2)1+0≡1(mod2)1+1≡0(mod2)0 + 0 \equiv 0 \pmod 2 \\ 0 + 1 \equiv 1 \pmod 2 \\ 1 + 0 \equiv 1 \pmod 2 \\ 1 + 1 \equiv 0 \pmod 2 \\0+0≡0(mod2)0+1≡1(mod2)1+0≡1(mod2)1+1≡0(mod2)

This is equivalent to the XOR operation. Since x + (-x) = 0 defines -x as the negative of x, and 0 + 0 = 0 and 1 + 1 = 0, the negative of any element in a binary field is the element itself. In other words, subtraction is equivalent to addition:

0−0=0+0≡0(mod2)0−1=0+1≡1(mod2)1−0=1+0≡1(mod2)1−1=1+1≡0(mod2)0 - 0 = 0 + 0 \equiv 0 \pmod 2 \\ 0 - 1 = 0 + 1 \equiv 1 \pmod 2 \\ 1 - 0 = 1 + 0 \equiv 1 \pmod 2 \\ 1 - 1 = 1 + 1 \equiv 0 \pmod 20−0=0+0≡0(mod2)0−1=0+1≡1(mod2)1−0=1+0≡1(mod2)1−1=1+1≡0(mod2)

Furthermore, a doubling operation such as 2⋅a2 \cdot a2⋅a always equals 0, since it becomes a multiple of 2. Multiplication in a binary field is therefore defined as follows:

0⋅0≡0(mod2)0⋅1≡0(mod2)1⋅0≡0(mod2)1⋅1≡1(mod2)0 \cdot 0 \equiv 0 \pmod 2 \\ 0 \cdot 1 \equiv 0 \pmod 2 \\ 1 \cdot 0 \equiv 0 \pmod 2 \\ 1 \cdot 1 \equiv 1 \pmod 20⋅0≡0(mod2)0⋅1≡0(mod2)1⋅0≡0(mod2)1⋅1≡1(mod2)

This is equivalent to the AND operation.

Binary Tower

T0:=F2T1:=T0[X0]/(X02+X0+1)≅F22T2:=T1[X1]/(X12+X1X0+1)≅F24T3:=T2[X2]/(X22+X2X1+1)≅F28⋯Tι:=Tι−1[Xι−1]/(Xι−12+Xι−1Xι−2+1)≅F22ιT_0 := \mathbb{F}_2 \\T_1 := T_0[X_0] / (X_0^2 + X_0 + 1) \cong \mathbb{F}_{2^2}\\T_2 := T_1[X_1] / (X_1^2 + X_1 X_0 + 1) \cong \mathbb{F}_{2^4} \\T_3 := T_2[X_2] / (X_2^2 + X_2 X_1 + 1) \cong \mathbb{F}_{2^8}\\ \cdots \\T_\iota := T_{\iota - 1}[X_{\iota - 1}] / (X_{\iota-1}^2 + X_{\iota-1} X_{\iota - 2} + 1) \cong \mathbb{F}_{2^{2^\iota}}T0​:=F2​T1​:=T0​[X0​]/(X02​+X0​+1)≅F22​T2​:=T1​[X1​]/(X12​+X1​X0​+1)≅F24​T3​:=T2​[X2​]/(X22​+X2​X1​+1)≅F28​⋯Tι​:=Tι−1​[Xι−1​]/(Xι−12​+Xι−1​Xι−2​+1)≅F22ι​

This can be illustrated as follows:

For example, let’s represent 135 using a binary tower. Here, X2X_2X2​ corresponds to 242^424, X1X_1X1​ ​corresponds to 222^222, and X0X_0X0​​ corresponds to 222:

135=X2X1X0+X1+X0+1∵135=24⋅22⋅2+22+2+1135 =X_2X_1X_0 + X_1 + X_0 + 1 \because 135 = 2^4\cdot2^2\cdot2 + 2^2 + 2 +1 \\135=X2​X1​X0​+X1​+X0​+1∵135=24⋅22⋅2+22+2+1

By continually substituting XiX_iXi​​ with Xi−1X_{i-1}Xi−1​​, we can transform it into the form of a multilinear polynomial:

hX1+l∈T2≅F24, where h,l∈T1≅F22=(h1X0+h2)X1+(l1X0+l2)=h1X1X0+h2X1+l1X0+l2, where hi,li∈T0≅F2\begin{align*} & h X_1 + l \in T_2 \cong \mathbb{F}_{2^4} \text{, where }h,l \in T_1 \cong \mathbb{F}_{2^2} \\ &= (h_1X_0 + h_2)X_1 + (l_1X_0 + l_2) \\ &= h_1X_1X_0 + h_2X_1 +l_1X_0 + l_2\text{, where } h_i, l_i \in T_0 \cong \mathbb{F}_2 \\ \end{align*}​hX1​+l∈T2​≅F24​, where h,l∈T1​≅F22​=(h1​X0​+h2​)X1​+(l1​X0​+l2​)=h1​X1​X0​+h2​X1​+l1​X0​+l2​, where hi​,li​∈T0​≅F2​​

The equation above shows how we can transform a case of T2T_2T2​ to a multilinear polynomial, while the equation below shows how we can transform a case of T3T_3T3​ to a multilinear polynomial.

hX2+l∈T3≅F28, where h,l∈T2≅F24=(h1X1+h2)X2+l1X1+l2, where hi,li∈T1≅F22 if i≤2=((h3X0+h4)X1+h5X0+h6)X2+(l3X0+l4)X1+l5X0+l6=h3X2X1X0+h4X2X1+h5X2X0+h6X2+l3X1X0+l4X1+l5X0+l6,where hi,li∈T0≅F2 if i>2\begin{align*} & hX_2 + l \in T_3 \cong \mathbb{F}_{2^8} \text{, where } h, l \in T_2 \cong \mathbb{F}_{2^4} \\ &= (h_1X_1 + h_2)X_2 + l_1X_1 + l_2 \text{, where } h_i, l_i \in T_1 \cong \mathbb{F}_{2^2} \text{ if } i \le 2 \\ &= ((h_3X_0 + h_4)X_1 + h_5X_0 + h_6)X_2 + (l_3X_0 + l_4)X_1 + l_5X_0 + l_6 \\ &= h_3X_2X_1X_0 + h_4X_2X_1 + h_5X_2X_0+h_6X_2+l_3X_1X_0 + l_4X_1 + l_5X_0 + l_6 \text{,} \\ &\text{where } h_i, l_i \in T_0 \cong \mathbb{F}_2 \text{ if } i > 2 \end{align*}​hX2​+l∈T3​≅F28​, where h,l∈T2​≅F24​=(h1​X1​+h2​)X2​+l1​X1​+l2​, where hi​,li​∈T1​≅F22​ if i≤2=((h3​X0​+h4​)X1​+h5​X0​+h6​)X2​+(l3​X0​+l4​)X1​+l5​X0​+l6​=h3​X2​X1​X0​+h4​X2​X1​+h5​X2​X0​+h6​X2​+l3​X1​X0​+l4​X1​+l5​X0​+l6​,where hi​,li​∈T0​≅F2​ if i>2​

This allows for the canonical mapping of bitstrings. (For example, in F7\mathbb{F}_7F7​ the 3-bit space maps both 0 and 7 to 0.)

v=∑i=02i−1bi⋅2iv = \sum_{i = 0}^{2^i - 1} b_i \cdot 2^iv=i=0∑2i−1​bi​⋅2i

Here, the set of bib_ibi​ are coefficients of a multilinear polynomial.

In the extension field, addition can be performed using XOR as in the binary field. However, for multiplication, the following steps must be used:

  1. Multiply both sides (for i≥0i \geq 0i≥0):

(aXi+b)(cXi+d)=acXi2+(ad+bc)Xi+bd(aX_i + b)(cX_i + d) = ac{X_i}^2 + (ad + bc)X_i + bd(aXi​+b)(cXi​+d)=acXi​2+(ad+bc)Xi​+bd
  1. Substitute Xi2{X_i}^2Xi​2 with Xi−1Xi+acX_{i-1}X_i + acXi−1​Xi​+ac:

acXi2+(ad+bc)Xi+bd=(ad+bc+acXi−1)Xi+ac+bdac{X_i}^2 + (ad + bc)X_i + bd = (ad + bc + acX_{i-1})X_i + ac + bdacXi​2+(ad+bc)Xi​+bd=(ad+bc+acXi−1​)Xi​+ac+bd
  1. If i−1=0i - 1 = 0i−1=0, stop. Otherwise, repeat the process for acacac, adadad, bcbcbc, and bdbdbd.

(aXi+b)(cXi+d)=((a+b)(c+d)−ac−bd+acXi−1)Xi+ac+bd(aX_i + b)(cX_i + d) = ((a + b)(c + d) - ac - bd + acX_{i-1})X_i + ac + bd(aXi​+b)(cXi​+d)=((a+b)(c+d)−ac−bd+acXi−1​)Xi​+ac+bd

Note that the classic method for constructing extension fields is as follows:

F2128:=F2[X]/f(X), where f(X) is irreducible and deg⁡f(X)=128\mathbb{F}_{2^{128}} := \mathbb{F}_2[X] / f(X)\text{, where } f(X) \text{ is irreducible and } \deg f(X) = 128F2128​:=F2​[X]/f(X), where f(X) is irreducible and degf(X)=128

In this extension field, addition is still computed using XOR. For multiplication, polynomials of degree 127 are multiplied and then divided by f(X)f(X)f(X).

Using Binary Towers for extension field operations provides an advantage over doing so with the classic method due to the following reasons:

  • In circuits, various data sizes (e.g., bits) can be represented efficiently with Binary Towers.

  • When expressing F216\mathbb{F}_{2^{16}}F216​ using 16 instances of F2\mathbb{F}_2F2​​, efficient embedding methods (packing) are available. In contrast, classic methods polynomial and are often less efficient.

  • Multiplying an element of F216\mathbb{F}_{2^{16}}F216​ with an element of F2128\mathbb{F}_{2^{128}}F2128​ is faster than multiplying two elements of F2128\mathbb{F}_{2^{128}}F2128​. The cost is 8⋅Θ(16log⁡23)8 \cdot \Theta(16^{\log_2 3})8⋅Θ(16log2​3). In contrast, classic methods require embedding F216\mathbb{F}_{2^{16}}F216​​ into F2128\mathbb{F}_{2^{128}}F2128​​, making them slower.

Protocol Explanation

Block-level Encoding-based PCS

g(X0,…,Xl−1)∈Tι[X0,…,Xl−1]≤1g(X_0, \dots, X_{l-1}) \in T_{\iota}[X_0, \dots, X_{l-1}]^{\le1}g(X0​,…,Xl−1​)∈Tι​[X0​,…,Xl−1​]≤1 and evaluation point r=(r0,…,rl−1)∈Tτl\bm{r} = (r_0, \dots, r_{l-1}) \in T_\tau^lr=(r0​,…,rl−1​)∈Tτl​, let ttt be an (m0=2l0)×(m1=2l1)(m_0 = 2^{l_0}) \times (m_1 = 2^{l_1})(m0​=2l0​)×(m1​=2l1​) matrix consisting of the coefficients in the multilinear Lagrange basis. (For simplicity, let ι=0,κ=4,τ=7\iota = 0, \kappa = 4, \tau = 7ι=0,κ=4,τ=7. As aforementioned in the Binary Towers section, Tι=F2,Tκ=F216,Tτ=F2128 T_\iota = \mathbb{F}_{2}, T_\kappa = \mathbb{F}_{2^{16}}, T_\tau = \mathbb{F}_{2^{128}}Tι​=F2​,Tκ​=F216​,Tτ​=F2128​. The evaluation g(r)g(\bm{r})g(r) can then be computed as follows:

g(r)=⊗i=l1l−1(1−ri,ri)⋅(ti)i=0m0−1⋅⊗i=0l1−1(1−ri,ri)g(\bm{r}) = \otimes_{i = l_1}^{l - 1}(1 - r_i, r_i)\cdot (t_i)_{i=0}^{m_0 - 1} \cdot \otimes_{i = 0}^{l_1 - 1}(1 - r_i, r_i) g(r)=⊗i=l1​l−1​(1−ri​,ri​)⋅(ti​)i=0m0​−1​⋅⊗i=0l1​−1​(1−ri​,ri​)

Here, l=(l0=7)+l1l = (l_0 = 7) + l_1l=(l0​=7)+l1​, and ti∈(Tιm1)m0\bm{t_i} \in (T_\iota^{m_1})^{m_0}ti​∈(Tιm1​​)m0​ is the iii-th row of t\bm{t}t.

  1. From the m0×m1m_0 \times m_1m0​×m1​ ​matrix t\bm{t}t, pack each row of length m1m_1m1​ ​into a new m0×m12κm_0 \times \frac{m_1}{2^\kappa}m0​×2κm1​​ matrix pack(t)\mathsf{pack}(\bm{t})pack(t).

  2. If the rate is ρ\rhoρ, encode each row of the m0×m12κm_0 \times \frac{m_1}{2^\kappa}m0​×2κm1​​ matrix pack(t)\mathsf{pack}(\bm{t})pack(t) into rows of length n=m12κ⋅ρ−1n = \frac{m_1}{2^\kappa}\cdot\rho^{-1}n=2κm1​​⋅ρ−1, forming an m0×nm_0 \times nm0​×n matrix uuu. The prover sends a Merkle hash-based commitment of the uuu matrix to the verifier. Note that while the polynomial represented by the t\bm{t}t matrix is ggg, the polynomial represented by pack(t)\mathsf{pack}(\bm{t})pack(t) is a new polynomial g′g'g′.

  3. The verifier samples r=(r0,…,rl−1)←F2128l\bm{r} = (r_0, \dots,r_{l-1}) \leftarrow \mathbb{F_{2^{128}}^l}r=(r0​,…,rl−1​)←F2128l​​ and sends it to the prover.

  4. The prover computes s=g(r0,…,rl−1)s = g(r_0, \dots, r_{l-1})s=g(r0​,…,rl−1​) and t′=⊗i=l1l−1(1−ri,ri)⋅(ti)i=0m0−1\bm{t'} = \otimes_{i = l_1}^{l-1}(1 - r_i, r_i)\cdot (\bm{t_i})_{i = 0}^{m_0 - 1}t′=⊗i=l1​l−1​(1−ri​,ri​)⋅(ti​)i=0m0​−1​, and sends both to the verifier. Note that r\bm{r}r is over F2128\mathbb{F}_{2^{128}}F2128​, t\bm{t}t is over F2\mathbb{F}_2F2​​, and t′\bm{t'}t′ is over F2128\mathbb{F}_{2^{128}}F2128​. As mentioned in Binary Towers, multiplication in this setting is performed efficiently.

  5. The verifier samples ji←{0,…,n−1}j_i \leftarrow \{0, \dots, n - 1\}ji​←{0,…,n−1} for γ\gammaγ times, where γ\gammaγ is the repetition count, and sends J={j0,…,jγ−1}\bm{J} = \{j_0, \dots, j_{\gamma - 1}\}J={j0​,…,jγ−1​} to the prover (Remember n=m12κ⋅ρ−1n = \frac{m_1}{2^\kappa}\cdot\rho^{-1}n=2κm1​​⋅ρ−1).

  6. The verifier uses Merkle proofs to verify that {(ui,j)}j∈J\big\{(u_{i, j})\big\}_{j \in \bm{J}}{(ui,j​)}j∈J​​ is correct.

  7. Finally, the verifier checks that packing and encoding were performed correctly: . Given that jij_iji​​ ranges between 000 and n=c16⋅ρ−1n = \frac{c}{16} \cdot \rho^{-1}n=16c​⋅ρ−1, testing is performed at the block level in units of F216\mathbb{F}_{2^{16}}F216​​. This is referred to as block-level testing.

Pack Virtual Polynomial

Let us revisit the block-level encoding described earlier. In a Polynomial IOP, the polynomial that the verifier requests the prover to open is g∈F2[X0,…,Xl−1]≤1g \in \mathbb{F}_2[X_0, \dots, X_{l-1}]^{\leq 1}g∈F2​[X0​,…,Xl−1​]≤1. However, the polynomial that the prover actually commits to and opens is g′g'g′, which is derived by packing ggg into g′∈F2κ[X0,…,Xl−κ−1]≤1g' \in \mathbb{F}_{2^{\kappa}}[X_0, \dots, X_{l - \kappa - 1}]^{\leq 1}g′∈F2κ​[X0​,…,Xl−κ−1​]≤1. The packing function pack~κ\widetilde{\mathsf{pack}}_{\kappa}pack​κ​​ is defined as follows:

pack~κ(g)(X0,…,Xl−κ−1):=∑v∈Bκg~(v0,…,vκ−1,X0,…,Xl−κ−1)⋅βv\widetilde{\mathsf{pack}}_{\kappa}(g)(X_0, \dots, X_{l - \kappa - 1}) :=\sum_{v\in B_\kappa}\tilde{g}(v_0, \dots, v_{\kappa - 1}, X_0, \dots, X_{l - \kappa - 1}) \cdot \beta_vpack​κ​(g)(X0​,…,Xl−κ−1​):=v∈Bκ​∑​g~​(v0​,…,vκ−1​,X0​,…,Xl−κ−1​)⋅βv​

Here, g~\tilde{g}g~​ is the multilinear extension (MLE) of ggg, and βv\beta_vβv​ represents the multilinear Lagrange basis. For example, when κ=2\kappa = 2κ=2 and l=4l = 4l=4, the equation becomes:

pack~2(g)(X0,X1)=g~(1,1,X0,X1)⋅8+g~(0,1,X0,X1)⋅4+g~(1,0,X0,X1)⋅2+g~(0,0,X0,X1)⋅1\begin{align*} \widetilde{\mathsf{pack}}_2(g)(X_0, X_1) =&\tilde{g}(1, 1, X_0, X_1)\cdot 8 + \tilde{g}(0, 1, X_0, X_1)\cdot 4 + \\ &\tilde{g}(1, 0, X_0, X_1)\cdot 2 + \tilde{g}(0, 0, X_0, X_1)\cdot 1 \end{align*}pack​2​(g)(X0​,X1​)=​g~​(1,1,X0​,X1​)⋅8+g~​(0,1,X0​,X1​)⋅4+g~​(1,0,X0​,X1​)⋅2+g~​(0,0,X0​,X1​)⋅1​

Using a sumcheck protocol, this computation can be replaced with an evaluation claim such that:

pack~κ(g)(r′)=?s′\widetilde{\mathsf{pack}}_\kappa(g)(\bm{r'}) \stackrel{?}= s'pack​κ​(g)(r′)=?s′

Replacing βv\beta_vβv​ with β~∈Fκ[X0,…,Xκ−1]≤1\tilde{\beta} \in \mathbb{F}_\kappa[X_0, \dots, X_{\kappa - 1}]^{\le 1}β~​∈Fκ​[X0​,…,Xκ−1​]≤1, the following equation is defined:

pack~κ(g)(r′)(Y0,…,Yκ−1):=g~(Y0,…,Yκ−1,r′0,…,r′l−κ−1)⋅β~(Y0,…,Yκ−1)\widetilde{\mathsf{pack}}_{\kappa}(g)(\bm{r'})(Y_0, \dots, Y_{\kappa - 1}) := \tilde{g}(Y_0, \dots, Y_{\kappa - 1}, {r'}_0, \dots, {r'}_{l - \kappa - 1}) \cdot \tilde{\beta}(Y_0, \dots, Y_{\kappa - 1}) pack​κ​(g)(r′)(Y0​,…,Yκ−1​):=g~​(Y0​,…,Yκ−1​,r′0​,…,r′l−κ−1​)⋅β~​(Y0​,…,Yκ−1​)

The following sum holds:

∑Y∈Bκpack~κ(g)(r′)(Y0,…,Yκ−1)=s′\sum_{Y \in B_{ \kappa}}\widetilde{\mathsf{pack}}_{\kappa}(g)(\bm{r'})(Y_0, \dots, Y_{\kappa - 1}) = s' Y∈Bκ​∑​pack​κ​(g)(r′)(Y0​,…,Yκ−1​)=s′

For example, when κ=2\kappa = 2κ=2:

pack~2(g)(r′)=s′=g~(1,1,r′0,r′1)⋅Y1Y0+g~(0,1,r′0,r′1)⋅Y1+g~(1,0,r′0,r′1)⋅Y0+g~(0,0,r′0,r′1)⋅1\begin{align*} \widetilde{\mathsf{pack}}_2(g)(\bm{r'}) = s' =&\tilde{g}(1, 1, {r'}_0, {r'}_1)\cdot Y_1Y_0 + \tilde{g}(0, 1, {r'}_0, {r'}_1)\cdot Y_1 + \\ &\tilde{g}(1, 0, {r'}_0, {r'}_1)\cdot Y_0 + \tilde{g}(0, 0, {r'}_0, {r'}_1)\cdot 1 \end{align*} pack​2​(g)(r′)=s′=​g~​(1,1,r′0​,r′1​)⋅Y1​Y0​+g~​(0,1,r′0​,r′1​)⋅Y1​+g~​(1,0,r′0​,r′1​)⋅Y0​+g~​(0,0,r′0​,r′1​)⋅1​

By applying a sumcheck protocol, this is replaced with an evaluation claim:

g~(r∣∣r′)⋅β~(r)=?s\tilde{g}(\bm{r} || \bm{r'}) \cdot \tilde{\beta}(\bm{r}) \stackrel{?}= sg~​(r∣∣r′)⋅β~​(r)=?s

Thus, we obtain g~(r∣∣r′)\tilde{g}(\bm{r} || \bm{r'})g~​(r∣∣r′), allowing us to query the original polynomial ggg through its virtual polynomial g′g'g′.

Shift Virtual Polynomial

As introduced in the previous article on HyperPlonk, the shift polynomial helps traverse the evaluation domain. For b∈{0,…,l−1}\bm{b} \in \{0, \dots, l-1\}b∈{0,…,l−1} and shift offset o∈Bbo \in B_bo∈Bb​​, the shift mapping sb,o:Bl→Bls_{b, o}: B_l \rightarrow B_lsb,o​:Bl​→Bl​​ is defined such that, for u:=sb,o(v)u := s_{b, o}(v)u:=sb,o​(v), the condition {u}≡{v}+{o}(mod2b)\{u\} \equiv \{v\} + \{o\} \pmod{2^b}{u}≡{v}+{o}(mod2b) holds. For example, shifting by o={1,0}∈B2o = \{1, 0\} \in B_2o={1,0}∈B2​​ (a single step) works as follows:

sb,o(0,0,0)=(1,0,0)sb,o(1,0,0)=(0,1,0)sb,o(0,1,0)=(1,1,0)sb,o(1,1,0)=(0,0,0)sb,o(0,0,1)=(1,0,1)sb,o(1,0,1)=(0,1,1)sb,o(0,1,1)=(1,1,1)sb,o(1,1,1)=(0,0,1)s_{b, o}(0, 0, 0) = (1, 0, 0) \\ s_{b, o}(1, 0, 0) = (0, 1, 0) \\ s_{b, o}(0, 1, 0) = (1, 1, 0) \\ s_{b, o}(1, 1, 0) = (0, 0, 0) \\ s_{b, o}(0, 0, 1) = (1, 0, 1) \\ s_{b, o}(1, 0, 1) = (0, 1, 1) \\ s_{b, o}(0, 1, 1) = (1, 1, 1) \\ s_{b, o}(1, 1, 1) = (0, 0, 1) \\sb,o​(0,0,0)=(1,0,0)sb,o​(1,0,0)=(0,1,0)sb,o​(0,1,0)=(1,1,0)sb,o​(1,1,0)=(0,0,0)sb,o​(0,0,1)=(1,0,1)sb,o​(1,0,1)=(0,1,1)sb,o​(0,1,1)=(1,1,1)sb,o​(1,1,1)=(0,0,1)

The shift operator is defined as:

shiftb,o(g):=g∘sb,o\text{shift}_{b, o}(g) := g\circ s_{b,o}shiftb,o​(g):=g∘sb,o​

The shift indicator s-indb,o\text{s-ind}_{b, o}s-indb,o​​ can be expressed as follows: (Refer to the section 4.3. in the paper to see how it is algebraically expressed)

s-indb,o(x,y)→{1if {y}≡?{x}+{o}(mod2b)0otherwise\text{s-ind}_{b, o}(x, y) \rightarrow \begin{cases} 1& \text{if } \{y\} \stackrel{?}\equiv \{x\} + \{o\} \pmod{2^b}\\ 0 &\text{otherwise} \end{cases}s-indb,o​(x,y)→{10​if {y}≡?{x}+{o}(mod2b)otherwise​

Thus, the shift polynomial shift~b,o(g)\widetilde{\mathsf{shift}}_{b, o}(g)shiftb,o​(g) is defined as:

shift~b,o(g)(v):=∑u∈Bbg~(u0,…,ub−1,vb,…,vl−1)⋅s-ind~b,o(u0,…,ub−1,v0,…,vb−1)\widetilde{\text{shift}}_{b, o}(g)(\bm{v}) := \sum_{u \in B_b}\tilde{g}(u_0, \dots, u_{b-1}, v_b, \dots, v_{l-1})\cdot \widetilde{\text{s-ind}}_{b, o}(u_0, \dots, u_{b-1}, v_0, \dots, v_{b-1}) shiftb,o​(g)(v):=u∈Bb​∑​g~​(u0​,…,ub−1​,vb​,…,vl−1​)⋅s-indb,o​(u0​,…,ub−1​,v0​,…,vb−1​)

For the earlier example:

shift~b,o(g)(0,0,0)=g~(1,0,0)shift~b,o(g)(1,0,0)=g~(0,1,0)shift~b,o(g)(0,1,0)=g~(1,1,0)shift~b,o(g)(1,1,0)=g~(0,0,0)shift~b,o(g)(0,0,1)=g~(1,0,1)shift~b,o(g)(1,0,1)=g~(0,1,1)shift~b,o(g)(0,1,1)=g~(1,1,1)shift~b,o(g)(1,1,1)=g~(0,0,1)\widetilde{\text{shift}}_{b, o}(g)(0, 0, 0) = \tilde{g}(1, 0, 0) \\ \widetilde{\text{shift}}_{b, o}(g)(1, 0, 0) = \tilde{g}(0, 1, 0) \\ \widetilde{\text{shift}}_{b, o}(g)(0, 1, 0) = \tilde{g}(1, 1, 0) \\ \widetilde{\text{shift}}_{b, o}(g)(1, 1, 0) = \tilde{g}(0, 0, 0) \\ \widetilde{\text{shift}}_{b, o}(g)(0, 0, 1) = \tilde{g}(1, 0, 1) \\ \widetilde{\text{shift}}_{b, o}(g)(1, 0, 1) = \tilde{g}(0, 1, 1) \\ \widetilde{\text{shift}}_{b, o}(g)(0, 1, 1) = \tilde{g}(1, 1, 1) \\ \widetilde{\text{shift}}_{b, o}(g)(1, 1, 1) = \tilde{g}(0, 0, 1) \\shiftb,o​(g)(0,0,0)=g~​(1,0,0)shiftb,o​(g)(1,0,0)=g~​(0,1,0)shiftb,o​(g)(0,1,0)=g~​(1,1,0)shiftb,o​(g)(1,1,0)=g~​(0,0,0)shiftb,o​(g)(0,0,1)=g~​(1,0,1)shiftb,o​(g)(1,0,1)=g~​(0,1,1)shiftb,o​(g)(0,1,1)=g~​(1,1,1)shiftb,o​(g)(1,1,1)=g~​(0,0,1)

By applying the sumcheck protocol, we get the evaluation claim:

shift~b,o(g)(r′)=?s′\widetilde{\text{shift}}_{b,o}(g)(\bm{r'}) \stackrel{?}= s'shiftb,o​(g)(r′)=?s′

This leads to:

shift~b,o(g)(r′)(Y0,…,Yb−1):=g~(Y0,…,Yb−1,r′b,…,r′l−1)⋅s-ind~b,o(Y0,…,Yb−1,r′0,…,r′b−1)\widetilde{\text{shift}}_{b,o}(g)(\bm{r'})(Y_0, \dots, Y_{b- 1}) := \tilde{g}(Y_0, \dots, Y_{b- 1}, {r'}_b, \dots, {r'}_{l - 1}) \cdot \widetilde{\text{s-ind}}_{b,o}(Y_0, \dots, Y_{b - 1}, {r'}_0, \dots, {r'}_{b-1})shiftb,o​(g)(r′)(Y0​,…,Yb−1​):=g~​(Y0​,…,Yb−1​,r′b​,…,r′l−1​)⋅s-indb,o​(Y0​,…,Yb−1​,r′0​,…,r′b−1​)

The following sum holds:

∑Y∈Bκshift~b,o(g)(r′)(Y0,…,Yb−1)=s′\sum_{Y \in B_{ \kappa}}\widetilde{\text{shift}}_{b,o}(g)(\bm{r'})(Y_0, \dots, Y_{b - 1}) = s' Y∈Bκ​∑​shiftb,o​(g)(r′)(Y0​,…,Yb−1​)=s′

This allows us to query the shift polynomial shiftb,o(g)\text{shift}_{b, o}(g)shiftb,o​(g) using the virtual polynomial ggg and s-indb,o\text{s-ind}_{b,o}s-indb,o​.

Conclusion

While this article does not cover all the details, it addresses the key aspects of utilizing the binary field. To enable RS encoding using the binary field, we applied a modified version of Brakedown with packing and used the shift operator to traverse the domain efficiently.

The image above is captured from the Binius paper. The first row, Hyrax, shows the PCS used in Lasso, while the second and third rows show FRI, the PCS used in Plonky3. In Plonky3, even when data smaller than 31 bits is used, there is no speed difference, so the data is omitted for efficiency. In the case of Binius, while it is slower than Plonky3 Keccak-256 for 32-bit data, it significantly reduces the commitment time for 1-bit data.

The image above is captured from the Binius paper. It turns out Binius is almost 2 times faster to commit, around 2~3 times faster to prove, and around 5~6 times faster to verify.

A binary tower is a hierarchical structure of finite fields, where each field in the hierarchy is an extension of the previous field, and the base field is F2\mathbb{F}_2F2​​. In , it is stated that an extension field can be constructed as

Notably, using the , the number of multiplications can be reduced from 4 to 3:

According to , multiplication with this binary tower structure can be computed in Θ((2i)log23)\Theta((2^i)^{log_2 3})Θ((2i)log2​3).

In Brakedown, instead of Reed-Solomon (RS) codes, linear codes with linear encoding time are used. In comparison, Binius adopts the overall style of Brakedown while leveraging RS codes with the , which states that the maximum distance for [n,k,d][n, k, d][n,k,d]-codes is d≤n−k+1d \leq n - k + 1d≤n−k+1. Furthermore, instead of using for RS encoding in a binary field, additive FFT () is used; however, the size of the alphabet must be at least nnn, but the size of the alphabet F2\mathbb{F}_2F2​​ is far smaller than nnn. To address this, we construct F216\mathbb{F}_{2^{16}}F216​​ using, for example, 16 instances of F2\mathbb{F}_2F2​​. This method is called packing. Since the encoding is performed in blocks of F216\mathbb{F}_{2^{16}}F216​​, this is referred to as block-level encoding.

Written by from

STARK
HyperPlonk
Binius
For example, in the Keccak-256 circuit, out of 2,531 columns, 2,328 columns each represent a single bit, but since each column can hold up to 64 bits, there is a massive embedding overhead.
An Iterated Quadratic Extension of GF(2)
Karatsuba algorithm
On efficient inversion in tower fields of characteristic two
Singleton bound
radix-2 FFT
paper
A41
ryan Kim