All Projects → lovesh → bulletproofs-r1cs-gadgets

lovesh / bulletproofs-r1cs-gadgets

Licence: Apache-2.0 license
Arithmatic circuits convertible to R1CS based on Bulletproofs

Programming Languages

rust
11053 projects
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to bulletproofs-r1cs-gadgets

bulletproofs
Bulletproofs and Bulletproofs+ Rust implementation for Aggregated Range Proofs over multiple elliptic curves
Stars: ✭ 62 (-4.62%)
Mutual labels:  bulletproofs, zero-knowledge-proofs
baseline
The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and distributed ledger technology to enable confidential and complex coordination between enterprises while keeping data in systems of record. This repo serves as the main repo for the Baseline Protocol, containing core packages, examples, and r…
Stars: ✭ 565 (+769.23%)
Mutual labels:  zero-knowledge-proofs
bellman-substrate
A library for supporting zk-SNARKs to Substrate
Stars: ✭ 26 (-60%)
Mutual labels:  zero-knowledge-proofs
dusk-zerocaf
Zerocaf: A library built for EC operations in Zero Knowledge.
Stars: ✭ 50 (-23.08%)
Mutual labels:  bulletproofs
WatermarkNN
Watermarking Deep Neural Networks (USENIX 2018)
Stars: ✭ 63 (-3.08%)
Mutual labels:  zero-knowledge-proofs
r1cs-std
R1CS constraints for bits, fields, and elliptic curves
Stars: ✭ 53 (-18.46%)
Mutual labels:  r1cs
haal
Hääl - Anonymous Electronic Voting System on Public Blockchains
Stars: ✭ 96 (+47.69%)
Mutual labels:  zero-knowledge-proofs
awesome-zkp-starter-pack
A curated collection of links for zero-knowledge proof cryptography used in blockchains
Stars: ✭ 63 (-3.08%)
Mutual labels:  zero-knowledge-proofs
Grin
Minimal implementation of the Mimblewimble protocol.
Stars: ✭ 4,897 (+7433.85%)
Mutual labels:  zero-knowledge-proofs
crypto-primitives
Interfaces and implementations of cryptographic primitives, along with R1CS constraints for them
Stars: ✭ 76 (+16.92%)
Mutual labels:  r1cs
threshold-signatures
Threshold Signature Scheme for ECDSA
Stars: ✭ 79 (+21.54%)
Mutual labels:  zero-knowledge-proofs
zkay
A programming language and compiler which enable automatic compilation of intuitive data privacy specifications to NIZK-enabled private smart contracts.
Stars: ✭ 28 (-56.92%)
Mutual labels:  zero-knowledge-proofs
r1cs-tutorial
Tutorial for writing constraints in the `arkworks` framework
Stars: ✭ 74 (+13.85%)
Mutual labels:  r1cs
PS-Signature-and-EL-PASSO
A C++ Implementation of Short Randomizable Signatures (PS Signatures) and EL PASSO (Privacy-preserving, Asynchronous Single Sign-On)
Stars: ✭ 21 (-67.69%)
Mutual labels:  zero-knowledge-proofs
r1cs
A Rust library for building R1CS gadgets
Stars: ✭ 75 (+15.38%)
Mutual labels:  r1cs
zksk
Zero-Knowledge Swiss Knife
Stars: ✭ 56 (-13.85%)
Mutual labels:  zero-knowledge-proofs
marlin
A Rust library for the Marlin preprocessing zkSNARK
Stars: ✭ 215 (+230.77%)
Mutual labels:  r1cs
ripp
Argument systems for inner pairing products
Stars: ✭ 34 (-47.69%)
Mutual labels:  bulletproofs
bellman
Bellman zkSNARK library for community with Ethereum's BN256 support
Stars: ✭ 121 (+86.15%)
Mutual labels:  zero-knowledge-proofs
r1cs-workshop
Notes for the R1CS programming workshop at ZK0x04
Stars: ✭ 19 (-70.77%)
Mutual labels:  r1cs

Creating zero knowledge proofs using the Bulletproofs implementation from dalek-cryptography. This repo contains several examples that show how various statements can be represented as arithmetic circuits which can be converted to R1CS. A blog post was written that explains the Bulletproofs API with several examples, though the API has changed slightly.

Circuits

  1. Prove a number is in certain range
  2. Prove value is non-zero
  3. Prove value is not equal to a given value
  4. Proof of set membership, 2 implementations 1, 2
  5. Proof of set non-membership
  6. Proof knowledge of preimage given image of MiMC hash function
  7. Poseidon permutation, a 2:1 (2 inputs, 1 output) and 4:1 (4 inputs, 1 output) hash function based on it. 2 kinds of S-boxes, cube and inverse. Described in this paper. The parameters are generated using a sage worksheet supplied by Dmitry Khovratovich and a Jupyter notebook for that worksheet is present in the repo called Poseidon_Ristretto.ipynb.
  8. Proof of knowledge of leaf in a sparse merkle tree of width 2, i.e. each node has 2 children. Uses Poseidon 2:1 hash function.
  9. Proof of knowledge of leaf in a sparse merkle tree of width 4, i.e. each node has 4 children. Uses Poseidon 4:1 hash function.

Building

This project uses a slightly modified implementation of Bulletproofs's develop branch. The difference is addition of the methods num_constraints and num_multipliers to Prover to return the number of constraints and multipliers respectively and addition of some new methods in constraint system and linear combinations

  1. evaluate_lc: to evaluate a linear constraint
  2. allocate_single: to return output variable when allocating right multiplier.
  3. simplify: to simplify a linear combination, eg. simplify a linear combination like 2*x + 3*y + 4*x to 6*x + 3*y.

Use the nightly compiler to run tests like
cargo +nightly test --all-features
OR in release mode to run faster
cargo +nightly test --release --all-features

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].