-
Notifications
You must be signed in to change notification settings - Fork 158
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
edwards: avoid inversions in Add in extended points #442
Conversation
68e033f
to
3a36ad5
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.
Good catch! Add
should implement the strongly unified addition and not the dedicated one + the heavy inverse-based equality check. Maybe we can add AddDedicated
(without the equality check) if we think there is guaranteed use of it (e.g. MSM), although it saves just a mul by constant d
.
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
3a36ad5
to
db9e0f5
Compare
@yelhousni, @gbotrel, rebased. |
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.
👍
Description
This PR proposes solving a performance problem while doing
Add
in Edwards curves.The TL;DR of the problem is that this operation does an equality checking, which involves a very slow inversion.
Type of change
How has this been tested?
This PR doesn’t change the logic or add new border cases, so existing tests cover correct behavior.
How has this been benchmarked?