gh-99108: Import SHA2-384/512 from HACL* (#101707)

Replace the builtin hashlib implementations of SHA2-384 and SHA2-512
originally from LibTomCrypt with formally verified, side-channel resistant
code from the [HACL*](https://github.com/hacl-star/hacl-star/) project.
The builtins remain a fallback only used when OpenSSL does not provide them.
This commit is contained in:
Jonathan Protzenko 2023-02-14 01:25:16 -08:00 committed by GitHub
parent 8be8101bca
commit e5da9ab2c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1259 additions and 434 deletions

2
configure generated vendored
View file

@ -26950,7 +26950,7 @@ fi
as_fn_append MODULE_BLOCK "MODULE__SHA512_STATE=$py_cv_module__sha512$as_nl"
if test "x$py_cv_module__sha512" = xyes; then :
as_fn_append MODULE_BLOCK "MODULE__SHA512_CFLAGS=-I\$(srcdir)/Modules/_hacl/include -I\$(srcdir)/Modules/_hacl/internal -D_BSD_SOURCE -D_DEFAULT_SOURCE$as_nl"
fi