1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
This commit is contained in:
schaeff 2021-07-02 18:36:36 +02:00
parent 62e933d001
commit f50c3af402
2 changed files with 13 additions and 7 deletions

View file

@ -14,6 +14,7 @@ Proving schemes supported by ZoKrates require a pairing-friendly elliptic curve.
Default: `ALT_BN128`
When not using the default, the CLI flag has to be provided for the following commands:
- `universal-setup`
- `compile`
- `export-verifier`
- `verify`
@ -22,15 +23,19 @@ When not using the default, the CLI flag has to be provided for the following co
ZoKrates supports different proving schemes. We identify the schemes by the reference to the paper that introduced them. Currently the options available are:
| Scheme | CLI flag | Curves |
| ---- | -------- | ------ |
| [G16](https://eprint.iacr.org/2016/260) | `--proving-scheme g16` | ALTBN_128, BLS12_381 |
| [GM17](https://eprint.iacr.org/2017/540) | `--proving-scheme gm17` | ALTBN_128, BLS12_377, BW6_761 |
| [PGHR13](https://eprint.iacr.org/2013/279) | `--proving-scheme pghr13` | ALTBN_128 |
| Scheme | CLI flag | Curves | Universal |
| ---- | -------- | ------ | ------------|
| [G16](https://eprint.iacr.org/2016/260) | `--proving-scheme g16` | ALTBN_128, BLS12_381 | No |
| [GM17](https://eprint.iacr.org/2017/540) | `--proving-scheme gm17` | ALTBN_128, BLS12_377, BW6_761 | No |
| [Marlin](https://eprint.iacr.org/2019/1047) | `--proving-scheme marlin` | ALTBN_128, BLS12_377, BW6_761 | Yes |
| [PGHR13](https://eprint.iacr.org/2013/279) | `--proving-scheme pghr13` | ALTBN_128 | No |
Default: `G16`
All schemes have a circuit-specific setup phase called `setup`. Universal schemes also feature a preliminary, circuit-agnostic step called `universal-setup`. The advantage of universal schemes is that only the `universal-setup` step requires trust, so that it can be run a single time and reused trustlessly for many programs.
Default: `G16`, except for `universal-setup` for which the default is `Marlin`
When not using the default, the CLI flag has to be provided for the following commands:
- `universal-setup`
- `setup`
- `export-verifier`
- `generate-proof`
@ -49,6 +54,7 @@ ZoKrates supports multiple backends. The options are the following:
Default: `bellman`
When not using the default, the CLI flag has to be provided for the following commands:
- `universal-setup`
- `setup`
- `generate-proof`
- `verify`

View file

@ -124,7 +124,7 @@ pub fn exec(sub_matches: &ArgMatches) -> Result<(), String> {
Parameters(BackendParameter::Ark, _, SchemeParameter::MARLIN) => {
let setup_path = Path::new(sub_matches.value_of("universal-setup-path").unwrap());
let setup_file = File::open(&setup_path)
.map_err(|why| format!("Couldn't open {}: {}", path.display(), why))?;
.map_err(|why| format!("Couldn't open {}: {}\nExpected an universal setup, make sure `zokrates universal-setup` was run`", setup_path.display(), why))?;
let mut reader = BufReader::new(setup_file);