zkmopro / mopro

Making client-side proving on mobile simple.
https://zkmopro.org
Apache License 2.0
131 stars 35 forks source link

feat: bls12-381 support #207

Closed chancehudson closed 4 months ago

chancehudson commented 4 months ago

Closes #203

This PR implements zkey loading, proving, and verifying over a generic curve. We automatically detect the curve from the zkey and use the correct implementation, or error if using an unrecognized curve. Supported curves:

We should check binary sizes when adding additional curves. It might be worth conditionally compiling the curves.

TODO:

cloudflare-workers-and-pages[bot] commented 4 months ago

Deploying mopro with  Cloudflare Pages  Cloudflare Pages

Latest commit: ad7f51e
Status: ✅  Deploy successful!
Preview URL: https://85195d63.mopro.pages.dev
Branch Preview URL: https://circom-detect-curve.mopro.pages.dev

View logs

chancehudson commented 4 months ago

This PR is ready for review. I wrote a poseidon implementation for bls and wanted to use that for the tests here but it's making incorrect proofs. I documented the issue in #208 and added a different circuit for testing bls.