HarryR / ethsnarks

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop
GNU Lesser General Public License v3.0
241 stars 57 forks source link

Legacy jubjub isOnCurve gadget fixed #70

Closed swasilyev closed 6 years ago

HarryR commented 6 years ago

Yup this is my mistake, the check got omitted when reducing the number of constraints.

The original has it: https://github.com/barryWhiteHat/baby_jubjub_ecc/blob/master/baby_jubjub_ecc/baby_jubjub.cpp#L72

Can you think of any other test cases which are absolutely essential, such as the negative of is on curve?

swasilyev commented 6 years ago

I will think. Btw, the number of constraints can be reduced to 3 in a very essential way: // axx + yy = 1 + dxxyy (x, x, xx) (y, y, yy) (d xx, yy, a * xx + yy - 1)

HarryR commented 6 years ago

This has been implemented in #74