Skip to content

Fix ML-DSA internal MU tests#964

Open
iomartin wants to merge 3 commits into
cisco:mainfrom
Eideticom:martin/ml-dsa-internal-mu
Open

Fix ML-DSA internal MU tests#964
iomartin wants to merge 3 commits into
cisco:mainfrom
Eideticom:martin/ml-dsa-internal-mu

Conversation

@iomartin

@iomartin iomartin commented Jun 1, 2026

Copy link
Copy Markdown

This PR fixes a couple of issues with ML-DSA vectors.

The first, as described in #963, happens when we try to use internal MU for ML-DSA. This was caused because OpenSSL was encoding the message, which it shouldn't.

The second problem was caused by the order in which test groups were executed. When reading the request JSON, setting one of the variables could be skipped, which caused it to keep the value from the previous iteration, thus producing the wrong result.

With these two fixes, we can switch mu testing from EXTERNAL to BOTH.

It was tested with:

acvp_app --ml_dsa

using OpenSSL 3.5.0.

Resolves: #963

iomartin added 3 commits June 1, 2026 14:46
In deterministic mode, the "rnd_str" variable was not definied, so it
was reused from the last iteration, producing wrong results.
When signatureInterface=internal and externalMu=false, the ACVP server
provides M' directly and OpenSSL must not encode it.

The current code was telling OpenSSL to encode it which caused all
tested with internal Mu to fail.
Last commit fixed the problem that caused internal mu to fail. We can
now test with both internal and external mu.
@abkarcher

abkarcher commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Hello,

Thank you very much for the explanation and fix! I am busy on some other work presently but wanted to drop in and acknowledge this - I will take a look at it in the next week or so hopefully.

Thanks,
Andrew

@abkarcher abkarcher requested review from abkarcher and bfussell June 3, 2026 19:13
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.

ML-DSA sign/verify fails with internal signature and mu

2 participants