Skip to content

Pair HashML-DSA-65 with SHA-384 in the unit tests - #36

Open
Frauschi wants to merge 1 commit into
wolfSSL:masterfrom
Frauschi:mldsa65-prehash-sha384
Open

Frauschi wants to merge 1 commit into
wolfSSL:masterfrom
Frauschi:mldsa65-prehash-sha384

Conversation

@Frauschi

Copy link
Copy Markdown
Member

wolfSSL master now rejects a HashML-DSA pre-hash weaker than the parameter set (wolfSSL/wolfssl#11668, FIPS 204 section 5.4). That breaks psa_mldsa_test and psa_sign_context_test on the wolfSSL master CI lane, where ML-DSA-65 with SHA-256 now returns PSA_ERROR_INVALID_ARGUMENT. It also fails test-psa-api (master) on every open PR (for example #35).

  • Both ML-DSA-65 HashML-DSA cases now use SHA-384, which matches the 192-bit parameter set.
  • SHA-256 HashML-DSA stays covered with ML-DSA-44 in psa_mldsa_any_hash_test, psa_mldsa_det_sign_test and psa_copy_key_narrowing_test.

Tested: both tests pass against wolfSSL master and v5.9.4-stable.

wolfSSL master now rejects a HashML-DSA pre-hash weaker than the ML-DSA
parameter set (wolfSSL PR #11668, FIPS 204 section 5.4), so ML-DSA-65
with a SHA-256 pre-hash fails with PSA_ERROR_INVALID_ARGUMENT. That broke
psa_mldsa_test and psa_sign_context_test on the wolfSSL master CI lane.

Switch both ML-DSA-65 cases to SHA-384, which matches the 192-bit
parameter set and passes against wolfSSL master and v5.9.4-stable.
SHA-256 HashML-DSA stays covered with ML-DSA-44 in
psa_mldsa_any_hash_test, psa_mldsa_det_sign_test and
psa_copy_key_narrowing_test.
Copilot AI balanced review requested due to automatic review settings October 21, 2026 07:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The test-only changes consistently apply SHA-384 while preserving existing assertions, with no blocking issues identified.

No open issues 🎉

What changed in this PR

Updates ML-DSA-65 unit tests to use SHA-384, matching wolfSSL’s minimum pre-hash strength requirement.

Changes:

  • Switches interoperability and context tests from SHA-256 to SHA-384.
  • Updates digest buffers, algorithm selections, and test descriptions consistently.
File Description
test/​psa_server/​psa_sign_context_test.c Uses SHA-384 for context-aware HashML-DSA-65 signing and verification.
test/​psa_server/​psa_mldsa_test.c Uses SHA-384 for HashML-DSA-65 cross-path interoperability tests.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants