-
Notifications
You must be signed in to change notification settings - Fork 121
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
[EC] Unify scalar multiplication of the base point for ec_nistp curves #1720
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1720 +/- ##
==========================================
- Coverage 78.77% 78.75% -0.03%
==========================================
Files 590 591 +1
Lines 101482 101441 -41
Branches 14396 14384 -12
==========================================
- Hits 79945 79892 -53
- Misses 20902 20914 +12
Partials 635 635 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues:
CryptoAlg-2544
Description of changes:
Added unified scalar multiplication of the base point for curves implemented in ec_nistp.
For this, we implement exactly the same algorithm as the one already implemented for
scalar multiplication of an arbitrary point with one difference -- we use a precomputed
table of multiples of the base point.
Measured on Apple M1:
P-384 scalar_mul_base from 26863 to 28579 ops/s,
P-521 scalar_mul_base from 18051 to 18401 ops/s,
Measured on Intel(R) Xeon(R) Platinum 8488C:
P-384 scalar_mul_base from 22872 to 22962 ops/s,
P-521 scalar_mul_base from 15090 to 14153 ops/s,
Call-outs:
CryptoAlg-2772 captures the issue with the FIPS module size for the static build for Arm. In this PR I temporarily moved the EC precomputed tables outside of the module. Once CryptoAlg-2772 is resolved we'll move them back in.
Testing:
How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.