-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
@@ -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" } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters