Skip to content

Conversation

@WillChilds-Klein
Copy link
Contributor

@WillChilds-Klein WillChilds-Klein commented Aug 14, 2023

Issues:

Addresses CryptoAlg-2036

Description of changes:

OpenSSL has a function EVP_MD_do_all that works the same way as EVP_MD_do_all_sorted (which AWS-LC currently provides), except that it gives no guarantees on the order in which it calls its input function over the digest collection. Presumably, OpenSSL separates these two functions out for performance reasons, as EVP_MD_do_all_sorted performs a runtime quicksort (see also here) on the collection. AWS-LC does the "sort" manually at build time, so there's no runtime sorting cost and we can just call out to EVP_MD_do_all_sorted in our EVP_MD_do_all implementation.

Call-outs:

n/a

Testing:


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.

Co-authored-by: Andrew Hopkins <[email protected]>
@WillChilds-Klein WillChilds-Klein marked this pull request as ready for review August 14, 2023 22:17
@WillChilds-Klein WillChilds-Klein requested a review from a team as a code owner August 14, 2023 22:17
@WillChilds-Klein WillChilds-Klein merged commit 4f852cd into aws:main Aug 15, 2023
@WillChilds-Klein WillChilds-Klein deleted the evp-md-do-all branch December 19, 2023 15:06
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.

3 participants