-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This replaces our dynamically creating singleton EC_GROUPs from curve data with static EC_GROUP instances. They're just shy of being fully static because delocate still forces us go to through CRYPTO_once to initialize structures with pointers. (Though, without delocate, the loader would need similar initialization via a runtime relocation.) This means we can now have functions like EC_group_p256(), analogous to EVP_sha256(). These are infallible functions that return const EC_GROUP pointers. Although there is an initial 2KiB hit to binary size (now we precompute a few more Montgomery values), I'm hoping it'll eventually help binaries that only use a few of the curves to drop the others. Also it removes some locks used to initialize the static curve objects, as well as removing an annoying error condition. Bug: 20 Change-Id: Id051c5439f2b2fe2b09bf10964d656503ee27d9e Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/60931 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
- Loading branch information
Showing
9 changed files
with
845 additions
and
504 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
Oops, something went wrong.