Skip to content

Move PQDSA to FIPS module#2032

Merged
torben-hansen merged 2 commits intoaws:mainfrom
jakemas:delocatefix
Dec 6, 2024
Merged

Move PQDSA to FIPS module#2032
torben-hansen merged 2 commits intoaws:mainfrom
jakemas:delocatefix

Conversation

@jakemas
Copy link
Copy Markdown
Contributor

@jakemas jakemas commented Dec 4, 2024

Issues:

To fix the CI issues related to ML-DSA we must move code that has dependencies on the fips delocator to the fipsmodule.

This PR moves the files accordingly. I haven't moved the entirety of the dilithium directory (including filesml_dsa.c ml_dsa.h or p_pqdsa_test.cc) as there are still in-flight PRs for portions of this code. Once those changes are merged, I plan to create the directory ml_dsa in fipsmodule to store these files.

Callouts:

With ML-DSA now in bcm.c we have namespacing issues, thus we change:

  • keygen sign verify of pqdsa/internal.h to pqdsa_keygen pqdsa_sign pqdsa_verify
  • We now define pqdsa_pkey_meth as EVP_PKEY_pqdsa_pkey_meth using DEFINE_METHOD_FUNCTION and the delocator. We remove all instances of pqdsa_pkey_meth.

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 December 4, 2024 19:52
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.67%. Comparing base (066c700) to head (f4a5a75).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2032      +/-   ##
==========================================
- Coverage   78.67%   78.67%   -0.01%     
==========================================
  Files         598      598              
  Lines      103329   103347      +18     
  Branches    14685    14688       +3     
==========================================
+ Hits        81298    81308      +10     
- Misses      21380    21386       +6     
- Partials      651      653       +2     

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

dilithium/pqdsa.c
dilithium/p_pqdsa.c
dilithium/p_pqdsa_asn1.c
fipsmodule/pqdsa/pqdsa.c
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.

these need to be added to bcm.c that defines the code boundary of the fipsmodule. DILITHIUM_SOURCES is not part of the fipsmodule.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added in f4a5a75

@torben-hansen torben-hansen merged commit d681431 into aws:main Dec 6, 2024
justsmth pushed a commit to justsmth/aws-lc that referenced this pull request Dec 9, 2024
o fix the CI issues related to ML-DSA we must move code that has dependencies on the fips delocator to the fipsmodule.

This PR moves the files accordingly. I haven't moved the entirety of the dilithium directory (including filesml_dsa.c ml_dsa.h or p_pqdsa_test.cc) as there are still in-flight PRs for portions of this code. Once those changes are merged, I plan to create the directory ml_dsa in fipsmodule to store these files.
justsmth pushed a commit to justsmth/aws-lc that referenced this pull request Dec 9, 2024
o fix the CI issues related to ML-DSA we must move code that has dependencies on the fips delocator to the fipsmodule.

This PR moves the files accordingly. I haven't moved the entirety of the dilithium directory (including filesml_dsa.c ml_dsa.h or p_pqdsa_test.cc) as there are still in-flight PRs for portions of this code. Once those changes are merged, I plan to create the directory ml_dsa in fipsmodule to store these files.
@jakemas jakemas deleted the delocatefix branch February 2, 2025 05:36
@jakemas jakemas mentioned this pull request Feb 4, 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.

4 participants