Binius protocol analysis: Efficient STARKs implementation on binary fields

Analysis of the Principles of Binius STARKs and Thoughts on Optimization

1 Introduction

One of the main reasons for the low efficiency of STARKs is that most of the values in actual programs are relatively small, such as indices in for loops, boolean values, counters, etc. However, to ensure the security of proofs based on Merkle trees, many additional redundant values occupy the entire field when data is expanded using Reed-Solomon coding, even if the original values themselves are very small. To address this issue, reducing the size of the field has become a key strategy.

The first generation of STARKs has a coding width of 252 bits, the second generation has a coding width of 64 bits, and the third generation has a coding width of 32 bits; however, the 32-bit coding width still has a lot of wasted space. In comparison, the binary field allows for direct bit manipulation, with compact and efficient encoding without any wasted space, namely the fourth generation of STARKs.

Compared to recent discoveries in finite fields such as Goldilocks, BabyBear, and Mersenne31, research on binary fields dates back to the 1980s. Currently, binary fields are widely used in cryptography, with typical examples including:

  • Advanced Encryption Standard ( AES ), based on F28 field;

  • Galois Message Authentication Code ( GMAC ), based on F2128 field;

  • QR code, using Reed-Solomon encoding based on F28;

  • The original FRI and zk-STARK protocols, as well as the Grøstl hash function that entered the SHA-3 finals, which is based on the F28 field, is a hash algorithm that is very suitable for recursion.

When using smaller fields, the extension field operation becomes increasingly important to ensure security. The binary field used by Binius must rely entirely on extension fields to guarantee its security and practical usability. Most polynomials involved in Prover calculations do not need to enter an extension field and can operate solely in the base field, achieving high efficiency within the small field. However, random point checking and FRI calculations still need to delve into larger extension fields to ensure the required security.

When constructing proof systems based on binary fields, there are two practical issues: in STARKs, the field size used for calculating the trace representation should be larger than the degree of the polynomial; in STARKs, when committing to the Merkle tree, Reed-Solomon encoding is required, and the field size should be larger than the size after encoding expansion.

Binius proposed an innovative solution to address these two issues separately and achieve the same data representation in two different ways: First, using multivariable ( specifically multivariate ) polynomials instead of univariate polynomials, representing the entire computational trajectory through its values on "hypercubes" (; secondly, since the length of each dimension of the hypercube is 2, standard Reed-Solomon expansion as in STARKs cannot be performed, but the hypercube can be viewed as a square ), on which Reed-Solomon expansion can be based. This method greatly enhances coding efficiency and computational performance while ensuring security.

2 Principle Analysis

The construction of most current SNARKs systems typically includes the following two parts:

  • Information-Theoretic Polynomial Interactive Oracle Proof, PIOP (: As the core of the proof system, PIOP transforms the input computational relationship into verifiable polynomial equations. Different PIOP protocols allow the prover to send polynomials incrementally through interaction with the verifier, enabling the verifier to validate the correctness of the computation by querying a small number of polynomial evaluation results. Existing PIOP protocols include: PLONK PIOP, Spartan PIOP, and HyperPlonk PIOP, each of which handles polynomial expressions differently, thereby affecting the performance and efficiency of the whole SNARK system.

  • Polynomial Commitment Scheme ) Polynomial Commitment Scheme, PCS (: The polynomial commitment scheme is used to prove whether polynomial equations generated by PIOP are valid. PCS is a cryptographic tool that allows the prover to commit to a certain polynomial and later verify the evaluation result of that polynomial while hiding other information about the polynomial. Common polynomial commitment schemes include KZG, Bulletproofs, FRI ) Fast Reed-Solomon IOPP (, and Brakedown, among others. Different PCS have different performance, security, and applicable scenarios.

Based on specific requirements, choose different PIOP and PCS, and combine them with suitable finite fields or elliptic curves to construct proof systems with different attributes. For example:

• Halo2: Combined PLONK PIOP and Bulletproofs PCS, based on the Pasta curve. Halo2 is designed with a focus on scalability and the removal of trusted setup from the ZCash protocol.

• Plonky2: Combining PLONK PIOP with FRI PCS and based on the Goldilocks field. Plonky2 is designed to achieve efficient recursion. When designing these systems, the chosen PIOP and PCS must match the finite field or elliptic curve used to ensure the system's correctness, performance, and security. The choice of these combinations not only affects the proof size and verification efficiency of SNARKs but also determines whether the system can achieve transparency without a trusted setup and whether it can support extended features such as recursive proofs or aggregated proofs.

Binius: HyperPlonk PIOP + Brakedown PCS + binary fields. Specifically, Binius includes five key technologies to achieve its efficiency and security. First, the arithmetic based on tower of binary fields )towers of binary fields( forms the basis of its computation, enabling simplified operations within binary fields. Second, Binius adapted HyperPlonk product and permutation checks in its interactive Oracle proof protocol )PIOP( to ensure secure and efficient consistency checks between variables and their permutations. Third, the protocol introduces a new multilinear shift proof that optimizes the efficiency of verifying multilinear relationships over small fields. Fourth, Binius utilizes an improved Lasso lookup proof, providing flexibility and strong security for the lookup mechanism. Finally, the protocol employs a small field polynomial commitment scheme )Small-Field PCS(, allowing it to achieve an efficient proof system over binary fields while reducing the overhead typically associated with large fields.

) 2.1 Finite Fields: Arithmetic based on towers of binary fields

