Skip to content

Move mldsa and pqdsa out of fipsmodule#2104

Merged
andrewhop merged 7 commits intoaws:mainfrom
jakemas:remove-from-module
Jan 10, 2025
Merged

Move mldsa and pqdsa out of fipsmodule#2104
andrewhop merged 7 commits intoaws:mainfrom
jakemas:remove-from-module

Conversation

@jakemas
Copy link
Copy Markdown
Contributor

@jakemas jakemas commented Jan 10, 2025

Issues:

Issues with the delocator is preventing ML-DSA from being added to bcm.c. This PR moves PQDSA and ML-DSA out of the fipsmodule.

Description of changes:

  • Had to remove uses of delocator (e.g DEFINE_LOCAL_DATA) and replaced with traditional methods.
  • Also had to change the number of FIPS methods, and redefine those new methods without use of the delocator.
  • Only essential changes were included in this PR.

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 requested a review from a team as a code owner January 10, 2025 18:10
justsmth
justsmth previously approved these changes Jan 10, 2025
@justsmth justsmth self-requested a review January 10, 2025 18:22
@justsmth
Copy link
Copy Markdown
Contributor

Strange build failure on Macs: https://github.com/aws/aws-lc/actions/runs/12714896925/job/35446197733?pr=2104#step:4:8685

 File not embedded: crypto/fipsmodule/ml_dsa/kat/MLDSA_44_hedged_pure.txt.
OPENSSL_armcap=0x3D crypto/crypto_test [shard 4/6]
crypto/crypto_test failed to complete: signal: abort trap

@jakemas
Copy link
Copy Markdown
Contributor Author

jakemas commented Jan 10, 2025

9057099

Thank you! spotted and fixed in 9057099 (KAT filepath is partially hardcoded)

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.76%. Comparing base (5084e19) to head (9057099).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2104      +/-   ##
==========================================
- Coverage   78.77%   78.76%   -0.01%     
==========================================
  Files         598      598              
  Lines      103656   103657       +1     
  Branches    14719    14720       +1     
==========================================
- Hits        81650    81645       -5     
- Misses      21354    21359       +5     
- Partials      652      653       +1     

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

@andrewhop andrewhop enabled auto-merge (squash) January 10, 2025 20:35
@andrewhop andrewhop merged commit e34998e into aws:main Jan 10, 2025
This was referenced Feb 6, 2025
justsmth pushed a commit that referenced this pull request Feb 12, 2025
Note: **Merge after #2177 is merged**.

### Issues:
Resolves #CryptoAlg-2826

As part of validating ML-DSA into AWS-LC-FIPS we must include both
`PQDSA` and `ML-DSA` directories into the fipsmodule.

This PR is a repeat of:
- #2095

### Description of changes: 

Much like the series of PRs for ML-KEM we will implement the move into
the FIPS module across split PRs:
- #1828
- #1832
- #1838

Previous PR:
- #2166

This PR is part (2) to move `ML-DSA` from `crypto/ml_dsa/` to
`crypto/fipsmodule/ml_dsa/`.

We did this once before:
- #2095

But had to revert it here due to static fips builds for ARM failing in
CI (CryptoAlg-2899)
- #2104

We are now unblocked by:
- #2177

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.
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.

5 participants