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: src/ml-dsa/sections/04-testtypes.adoc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,16 +21,16 @@ The IUT *SHALL* generate valid signatures based on the ACVP-provided message, mu
21
21
22
22
There are several assurances to obtain from AFTs. First is correctness of the algorithm implementation. The server *SHALL* include at least 15 tests for each combination of capabilities to meet this assurance. The `"hashAlg"` capability *MAY* be excluded from the combination of capabilities due to the number of supported hash functions. Each `"hashAlg"` provided by the IUT *SHALL* be covered within the at least 15 tests generated for each combination of capabilities.
23
23
24
-
The second assurance is correctness under all rejection paths. Within ML-DSA sigGen, the algorithm enters a loop until a valid signature is found. The loop contains four potential reasons to reject a candidate signature: if the z infinity norm is too large, if the r infinity norm is too large, if there are too many hints in h, or if the ct0 infinity norm is too large. These conditions occur at various rarities that can make it difficult to test each error condition with randomized testing. If an implementation adheres strictly to the pseudocode in <<FIPS204>>, the following table provides helpful known answer tests that trigger each rejection case exactly once. If the implementation varies from the psuedocode, it would be prudent to use a debugger or other tooling to ensure that all rejection cases are triggered by testing. To save on space, the table will provide the seed used to generate the key pair, a hash of the keys, SHA2-256(pk || sk), and a hash of the resulting signature, SHA2-256(sig). All cases are defined using the deterministic signature method. Note that the ct0 infinity norm check only applies to ML-DSA-44. This condition is not possible on the other security levels. Thanks to Qinglai Xiao and Mike Hamburg (Rambus Inc) for providing code to generate these test cases; more information on their technique is available on the NIST PQC-Forum <<PQCForum>>.
24
+
The second assurance is correctness under all rejection paths. Within ML-DSA sigGen, i.e., in Algorithm 7 `ML-DSA.Sign_internal()`, the algorithm enters a loop until a valid signature is found. The loop contains four potential reasons to reject a candidate signature: if the z infinity norm is too large, if the r infinity norm is too large, if there are too many hints in h, or if the ct0 infinity norm is too large. These conditions occur at various rarities that can make it difficult to test each error condition with randomized testing. If an implementation adheres strictly to the pseudocode in Algorithm 7 `ML-DSA.Sign_internal()` <<FIPS204>>, the following table provides helpful known answer tests that trigger each rejection case exactly once. If the implementation varies from the psuedocode, it would be prudent to use a debugger or other tooling to ensure that all rejection cases are triggered by testing. To save on space, the table will provide the seed used to generate the key pair, a hash of the keys, SHA2-256(pk || sk), and a hash of the resulting signature, SHA2-256(sig). All cases are defined using the deterministic signature method, Algorithm 7 `ML-DSA.Sign_internal()`. Note that the ct0 infinity norm check only applies to ML-DSA-44. This condition is not possible on the other security levels. Thanks to Qinglai Xiao and Mike Hamburg (Rambus Inc) for providing code to generate these test cases; more information on their technique is available on the NIST PQC-Forum <<PQCForum>>.
25
25
26
26
The server *SHALL* include at least 5 tests that cover all rejection outcomes for all combinations of capabilities where `"signatureInterface" = "internal"` and `"deterministic" = true`. The internal signature interface is described in <<FIPS204>> Algorithm 7 ML-DSA.`Sign_internal()` must be used to test this assurance. The <<kats_table>> provides valid test cases for this assurance.
27
27
28
28
The third assurance is correctness under a large number of rejections. The standard, <<FIPS204>>, does not define an upper limit on the number of potential rejections. Implementations that abort early may leak information about the underlying key. The server *SHALL* include at least 5 tests that lead to at least 32 rejections where `"signatureInterface" = "internal"` and `"deterministic" = true`. The internal signature interface described in <<FIPS204>> Algorithm 7 `ML-DSA.Sign_internal()` must be used to test this assurance. The <<rejections_table>> provides valid test cases for this assurance.
29
29
30
30
[[kats_table]]
31
-
.ML-DSA sigGen Known Answer Tests for Rejection Cases
31
+
.ML-DSA Algorithm 7 `ML-DSA.Sign_internal()` Known Answer Tests for Rejection Cases
0 commit comments