You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,33 @@ so you can simply import the NIST level you want to play with:
144
144
The above example would also work with the other NIST levels
145
145
`ML_DSA_65` and `ML_DSA_87`.
146
146
147
+
#### Hash ML-DSA
148
+
149
+
Following algorithms 4 and 5 of FIPS 204 we also include a version of pre-hash ML-DSA which hashes the message before signing it using SHA512 by default for
150
+
all three security levels. This is used in much the same way as ML-DSA:
There is also support for other hash functions (at the time, only SHA256 and SHAKE128), but there seem to only be OIDs for the pre-hash version using SHA512
168
+
so this is what is included. To access signing with other hash functions the methods are `HASH_ML_DSA_44_WITH_SHA512._sign_with_pre_hash` and
169
+
`HASH_ML_DSA_44_WITH_SHA512._verify_with_pre_hash`. For more information see the
170
+
implementation and comments in `hash_ml_dsa.py`.
171
+
172
+
The pre-hash version of ML-DSA has purposefully been added to a child class of ML-DSA as the signatures which are produced between these variants are incompatible.
173
+
147
174
### Benchmarks
148
175
149
176
Some very rough benchmarks to give an idea about performance:
0 commit comments