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
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,27 @@ All times recorded using a Intel Core i7-9750H CPU averaged over 1000 calls.
210
210
211
211
## Discussion of Implementation
212
212
213
+
### External Mu
214
+
215
+
Within FIPS 204, there is the option when signing for the value $\mu = H(H(\textsf{pk}) || M')$ to be computed outside of the main signing algorithm and instead be passed into the signature as explicit input. Notice that $\mu$ is formed from only public data, and allows signing a fixed sized (hashed) message (64 bytes) rather than an arbitrary sized message $M'$.
216
+
217
+
An API which signs given $\mu$ rather than a message $m$ is known as "external mu ML-DSA" and is a popular choice over Hash-ML-DSA due to the fact that both "pure" and external mu ML-DSA can be verified with the same method, where as HASH-ML-DSA necessarily requires a separate verification function leading to complications.
218
+
219
+
Following Appendix D of the [lamps dilithium signature draft](https://datatracker.ietf.org/doc/html/draft-ietf-lamps-dilithium-certificates-07) we additionally offer the external mu API by exposing two additional methods.
220
+
221
+
```py
222
+
>>>from dilithium_py.ml_dsa importML_DSA_44
223
+
>>>
224
+
>>># Example of signing with external mu
225
+
>>> pk, sk =ML_DSA_44.keygen()
226
+
>>> msg =b"Your message signed by ML_DSA"
227
+
>>> mu =ML_DSA_44.prehash_external_mu(pk, msg)
228
+
>>> sig =ML_DSA_44.sign_external_mu(sk, mu)
229
+
>>>assertML_DSA_44.verify(pk, msg, sig)
230
+
```
231
+
232
+
The method `prehash_external_mu(pk, m)` takes as input the public data and computes the prehash `mu`. This is then passed to a new signing API which anticipates $\mu$ instead of the message itself. To verify this signature, we can use the regular method for verification.
233
+
213
234
### Optimising decomposition and making hints
214
235
215
236
You may notice that ML DSA has marginally slower signing than the reported
0 commit comments