Skip to content

Commit a242919

Browse files
committed
add external mu to README
1 parent b0d6f22 commit a242919

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,27 @@ All times recorded using a Intel Core i7-9750H CPU averaged over 1000 calls.
210210

211211
## Discussion of Implementation
212212

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 import ML_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+
>>> assert ML_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+
213234
### Optimising decomposition and making hints
214235

215236
You may notice that ML DSA has marginally slower signing than the reported

0 commit comments

Comments
 (0)