Description
Feature or enhancement
Proposal:
There are a few typos in hashlib.__doc__
and I would like the usage example to be consistent (one example is MD5 while the other, introduced by "more condensed:" is using SHA-224). We also say:
Choose your hash function wisely. Some have known collision weaknesses. sha384 and sha512 will be slow on 32 bit platforms.
But SHA-384 and SHA-512 won't be necessary slow on 32-bit platforms. What we can say however is that, depending on how it's implemented, they are usually faster on 64-bit platforms compared to SHA-224 and SHA-256. The reason is that internal computations use 64-bit words, whereas the SHA-224 and SHA-256 use 32-bit words, even on 64-bit platforms.
As I haven't exactly reviewed the performance and the OpenSSL/HACL* implementations of SHA-384 and SHA-512, I suggest we remove this notice as it could be misleading. Saying that they will be faster than SHA-224 and SHA-256 should also be avoided as I can't test this. So, I would say:
Choose your hash function wisely. Some have known collision weaknesses, while others may be slower depending on the CPU architecture.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response