Skip to main content

generate-proof

The aim of the generate-proof command is to run proof generation in MPC using the provided public inputs and witness shares.

Example

co-circom generate-proof --witness test_vectors/poseidon/witness.wtns.0.shared --zkey test_vectors/poseidon/poseidon.zkey --protocol REP3 --config configs/party1.toml --out proof.json --public-input public_input.json

The above command takes a witness share test_vectors/poseidon/witness.wtns.0.shared, a traditional circom .zkey file and a networking config and produces a circom-compatible proof proof.json, with a circom-compatible public input file public_input.json.

Reference

$ co-circom generate-proof --help
Evaluates the prover algorithm for the specified circuit and witness share in MPC

Usage: co-circom generate-proof [OPTIONS] <PROOF_SYSTEM>

Arguments:
<PROOF_SYSTEM> The proof system to be used [possible values: groth16, plonk]

Options:
--config <CONFIG> The path to the config file
--witness <WITNESS> The path to the witness share file
--zkey <ZKEY> The path to the proving key (.zkey) file, generated by snarkjs setup phase
--protocol <PROTOCOL> The MPC protocol to be used [possible values: REP3, SHAMIR]
--curve <CURVE> The pairing friendly curve to be used [possible values: BN254, BLS12-381]
--out <OUT> The output file where the final proof is written to. If not passed, this party will not write the proof to a file
--public-input <PUBLIC_INPUT> The output JSON file where the public inputs are written to. If not passed, this party will not write the public inputs to a file
-t, --threshold <THRESHOLD> The threshold of tolerated colluding parties [default: 1]
-h, --help Print help (see more with '--help')