split-witness
Instead of performing the witness extension in MPC, one can also secret share the .gz witness file computed by Noir. The command is the following:
Example
co-noir split-witness --witness test_vectors/poseidon/poseidon.gz --circuit test_vectors/poseidon/poseidon.json --protocol REP3 --out-dir test_vectors/poseidon
Here, poseidon.json
is the circuit file from Noir, poseidon.gz
the extended witness from noir, and the output shares are stored in test_vectors/poseidon
. The output shares are thereby indistinguishable from the output shares produced by the GenerateWitness command.
For SplitWitness, both REP3 and Shamir are supported.
Reference
Splits an existing witness file generated by noir into secret shares for use in MPC
Usage: co-noir split-witness [OPTIONS]
Options:
--config <CONFIG> The path to the config file
--witness <WITNESS> The path to the input witness file generated by Noir
--circuit <CIRCUIT> The path to the circuit file, generated by Noir
--protocol <PROTOCOL> The MPC protocol to be used [possible values: REP3, SHAMIR]
--out-dir <OUT_DIR> The path to the (existing) output directory
-t, --threshold <THRESHOLD> The threshold of tolerated colluding parties [default: 1]
-n, --num-parties <NUM_PARTIES> The number of parties [default: 3]
-h, --help Print help (see more with '--help')