Skip to content

ML-DSA service indicator#2666

Merged
torben-hansen merged 19 commits intoaws:mainfrom
jakemas:mldsa-service-indicator
Sep 9, 2025
Merged

ML-DSA service indicator#2666
torben-hansen merged 19 commits intoaws:mainfrom
jakemas:mldsa-service-indicator

Conversation

@jakemas
Copy link
Copy Markdown
Contributor

@jakemas jakemas commented Sep 5, 2025

Issues:

Required for FIPS
Addresses ML-DSA FIPS 204

Description of changes:

Following #1829, this PR adds the service indicator for FIPS 204 ML-DSA (both pure and pre-hash variants).

Testing:

All EVP functions are tested, for keygen, sign, verify, in all levels of ml-dsa, and all pre-hash/pure variants.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@jakemas jakemas marked this pull request as ready for review September 5, 2025 01:41
@jakemas jakemas requested a review from a team as a code owner September 5, 2025 01:41
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.83%. Comparing base (f71f604) to head (193f264).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2666      +/-   ##
==========================================
+ Coverage   78.80%   78.83%   +0.02%     
==========================================
  Files         667      667              
  Lines      113983   114057      +74     
  Branches    16028    16044      +16     
==========================================
+ Hits        89826    89913      +87     
+ Misses      23382    23370      -12     
+ Partials      775      774       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ml_dsa_params params;
ml_dsa_44_params_init(&params);
return (ml_dsa_keypair(&params, public_key, private_key, seed) == 0);
int ret = (ml_dsa_keypair(&params, public_key, private_key, seed) == 0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any ML-DSA function that calls another approved service (e.g. SHA3) or has a self test needs to lock the service indicator before the call, and then unlock the service indicator after. Otherwise it's not clear to the caller if the ML-DSA call they made is approved or if it's the SHA3 call that was approved but ML-DSA was not approved. This is why the CI is failing with Assertion failed: (before + 1 == after), function TestBody, file service_indicator_test.cc, line 5413..

#2112 has more information on the issue and examples.

Copy link
Copy Markdown
Contributor Author

@jakemas jakemas Sep 5, 2025

Choose a reason for hiding this comment

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

Thanks! I couldn't get CI to fire off at first, and my local FIPS build was in RELEASE so I wasn't getting the test output I wanted! That second PR helped!

@jakemas jakemas marked this pull request as draft September 5, 2025 19:15
@jakemas jakemas marked this pull request as ready for review September 5, 2025 22:01
samuel40791765
samuel40791765 previously approved these changes Sep 8, 2025
@torben-hansen torben-hansen merged commit f359494 into aws:main Sep 9, 2025
130 of 139 checks passed
@justsmth justsmth mentioned this pull request Sep 12, 2025
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.

6 participants