Repository navigation
mldsa: reject a HashML-DSA pre-hash weaker than the parameter set - #525
Open
padelsbach wants to merge 1 commit into
Open
padelsbach wants to merge 1 commit into
padelsbach wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unconditional ML-DSA success tests fail DigestSignInit on valid builds without SHA-384 or SHA-512 and need guards for the corresponding digest features.
1 open issue
What changed in this PR
Aligns wolfProvider’s HashML-DSA pre-hash validation with wolfSSL’s minimum-strength requirement, addressing the reported CI failures.
Changes:
- Rejects digests whose collision strength is below the ML-DSA parameter set’s security strength, unless weak pre-hashes are explicitly enabled.
- Adds an internal accessor for ML-DSA security strength.
- Expands tests to cover accepted and rejected digest choices across parameter sets.
| File | Description |
|---|---|
test/test_mldsa.c |
Adds table-driven pre-hash acceptance, rejection, and round-trip tests. |
src/wp_mldsa_sig.c |
Enforces parameter-set-specific minimum pre-hash strength. |
src/wp_mldsa_kmgmt.c |
Implements the security-strength accessor. |
include/wolfprovider/alg_funcs.h |
Declares the new internal accessor. |
Review effort: Balanced
padelsbach
force-pushed
the
mldsa-prehash-strength
branch
from
October 31, 2026 01:49
b2687a5 to
574215b
Compare
Contributor
Author
|
jenkins retest this please (boz-xeon5 missing install android ndk, now installed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

wolfSSL commit
7f6d4daa96enforces a minimum prehash size. WP tests use SHA256 (128b collision strength) with ML-DSA-65 (192 bits), and now fails.Fixes failing wolfSSL PQC KAT and wolfSSL versions CI workflows.