picnixz · GitHub

Closed

@picnixz

@picnixz

@picnixz

eendebakpt

eendebakpt

In this commit, we move the rationale for using HACL*-based MD5
instead of its OpenSSL implementation from the code to this note.
HACL*-based MD5 is 2x faster than its OpenSSL implementation for
creating the hash object via `h = md5(..., usedforsecurity=False)`
but `h.digest()` is slightly (yet noticeably) slower.
Overall, HACL*-based MD5 still remains faster than its OpenSSL-based
implementation, whence the choice of `_md5.md5` over `hashlib.md5`.
In this commit, we move the rationale for using OpenSSL-based SHA-1
instead of its HACL* implementation from the code to this note.
HACL*-based SHA-1 is 2x faster than its OpenSSL implementation for
creating the hash object via `h = sha1(..., usedforsecurity=False)`
but `h.digest()` is almost 3x slower.
Unlike HACL* MD5, HACL*-based SHA-1 is slower than its OpenSSL-based
implementation, whence the choice of `hashlib.sha1` over `_sha1.sha1`.

hauntsaninja

hauntsaninja

@picnixz

@picnixz

eendebakpt

Merged

encukou

@picnixz

@picnixz

@picnixz

@picnixz

@picnixz

picnixz deleted the perf/uuid/init-128150 branch

January 13, 2025 11:46

Closed

Read the original on github.com ↗