-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EC_GROUP mutablility to custom curves (#1881)
Following up on ca8180c 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`. Since, we're now making the curves mutable, the reference call in `EC_GROUP` that was used for custom curves is no longer usable. We actually allocate and duplicate the custom curve structure instead. `EC_GROUP` comparisons also had to be tweaked to account for unfinished custom curves. ### 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.
- Loading branch information
1 parent
cf969b5
commit b171716
Showing
4 changed files
with
173 additions
and
66 deletions.
There are no files selected for viewing
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
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
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
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