Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move PQDSA to FIPS module #2032

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Move PQDSA to FIPS module #2032

merged 2 commits into from
Dec 6, 2024

Conversation

jakemas
Copy link
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

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
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
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
118 of 122 checks passed
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.
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