#r1cs #zk-snarks #zero-knowledge #snark

no-std ark-r1cs-std

A standard library for constraint system gadgets

7 releases

0.4.0 Jan 17, 2023
0.4.0-alpha.3 Dec 28, 2022
0.4.0-alpha.0 Nov 19, 2022
0.3.1 Jul 7, 2021
0.2.0 Mar 24, 2021

#2240 in Cryptography

Download history 2809/week @ 2023-11-20 2947/week @ 2023-11-27 2395/week @ 2023-12-04 2596/week @ 2023-12-11 1915/week @ 2023-12-18 1203/week @ 2023-12-25 1780/week @ 2024-01-01 2318/week @ 2024-01-08 2385/week @ 2024-01-15 2369/week @ 2024-01-22 2498/week @ 2024-01-29 2116/week @ 2024-02-05 2431/week @ 2024-02-12 1400/week @ 2024-02-19 2069/week @ 2024-02-26 2021/week @ 2024-03-04

8,051 downloads per month
Used in 64 crates (48 directly)

MIT/Apache

535KB
11K SLoC

ark-r1cs-std

The arkworks ecosystem consist of Rust libraries for designing and working with zero knowledge succinct non-interactive arguments (zkSNARKs). This repository contains efficient implementations of constraint "gadgets" that enable checking common computations inside SNARKs, such as bit operations, finite field arithmetic, elliptic curve arithmetic, and pairings.

This library is released under the MIT License and the Apache v2 License (see License).

WARNING: This is an academic proof-of-concept prototype, and in particular has not received careful code review. This implementation is NOT ready for production use.

Build guide

The library compiles on the stable toolchain of the Rust compiler. To install the latest version of Rust, first install rustup by following the instructions here, or via your platform's package manager. Once rustup is installed, install the Rust toolchain by invoking:

rustup install stable

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

git clone https://github.com/arkworks-rs/r1cs-std.git
cargo build --release

This library comes with unit tests for each of the provided crates. Run the tests with:

cargo test

License

This library is 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.

Acknowledgements

This work was supported by: a Google Faculty Award; the National Science Foundation; the UC Berkeley Center for Long-Term Cybersecurity; and donations from the Ethereum Foundation, the Interchain Foundation, and Qtum.

An earlier version of this library was developed as part of the paper "ZEXE: Enabling Decentralized Private Computation".

Dependencies

~5.5MB
~107K SLoC