Skip to content

A Rust library for polynomial commitments

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

HorizenLabs/poly-commit

 
 

Repository files navigation

poly-commit: the dlog polynomial commitment scheme

poly-commit is a Rust library for univariate polynomial commitment schemes. It provides general traits and functions for polynomial commitments. As concrete scheme we provide the BCMS variant of the dlog polynomial commitment scheme from Bootle et al., 2016, including

  • the "batch evaluation proof" for multi-point queries from HaloInfinite, and
  • domain extension beyond the size of the committer key.

This is the scheme we use in our recursive Darlin SNARK from HGB. The library is forked from arkworks, restructured and adapted to the needs of our Darlin protocol suite.

Directory Structure

  • data_structures essentially contains the data structures and related traits for key material and evaluation proofs.
  • lib.rs contains the main trait for a polynomial commitment scheme. The trait serves the interfaces for atomic and more expressive opening queries such as multi-point multi-polynomial queries.
  • rng provides a trait for sponge-like pseudo random number generators, tailored to Fiat-Shamir transform usage, and an implementation using the ChaCha20-based random number generator from rand_chacha.
  • ipa_pc gives the implementation the dlog polynomial commitment scheme in the style of BCMS. We further implement the above mentioned batch evaluation proof and domain extension. It moreover contains functions related to proof recursion (such as the succinct and non-succinct verifier).

Release note

The upcoming release (see refactor_pc_dev) will involve a complete restructuring of the current release. It narrows down the trait for general polynomial commitment schemes to linear ones, handling both more expressive opening queries as well as domain extension by default implementations.

Build instructions

The library compiles on the 1.51.0 stable toolchain of the Rust compiler.

git clone https://github.com/HorizenLabs/poly-commit.git
cd poly-commit
cargo build --release

Run tests using

cargo test --all-features 

More detailed information can be found in our build guide.

About

A Rust library for polynomial commitments

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 95.5%
  • Shell 4.3%
  • Dockerfile 0.2%