-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add Pluto-Eris cycle of curves #98
Conversation
447ae97
to
7ad3a13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, nice work. It's really cool to get these curves implemented!
I have a couple of things that have written down while reviewing:
- README.md needs to be updated mentioning that pluto/eris curves are supported.
- All tests should be inside test modules please.
- Add comments for functions left unimplemented. Why were they unimplemented?
- Add a macro for all
Fq/p/p12/6...Repr
structs. All of them impl the same things over and over. So it's just boilerplate that we can save up. - All of the things that are publicly exported but not docummented should do the exercise of: 1. Think if they need to be exported. 2. if so, add docs. Otherwise change visibility.
I have addressed the comments relevant to this PR. However there are still some unresolved that I think should be fixed in a different PR. Mainly:
|
3446308
to
9b7512d
Compare
Co-authored-by: Zhiyong-Gong <[email protected]> address review comments Remove leftover add: test vectors for `test_from_u512` add and clean docs
Complete Pluto Eris docs
9b7512d
to
9bfa6c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are inconsistent between our comments.
We have the hex representation of only some values for the constants that are defined in this PR.
I think we should either have them all or none. But it's quite confusing to only have "some of them".
We can address in a follow-up PR if you want. But this has to be addressed at some point.
Other than that, LGTM!
Good work with this!!
cc: @daira this might be of your interest! |
* add: Pluto/Eris curves Co-authored-by: Zhiyong-Gong <[email protected]> address review comments Remove leftover add: test vectors for `test_from_u512` add and clean docs * Update Legendre impl Complete Pluto Eris docs
* add: Pluto/Eris curves Co-authored-by: Zhiyong-Gong <[email protected]> address review comments Remove leftover add: test vectors for `test_from_u512` add and clean docs * Update Legendre impl Complete Pluto Eris docs
Implementation of the half-pairing cycle of prime-order curves described here: https://github.com/daira/pluto-eris
Pluto is a Barreto–Naehrig curve and its pairing implementation closely resembles that of
bn256
curve. See the Optimal Ate pairing described in the article: https://eprint.iacr.org/2010/354.pdf.The constants for the fields and its extensions are derived these notebooks: https://github.com/davidnevadoc/ec-constants/tree/main/pluto_eris