Skip to content

A lattice-based non-interactive folding scheme written in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

NethermindEth/latticefold

Repository files navigation

LatticeFold

A proof-of-concept implementation of the LatticeFold folding scheme engineered by Nethermind based on the work LatticeFold: A Lattice-based Folding Scheme and its Applications to Succinct Proof Systems by Dan Boneh and Binyi Chen.

DISCLAIMER: This is a proof-of-concept prototype, and in particular has not received careful code review. This implementation is provided "as is" and NOT ready for production use. Use at your own risk.

Building

The rust-toolchain file pins the version of the Rust toolchain, which the LatticeFold library builds with, to the specific version nightly-2024-11-05.

One can install the nightly-2024-11-05 toolchain by invoking:

rustup install nightly-2024-11-05

After that, use cargo, the standard Rust build tool, to build the library:

git clone https://github.com/NethermindEth/latticefold.git
cd latticefold
cargo build --release

Usage

Import the library:

[dependencies]
latticefold = { git = "https://github.com/NethermindEth/latticefold.git", package = "latticefold" }

Available packages:

  • latticefold: main crate, contains the non-interactive folding scheme implementation, together with the Ajtai commitment scheme, R1CS/CCS structures, Fiat-Shamir transcript machinery, etc.
  • cyclotomic-rings: contains the trait definition of a ring suitable to be used in the LatticeFold protocol, a few ready-to-use rings and short challenge set machinery.

Examples

Check latticefold-examples/README.md for examples.

Frontends

Currently, the only way to define a circuit to be folded is by specifying it as a rank-1 constraint system (R1CS) or a customizable constraint system (CCS).

License

The crates in this repository are licensed under either of the following licenses, at your discretion.

Unless you explicitly state otherwise, any contribution submitted for inclusion in this library by you shall be dual licensed as above (as defined in the Apache v2 License), without any additional terms or conditions.

Acknowledgments