Tower binary fields are key to achieving fast verifiable computation, primarily due to two aspects: efficient computation and efficient arithmetic. Binary fields inherently support highly efficient arithmetic operations, making them an ideal choice for cryptographic applications that are sensitive to performance requirements. In addition, the structure of binary fields supports a simplified arithmetic process, meaning that operations performed over binary fields can be represented in a compact and easily verifiable algebraic form. These features, combined with the ability to fully leverage their hierarchical characteristics through tower structures, make binary fields particularly suitable for scalable proof systems like Binius.

In this context, "canonical" refers to the unique and direct representation of elements in a binary field. For example, in the simplest binary field F2, any k-bit string can be directly mapped to a k-bit binary field element. This differs from prime fields, which cannot provide such a canonical representation within a specified bit length. Although a 32-bit prime field can contain values within 32 bits, not every 32-bit string can uniquely correspond to a field element, while binary fields offer this one-to-one mapping convenience. In the prime field Fp, common reduction methods include Barrett reduction, Montgomery reduction, and special reduction methods for specific finite fields such as Mersenne-31 or Goldilocks-64. In the binary field F2k, commonly used reduction methods include special reduction ( as used in AES ), Montgomery reduction ### as used in POLYVAL (, and recursive reduction ) as in Tower (. The paper "Exploring the Design Space of Prime Field vs. Binary Field ECC-Hardware Implementations" points out that binary fields do not require carry for addition and multiplication operations, and that squaring in binary fields is very efficient because it follows the simplified rule of )X + Y (2 = X2 + Y 2.

As shown in Figure 1, a 128-bit string: this string can be interpreted in various ways in the context of binary fields. It can be viewed as a unique element in a 128-bit binary field, or parsed as two 64-bit tower field elements, four 32-bit tower field elements, 16 8-bit tower field elements, or 128 F2 field elements. This flexibility of representation does not require any computational overhead, just a typecast of the bit string )typecast(, which is a very interesting and useful property. At the same time, small field elements can be packed into larger field elements without additional computational overhead. The Binius protocol takes advantage of this feature to improve computational efficiency. Additionally, the paper "On Efficient Inversion in Tower Fields of Characteristic Two" explores the computational complexity of multiplication, squaring, and inversion operations in n-bit tower binary fields ) decomposed into m-bit subfields (.

![Bitlayer Research: Analysis of Binius STARKs Principles and Optimization Thoughts])https://img-cdn.gateio.im/webp-social/moments-5775a629f494c4e01e2b74d864fa4100.webp(

) 2.2 PIOP: Adapted HyperPlonk Product and Permutation Check ------ Applicable to binary fields

