#r1cs #pedersen #snark #blake2s #schnorr #zero-knowledge

no-std ark-crypto-primitives

A library of useful cryptographic primitives

4 releases (2 breaking)

0.4.0 Jan 24, 2023
0.4.0-alpha Nov 29, 2022
0.3.0 Jun 6, 2021
0.2.0 Mar 25, 2021

#797 in Cryptography

Download history 10521/week @ 2023-12-13 9026/week @ 2023-12-20 6475/week @ 2023-12-27 12456/week @ 2024-01-03 14745/week @ 2024-01-10 17274/week @ 2024-01-17 15415/week @ 2024-01-24 16430/week @ 2024-01-31 17540/week @ 2024-02-07 16803/week @ 2024-02-14 16993/week @ 2024-02-21 15276/week @ 2024-02-28 14319/week @ 2024-03-06 17220/week @ 2024-03-13 16778/week @ 2024-03-20 14817/week @ 2024-03-27

65,563 downloads per month
Used in 48 crates (19 directly)




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 cryptographic primitives such as collision-resistant hash functions, hiding commitments, pseudo-random functions, signatures, and, optionally, R1CS constraints for these.

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/crypto-primitives.git
cargo build --release

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

cargo test


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.


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".


~178K SLoC