-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Implement the elliptic curve group law #545
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
Conversation
The implementation is done for a finite field of characteristic != 2, 3 and the curve of the form `y^2 = x^3 + Ax^2 + B`. Also include an implementation of a finite field of prime order P which is used in examples and tests.
I am considering to split this PR into two:
What do you think? |
The `Field` trait actually describes any field, not only a field representable by i64.
Feel free to split this into 2 PRs. And could you implement Field in a separate file? So that it can be reused for other algorithms |
Ping me when it's time to review |
The field trait will allow us to define an elliptic curve over any field. We provide an implementation of the trait for a prime field of order `P`, that is, the field isomorpic to the finite field `GF(P) = ℤ/Pℤ`. This field will be used to define specific elliptic curves.
Based on top of #549. Waiting for the latter to be reviewed first. |
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.
Looks good, thanks!
Description
The implementation is done for a finite field of characteristic != 2, 3
and the curve of the form
y^2 = x^3 + Ax^2 + B
.Type of change
Please delete options that are not relevant.
Checklist:
cargo clippy --all -- -D warnings
just before my last commit and fixed any issue that was found.cargo fmt
just before my last commit.cargo test
just before my last commit and all tests passed.COUNTRIBUTING.md
and my code follows its guidelines.