akosba / jsnark

A Java library for zk-SNARK circuits
MIT License
207 stars 85 forks source link

Change the curve #21

Closed SilverPoker closed 4 years ago

SilverPoker commented 4 years ago

Hi akosba, Is it still correct if I implement another curve in libsnark and use the same .arith and .in file directly as my input? I tried using the MNT4753 for libsnark which is a 768bit-curve but the constraint system doesn't satisfy itself. (assertion in CircuitReader.cpp, some assigned value changes because the field changes) I wonder whether this library can only use a 254-bit curve as its backend now?

But the way I used the implementation from coda, I think the curve has the same api as other curves in libsnark. https://github.com/CodaProtocol/gpu-groth16-prover-3x

akosba commented 4 years ago

You will need to update the configuration file in jsnark accordingly.

SilverPoker commented 4 years ago

It works, thank you very much! I have been looking for the bug for several days...