diff --git a/Cargo.toml b/Cargo.toml index 8cd4e67..9db12a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,12 @@ name = "zkinterface_bellman" version = "1.1.4" authors = ["Aurélien Nicolas "] +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" @@ -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" } diff --git a/README.md b/README.md index 0df3e6a..c5765fb 100644 --- a/README.md +++ b/README.md @@ -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 + +Generate a proof using the public parameters: + + zkif_bellman prove + +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 diff --git a/src/bin.rs b/src/bin.rs index dbfaaa1..7d3b38b 100644 --- a/src/bin.rs +++ b/src/bin.rs @@ -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 Generate a proof using the public parameters: + zkif_bellman prove The circuit and witness are read from stdin in zkInterface format.