-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: add ec_mul #886
base: main
Are you sure you want to change the base?
feat: add ec_mul #886
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #886 +/- ##
==========================================
- Coverage 78.10% 77.75% -0.35%
==========================================
Files 63 63
Lines 16700 16789 +89
==========================================
+ Hits 13043 13055 +12
- Misses 3657 3734 +77
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
assert q_high_shifted_y * q_high_shifted_y = q_high_shifted_x * q_high_shifted_x * | ||
q_high_shifted_x + a * q_high_shifted_x + b; | ||
// Assert q_low is on curve or point at infinity | ||
assert q_low_y * q_low_y = is_on_curve_q_low * (q_low_x * q_low_x * q_low_x + a * q_low_x + b) + (1 - is_on_curve_q_low) * q_low_x; |
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.
is_on_curve_q_low = 0 => q_low_y**2 == q_low_x
but why does this mean that both are 0 ?
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.
If both are 0 then it's the point at infinity (x=0, y=0)
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.
is_on_curve
should be refactored as is_point_at_infinity
, more accurate on what is expected/done
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.
missing a test for ec_mul
Closes #853
Closes #854
Closes #178