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.debugging.md
+68Lines changed: 68 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,3 +70,71 @@ To perform such a side channel analysis, apply the following steps:
70
70
[5] Mehmet Sinan İnci, Berk Gülmezoğlu, Gorka Irazoqui, Thomas Eisenbarth, Berk Sunar, [Seriously, get off my cloud! Cross-VM RSA Key Recovery in a Public Cloud](https://eprint.iacr.org/2015/898.pdf).
71
71
72
72
[6] Thierry Kaufmann, Hervé Pelletier, Serge Vaudenay, and Karine Villegas [When Constant-time Source Yields Variable-time Binary: Exploiting Curve25519-donna Built with MSVC 2015](https://infoscience.epfl.ch/record/223794/files/32_1.pdf).
73
+
74
+
# Generation of ML-DSA Signature Generation Rejection Test Vectors
75
+
76
+
The ML-DSA signature generation contains rejection code paths which are probabilistically triggered during production use. According to FIPS IG 10.3.A and also to ensure proper implementation, the rejection code paths should all be tested.
77
+
78
+
According to FIPS IG 10.3.A, for ML-DSA 87 and 65, three of the four possible rejection code paths are to be triggered (z, r0 and h). For ML-DSA 44, in addition the ct0 rejection code path is to be tested.
79
+
80
+
TODO: The tests are not able to trigger all four rejection code paths for ML-DSA 44 - this needs to be checked with NIST.
81
+
82
+
To generate ML-DSA signature generation test vectors that trigger all required code paths as mentioned above, leancrypto contains a test generator to generate such test vectors for pure, pre-hash and external MU interfaces. The test vector for the internal interface is derived from [1] and thus not generated by leancrypto.
83
+
84
+
The following steps have to be followed if test vectors shall be generated anew:
85
+
86
+
1. In the file `dilithium_signature_impl.h` the macro `REJECTION_TEST_SAMPLING` must be defined.
87
+
88
+
2. In the file `dilithium_edge_case_tester.c` the macro `GENERATE_KEYS` must be defined.
89
+
90
+
3. Ensure that SHA2-256 is enabled, i.e. the meson option `sha2-256` must be enabled (which is active by default)
# Verification of ML-DSA Signature Generation Rejection Test Vectors
125
+
126
+
The (ML-DSA signature generation rejection test vectors)[Generation of ML-DSA Signature Generation Rejection Test Vectors] can be verified to indeed trigger all rejection code paths as follows:
3. Verify the triggering of the rejection code paths by invoking `build/ml-dsa/tests/dilithium_edge_case_tester_c | less` and check the presence of the following logging output depending on which rejection code path you are interested in:
0 commit comments