Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
naure committed Aug 19, 2020
1 parent 67cbdc1 commit 8c7497e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
name = "zkinterface_bellman"
version = "1.1.4"
authors = ["Aurélien Nicolas <[email protected]>"]
license = "MIT"
edition = "2018"
description = "Bellman circuit construction and proving system for zkInterface"
homepage = "https://github.com/QED-it/zkinterface-bellman"
repository = "https://github.com/QED-it/zkinterface-bellman"
keywords = ["zero-knowledge", "zkproof", "cryptography"]

[lib]
name = "zkinterface_bellman"
Expand All @@ -16,10 +21,10 @@ path = "src/bin.rs"
zokrates = ["num-bigint"]

[dependencies]
ff = { git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" }
pairing = { git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" } # "0.14.2"
bellman = { git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" } # "0.1.0"
sapling-crypto = { git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" }
ff = { version = "0.4.0", git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" }
pairing = { version = "0.14.2", git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" }
bellman = { version = "0.1.0", git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" }
sapling-crypto = { version = "0.0.1", git = "https://github.com/zcash/librustzcash", rev="d7ba3102948b1b144e24462dc36c37091dda6355" }

zkinterface = { version = "1.1.4", path = "../zkinterface/rust" }

Expand Down
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
# zkInterface Bellman adapter

See https://github.com/QED-it/zkinterface
More on zkInterface: https://github.com/QED-it/zkinterface

More on Bellman: https://github.com/zcash/librustzcash

## Usage

Bellman prover.

Validate that the witness satisfies the constraints:

zkif_bellman validate

Print the circuit in a text-form:

zkif_bellman print

Generate public parameters:

zkif_bellman setup <workspace>

Generate a proof using the public parameters:

zkif_bellman prove <workspace>

The circuit and witness are read from stdin in zkInterface format.
The filenames of keys and proofs are derived from the workspace argument; defaults to the current directory.

## Example:

Create a proving key:

cat src/test/messages/circuit_r1cs.zkif src/test/messages/r1cs.zkif | cargo run --release
cat src/demo_import_from_zokrates/messages/*.zkif | cargo run --release setup

Create a proof:

cat src/test/messages/circuit_witness.zkif src/test/messages/witness.zkif | cargo run --release

cat src/demo_import_from_zokrates/messages/*.zkif | cargo run --release prove
4 changes: 4 additions & 0 deletions src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ use std::env;
const USAGE: &str = "Bellman prover.
Validate that the witness satisfies the constraints:
zkif_bellman validate
Print the circuit in a text-form:
zkif_bellman print
Generate public parameters:
zkif_bellman setup <workspace>
Generate a proof using the public parameters:
zkif_bellman prove <workspace>
The circuit and witness are read from stdin in zkInterface format.
Expand Down

0 comments on commit 8c7497e

Please sign in to comment.