ZK-Garage / plonk

A pure Rust PLONK implementation using arkworks as a backend.
https://discord.gg/XWJdhVf37F
Mozilla Public License 2.0
294 stars 76 forks source link

[WIP] Short Weierstrass curve support #157

Closed ghost closed 1 month ago

ghost commented 2 years ago

We need some short weierstrass support for some things, so here is a WIP (only curve addition, not scalar mul yet)

I did some traits magic to allow for compile-time selection of TE or SW for the embedded curve (there may be better ways to do it, though)

I also added the polynomial commitment back into the new CircuitParameters that StandardComposer is generic over, but this is not necessary, it could go back to adding PolynomialCommitment later in the process.

Until Rust merges Chalk type inference, some of the type syntax is crazy, but in the future it should be better.

Feedback welcome :)