-
Notifications
You must be signed in to change notification settings - Fork 67
feat: twisted edwards curves #633
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
✅ Deploy Preview for contracts-stylus canceled.
|
…wisted-edwards-curves
|
||
impl_additive_ops_from_ref!(Projective, TECurveConfig); | ||
|
||
impl<'a, P: TECurveConfig> Add<&'a Self> for Projective<P> { |
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.
Would it make sense to implement ref + ref
?
/// | ||
/// * If point is not on curve. | ||
/// * If point is not in the prime-order subgroup. | ||
pub fn new(x: P::BaseField, y: P::BaseField) -> Self { |
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.
Some general comments:
- could any of the new functions be marked with
inline(always)
ormust_use
? - some flows are not covered with unit tests
- could we implement any proptests for this?
- missing CHANGELOG
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.
Agree with @0xNeshi 💯
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.
Actually sw also missing some flows and proptests. Currently tests are enough just to validate implementation. But we will add much more proptests in future.
Added notion in the CHANGELOG
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.
Almost looks good, take care of @0xNeshi comments please.
/// | ||
/// * If point is not on curve. | ||
/// * If point is not in the prime-order subgroup. | ||
pub fn new(x: P::BaseField, y: P::BaseField) -> Self { |
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.
Agree with @0xNeshi 💯
Follows #589
PR Checklist