Title: Add truncated SHA512/224 and SHA512/256
Type: enhancement Stage: patch review
Components: Extension Modules Versions: Python 3.8
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, gregory.p.smith, martin.panter, nicktimko, sir-sigurd
Priority: normal Keywords: patch

Created on 2016-04-23 19:27 by christian.heimes, last changed 2020-08-07 07:39 by sir-sigurd.

File name Uploaded Description Edit
cpython-cheimes-0001-Add-truncate-SHA512-224-and-SHA512-256-hash-algorith.patch christian.heimes, 2016-04-23 19:27 review
Messages (3)
msg264068 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2016-04-23 19:27
SHA512/224 and SHA512/256 are truncated versions of SHA512. Just like SHA384 they use the same algorithm but different initial values and a smaller digest. I took the start vectors and test values from libtomcrypt.

Like in my blake2 branch I have add tp_new to the types and removed the old factory methods. Now it is possible to instantiate the types.

The code is also in my github fork
msg266471 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-05-27 03:18
Would it be appropriate to mention these hashes higher up in the documentation, e.g. where it lists the names of the always-present constructors?

I haven’t had a close look at the C code. It looks like you are also adding better multithreading support for SHA-512 objects (? related to Issue 4821).
msg316086 - (view) Author: Nick Timkovich (nicktimko) * Date: 2018-05-02 19:36
Was this patch mostly ready to go? The additional SHA512 variants are appealing because they run ~40% faster than SHA256 on 64-bit hardware for longer messages.
Date User Action Args
2020-08-07 07:39:42sir-sigurdsetnosy: + sir-sigurd
2018-05-02 21:44:12gregory.p.smithsetversions: + Python 3.8, - Python 3.6
2018-05-02 19:36:01nicktimkosetnosy: + nicktimko
messages: + msg316086
2016-05-27 03:18:22martin.pantersetnosy: + martin.panter
messages: + msg266471
2016-04-23 19:27:41christian.heimescreate