]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-99108: Replace SHA3 implementation HACL* version (#103597)
authorJonathan Protzenko <protz@microsoft.com>
Mon, 8 May 2023 03:50:04 +0000 (20:50 -0700)
committerGitHub <noreply@github.com>
Mon, 8 May 2023 03:50:04 +0000 (20:50 -0700)
commit15665d896bae9c3d8b60bd7210ac1b7dc533b093
tree828d0c447265d301089c91aec0803cf67a51e4f8
parent01cc9c1ff79bf18fe34c05c6cd573e79ff9487c3
gh-99108: Replace SHA3 implementation HACL* version (#103597)

Replaces our built-in SHA3 implementation with a verified one from the HACL* project.

This implementation is used when OpenSSL does not provide SHA3 or is not present.

3.11 shiped with a very slow tiny sha3 implementation to get off of the <=3.10 reference implementation that wound up having serious bugs. This brings us back to a reasonably performing built-in implementation consistent with what we've just replaced our other guaranteed available standard hash algorithms with: code from the HACL* project.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
21 files changed:
Makefile.pre.in
Misc/NEWS.d/next/Security/2023-04-17-14-38-12.gh-issue-99108.720lG8.rst [new file with mode: 0644]
Modules/Setup
Modules/Setup.stdlib.in
Modules/_hacl/Hacl_Hash_SHA3.c [new file with mode: 0644]
Modules/_hacl/Hacl_Hash_SHA3.h [new file with mode: 0644]
Modules/_hacl/Hacl_Streaming_Types.h
Modules/_hacl/include/krml/internal/target.h
Modules/_hacl/include/krml/lowstar_endianness.h
Modules/_hacl/internal/Hacl_Hash_SHA3.h [new file with mode: 0644]
Modules/_hacl/python_hacl_namespaces.h
Modules/_hacl/refresh.sh
Modules/_sha3/LICENSE [deleted file]
Modules/_sha3/README.txt [deleted file]
Modules/_sha3/sha3.c [deleted file]
Modules/_sha3/sha3.h [deleted file]
Modules/clinic/sha3module.c.h [moved from Modules/_sha3/clinic/sha3module.c.h with 98% similarity]
Modules/sha3module.c [moved from Modules/_sha3/sha3module.c with 75% similarity]
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Tools/c-analyzer/cpython/_parser.py