gh-140120: Refresh HACL* to fix an hmac memory leak (GH-140188)
This pulls an updated version of HACL* that fixes the memory leak reported in GH-140120, via an upstream fix.
(cherry picked from commit 3a81313019)
Co-authored-by: Jonathan Protzenko <jonathan.protzenko+github@gmail.com>
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`.