-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move ecc and wrong-field arithmetic gadgets to bellpepper-gadgets
#324
Comments
For future reference, it would be good to see if the ECC gadget can be optimized further. Some resources: |
Regarding safety, I was under the assumption that |
If we specialize this to Weierstrass curves |
@adr1anh thanks for those notes. One thing to remark (because it has consequences on the footprint of our code) is the shift you're suggesting in the in-circuit representation of the infinity (i.e. giving the infinity point coordinates) already exists implicitly in the out-of-circuit representation. (Fledgeling) Zcash dogma would return Which is why our implementation of the This doesn't remove anything from what you're saying (we could indeed compact the identity point inside the affine coordinate data model), I'm just documenting the details of what already happens out of circuit for shared understanding. |
Thanks for the additional context, my guess is the original API must have been designed this way to account for constant-time computation. We should definitely be careful if we were to change the semantics of the gadget, but that's something we can explore in more detail later. |
Another thing to explore would be the use of the GLV endomorphism which is supported on BN254, this may potentially lead to a small speedup. |
Copy pasting a comment from Zulip for future reference:
|
The
src/gadgets/
folder has a lot of gadgets for elliptic curve and wrong-field operations that could be broadly useful in other projects.We should move these gadgets to bellpepper-gadgets.
The text was updated successfully, but these errors were encountered: