iden3 / wasmsnark

A fast zkSnark proof generator written in native Web Assembly.
GNU General Public License v3.0
206 stars 99 forks source link

Check buildPrepareG2 #14

Open paberr opened 4 years ago

paberr commented 4 years ago

Hi,

I am not familiar with your code base, but when comparing the buildPrepareG2 with other pairing implementations, I found a difference in the following line: https://github.com/iden3/websnark/blob/3dd30d54991610d1194cd78e140c4cd89edd3132/src/mnt6753/build_mnt6753.js#L438

Zexe's implementation that I am working with right now computes: let minus_r_affine_x = r.x * &rz2_inv; whereas your code multiplies by rz_inv.

I haven't checked all the code that is following, so perhaps your prepAddStep expects this as an input. However, I still wanted to bring up the difference for you to check.