cpython/Modules/_hacl/internal
Jonathan Protzenko 325e9b8ef4
gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316)
This replaces the existing hashlib Blake2 module with a single implementation that uses HACL\*'s Blake2b/Blake2s implementations. We added support for all the modes exposed by the Python API, including tree hashing, leaf nodes, and so on. We ported and merged all of these changes upstream in HACL\*, added test vectors based on Python's existing implementation, and exposed everything needed for hashlib.

This was joint work done with @R1kM.

See the PR for much discussion and benchmarking details.   TL;DR: On many systems, 8-50% faster (!) than `libb2`, on some systems it appeared 10-20% slower than `libb2`.
2024-08-13 21:42:19 +00:00
..
Hacl_Hash_Blake2b.h gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316) 2024-08-13 21:42:19 +00:00
Hacl_Hash_Blake2b_Simd256.h gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316) 2024-08-13 21:42:19 +00:00
Hacl_Hash_Blake2s.h gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316) 2024-08-13 21:42:19 +00:00
Hacl_Hash_Blake2s_Simd128.h gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316) 2024-08-13 21:42:19 +00:00
Hacl_Hash_MD5.h gh-99108: Refresh HACL*; update modules accordingly; fix namespacing (GH-117237) 2024-03-26 00:35:26 +00:00
Hacl_Hash_SHA1.h gh-99108: Refresh HACL*; update modules accordingly; fix namespacing (GH-117237) 2024-03-26 00:35:26 +00:00
Hacl_Hash_SHA2.h gh-99108: Refresh HACL*; update modules accordingly; fix namespacing (GH-117237) 2024-03-26 00:35:26 +00:00
Hacl_Hash_SHA3.h gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316) 2024-08-13 21:42:19 +00:00
Hacl_Impl_Blake2_Constants.h gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316) 2024-08-13 21:42:19 +00:00