The PIOP design in the Binius protocol draws on HyperPlonk and employs a series of core checking mechanisms to verify the correctness of polynomials and multivariate sets. These core checks include:

  1. GateCheck: Verify whether the confidential witness ω and public input x satisfy the circuit operation relationship C(x, ω)=0, to ensure the correct operation of the circuit.

  2. PermutationCheck: Verify whether the evaluation results of two multivariate polynomials f and g on the Boolean hypercube are a permutation relation f###x( = f)π(x)(, to ensure the consistency of the arrangement between the polynomial variables.

  3. LookupCheck: Validate whether the evaluation of the polynomial is in the given lookup table, that is, f(Bµ) ⊆ T)Bµ(, ensuring that certain values are within the specified range.

  4. MultisetCheck: Check whether two multivariable sets are equal, that is, {)x1,i,x2,(}i∈H={)y1,i,y2,(}i∈H, ensuring consistency among multiple sets.

  5. ProductCheck: Check whether the evaluation of a rational polynomial on the Boolean hypercube equals a declared value ∏x∈Hµ f)x( = s, to ensure the correctness of the polynomial product.

  6. ZeroCheck: Verify whether an arbitrary point of a multivariable polynomial on the Boolean hypercube is zero ∏x∈Hµ f)x( = 0, ∀x ∈ Bµ, to ensure the distribution of the polynomial's zeros.

  7. SumCheck: Verifying whether the sum of a multivariate polynomial equals the declared value ∑x∈Hµ f)x( = s. By transforming the evaluation problem of multivariate polynomials into the evaluation of univariate polynomials, it reduces the computational complexity for the verifier. In addition, SumCheck allows for batching by introducing randomness to construct linear combinations for multiple sum-check instances.

  8. BatchCheck: Based on SumCheck, it verifies the correctness of multiple multivariable polynomial evaluations to improve protocol efficiency.

Although Binius and HyperPlonk have many similarities in protocol design, Binius has made improvements in the following three areas:

  • ProductCheck Optimization: In HyperPlonk, ProductCheck requires the denominator U to be non-zero everywhere on the hypercube, and the product must equal a specific value; Binius simplifies this check process by specializing that value to 1, thereby reducing computational complexity.

  • Handling of the zero division problem: HyperPlonk failed to adequately address the zero division issue, resulting in an inability to assert the non-zero problem of U on the hypercube; Binius correctly handled this problem, and even in the case where the denominator is zero, Binius's ProductCheck can continue processing, allowing for generalization to any product value.

  • Cross-column PermutationCheck: HyperPlonk does not have this functionality; Binius supports PermutationCheck across multiple columns, enabling Binius to handle more complex polynomial arrangement scenarios.

Therefore, Binius has improved the existing PIOPSumCheck mechanism, enhancing the flexibility and efficiency of the protocol, particularly in providing stronger functional support when dealing with more complex multivariate polynomial verifications. These improvements not only address the limitations in HyperPlonk but also lay the foundation for future proof systems based on binary fields.

![Bitlayer Research: Analysis of Binius STARKs Principles and Optimization Thoughts])https://img-cdn.gateio.im/webp-social/moments-1fb9ecbf9b3b2beaec758f3ab686a012.webp(

) 2.3 PIOP: New multilinear shift argument------Applicable to boolean hypercube

In the Binius protocol, the construction and handling of virtual polynomials is one of the key technologies, which can effectively generate and manipulate polynomials derived from input handles or other virtual polynomials. Here are two key methods:

  • Packing: This method is through
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 7
  • Share
Comment
0/400
OnChain_Detectivevip
· 13h ago
ngl this optimization pattern looks sus af... we need closer inspection on those binary domain claims
Reply0
0xTherapistvip
· 17h ago
What's the big deal about 32 bits? It's still a waste of space.
View OriginalReply0
CryptoCrazyGFvip
· 20h ago
What's the use of researching so much? It still doesn't run fast on-chain.
View OriginalReply0
MemeCuratorvip
· 20h ago
If you don't understand it, you'll understand it!
View OriginalReply0
LiquidityWhisperervip
· 20h ago
Binary deduplication is quite interesting.
View OriginalReply0
AirdropHunter007vip
· 20h ago
starks can also lose weight, amazing!
View OriginalReply0
TopEscapeArtistvip
· 21h ago
Oh, is this again the rhythm of wanting to break through the bottom range? Historical experience tells me it's all a trap~
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)