Using zkSnarks to prove random bits between Peggy and Victor
Used
Zokrateslibrary for implementing zkSnarks.
- Victor performed the computation of the main
reveal_bit.zokfile and put the output in areveal_bit_by_Victorfile. - Then performed setup to create the proving key and verification_key.
- Copying this proving key in Peggy's directory.
- Peggy now compiled the main
reveal_bit.zokfile and put the output in areveal_bit_by_Peggyfile. - Peggy then computed a
witness. - Then created a
proofusing witness , Victor's proving key and the compiled program. - Now Victor verifies this proof using his
verification key.
Zokrates use
Groth16proving scheme as default.