Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

This is a single-row model of the Binius64 MUL reduction, the trick that lets a 64-bit multiply be proved without the verifier ever doing a multiplication. Fix a generator g of F_(2^128). Its multiplicative group has order 2^128 - 1, so e -> g^e is injective on exponents mod that order, and the statement p * q = 2^64 * hi + lo turns into the field identity (g^p)^q = g^lo * (g^(2^64))^hi. Each side is a product of 64 bit-selected square-powers, which is a grand product, which a GKR argument can prove in O(log^2 n) field elements. The identity only pins the product mod 2^128 - 1, and that modulus is odd, so a wraparound forgery always flips the product's low bit. Checking that one bit closes the gap.

The code is meant to be read in this order:

field_tools.py fixes the ambient field at F_(2^128) and supplies the two structural facts the rest depends on: which elements generate the full multiplicative group, and how Frobenius acts.

mul_constraints.py holds the integer statement, the four 64-bit words, their bit decompositions, and the low-bit check.

gkr_tree.py builds the 64-leaf binary product tree and keeps every intermediate layer, since a GKR prover needs them.

exponentiation.py turns a 64-bit exponent into the 64 leaves that tree consumes.

mul_reduction.py sits on top and runs the four exponentiations the identity is checked on.

multilinear.py, sumcheck.py, and gkr_product.py are the proof layer: eq tables and multilinear evaluation, then the degree-three product sumcheck over a Fiat-Shamir transcript, then the grand-product argument that walks down the tree and never reads a leaf.

oblong.py is index arithmetic for non-square commitment grids. It is exercised by the driver but nothing in the reduction imports it yet, so treat it as scaffolding for the commitment layer rather than a live code path.

simple_binius/binary_fields.py is a vendored copy of the field implementation from my earlier Binius work, included here so this repo runs on its own. Only that one file is used. The full version is at https://github.com/brian-soltani/simple-binius-implementation.

Run the guided walkthrough with:

python3 driver.py

and the unit tests with:

python3 tests.py

Sources:

https://github.com/binius-zk/binius64

https://www.binius.xyz/blueprint/constraints/introduction

https://www.binius.xyz/blueprint/constraints/indices

https://www.binius.xyz/blueprint/constraints/arrays

https://www.binius.xyz/blueprint/constraints/ands

https://www.binius.xyz/blueprint/constraints/muls

https://www.binius.xyz/blueprint/backend/muls

https://www.binius.xyz/blueprint/backend/muls/multiplying

https://www.binius.xyz/blueprint/backend/muls/exponentiating

https://www.binius.xyz/blueprint/backend/muls/combined

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages