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

Unstable API for ML-DSA #690

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Unstable API for ML-DSA #690

wants to merge 4 commits into from

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Feb 6, 2025

Description of changes:

  • Adds unstable API for support of MLDSA.

Call-outs:

  • For the signature operation, I decided to have the caller provide the mutable buffer. The required buffer length is provided by PqdsaSigningAlgorithm::signature_len(). This is similar to RSA's signature function.
  • We don't yet have a way of obtaining the seed value from the PqdsaKeyPair. So, we can marshal from a seed, but not serialize to it.
  • PqdsaPrivateKey object can serialize to either PKCS8 or raw bytes.
  • PqdsaPublicKey object can serialize to X.509 or raw bytes.
  • PqdsaSeed object can't do anything (yet).

Testing:

New tests added.

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.

@justsmth justsmth force-pushed the api-ml-dsa branch 2 times, most recently from d640650 to e6ef3f0 Compare February 10, 2025 22:24
@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 91.22257% with 28 lines in your changes missing coverage. Please review.

Project coverage is 92.93%. Comparing base (c358484) to head (76dd568).
Report is 175 commits behind head on main.

Files with missing lines Patch % Lines
aws-lc-rs/src/pqdsa/key_pair.rs 89.60% 6 Missing and 15 partials ⚠️
aws-lc-rs/src/pqdsa/signature.rs 93.18% 0 Missing and 3 partials ⚠️
aws-lc-rs/src/pqdsa.rs 96.61% 2 Missing ⚠️
aws-lc-rs/src/ec/encoding.rs 66.66% 0 Missing and 1 partial ⚠️
aws-lc-rs/src/test.rs 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #690      +/-   ##
==========================================
- Coverage   95.80%   92.93%   -2.87%     
==========================================
  Files          61       71      +10     
  Lines        8143     9801    +1658     
  Branches        0     9801    +9801     
==========================================
+ Hits         7801     9109    +1308     
- Misses        342      407      +65     
- Partials        0      285     +285     

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

@justsmth justsmth force-pushed the api-ml-dsa branch 2 times, most recently from 45c5f33 to 1f41137 Compare February 12, 2025 20:20
@justsmth justsmth force-pushed the api-ml-dsa branch 4 times, most recently from 65b956b to dbf792f Compare February 20, 2025 17:20
@justsmth justsmth changed the title [DRAFT] unstable API for ML-DSA Unstable API for ML-DSA Feb 20, 2025
@justsmth justsmth marked this pull request as ready for review February 20, 2025 17:21
@justsmth justsmth requested a review from a team as a code owner February 20, 2025 17:21
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.

2 participants