Skip to content
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

Add EC_GROUP mutablility to custom curves #1881

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

samuel40791765
Copy link
Contributor

@samuel40791765 samuel40791765 commented Sep 26, 2024

Issues:

Resolves CryptoAlg-2547

Description of changes:

Following up on #1860 which introduces an API to return a mutable EC_GROUP, this commit applies the same concept for custom curves. Custom curves are already dynamically allocated, but were logically immutable due to the strict enforcement of calling EC_GROUP_new_curve_GFp -> EC_GROUP_set_generator.
The reference call in EC_GROUP that was used for custom curves is no longer needed. We actually duplicate the structure instead.

Call-outs:

N/A

Testing:

Test using a custom generator identical to P-256.

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.

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.51%. Comparing base (ca8180c) to head (bf170e6).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1881      +/-   ##
==========================================
+ Coverage   78.49%   78.51%   +0.02%     
==========================================
  Files         585      585              
  Lines       99630    99712      +82     
  Branches    14254    14262       +8     
==========================================
+ Hits        78206    78291      +85     
+ Misses      20789    20786       -3     
  Partials      635      635              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samuel40791765 samuel40791765 marked this pull request as ready for review October 4, 2024 18:32
@samuel40791765 samuel40791765 requested a review from a team as a code owner October 4, 2024 18:32
crypto/fipsmodule/ec/ec.c Show resolved Hide resolved
crypto/fipsmodule/ec/ec.c Outdated Show resolved Hide resolved
crypto/fipsmodule/ec/ec.c Outdated Show resolved Hide resolved
crypto/fipsmodule/ec/ec.c Show resolved Hide resolved
crypto/fipsmodule/ec/ec.c Outdated Show resolved Hide resolved
crypto/fipsmodule/ec/ec.c Outdated Show resolved Hide resolved
crypto/fipsmodule/ec/ec.c Outdated Show resolved Hide resolved
@samuel40791765 samuel40791765 merged commit b171716 into aws:main Oct 14, 2024
113 of 115 checks passed
@samuel40791765 samuel40791765 deleted the ec-conversion-custom-4 branch October 14, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants