scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.82k stars 583 forks source link

Remove gamma from the groth16 snark #137

Open imeckler opened 5 years ago

imeckler commented 5 years ago

This PR removes gamma from the Groth16 implementation (or put another way, it sets gamma equal to one). The benefit is that it makes the verification key one G2 element smaller, which is a big win from the point of view of proof composition.

From conversations with @arielgabizon, Mary Maller, and independent verification from @vanishreerao, I learned that this term is not actually necessary for any part of the security proof.

dtebbs commented 5 years ago

In r1cs_gg_ppzksnark_generator, don't you need to set G2_gen to one? Otherwise this value needs to appear in the resulting verification key.