Skip to content

Add support for ML-DSA to bedrock KMS module core#3

Open
msporny wants to merge 6 commits into
mainfrom
add-mldsa44
Open

Add support for ML-DSA to bedrock KMS module core#3
msporny wants to merge 6 commits into
mainfrom
add-mldsa44

Conversation

@msporny
Copy link
Copy Markdown
Member

@msporny msporny commented May 24, 2026

This PR adds support for ML-DSA (44, 65, and 87).

This PR shouldn't be merged until we make a release for mldsa-multikey and use that version in the package.json.

Comment thread test/package.json
"@digitalbazaar/bls12-381-multikey": "^2.1.0",
"@digitalbazaar/ecdsa-multikey": "^1.8.0",
"@digitalbazaar/ed25519-multikey": "^1.3.1",
"@digitalbazaar/mldsa-multikey": "digitalbazaar/mldsa-multikey#main",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to make a release of mldsa-multikey as 1.0.0 and use that for the version here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Before we release 1.0.0 -- take a look at the inconsistency mentioned above. We should probably align to avoid dev frustration (and figure out which way to go).

Comment thread package.json
"@digitalbazaar/bls12-381-multikey": "^2.1.0",
"@digitalbazaar/ecdsa-multikey": "^1.8.0",
"@digitalbazaar/ed25519-multikey": "^1.3.1",
"@digitalbazaar/mldsa-multikey": "digitalbazaar/mldsa-multikey#main",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to make a release of mldsa-multikey as 1.0.0 and use that for the version here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's been released.

Suggested change
"@digitalbazaar/mldsa-multikey": "digitalbazaar/mldsa-multikey#main",
"@digitalbazaar/mldsa-multikey": "^1.0.0",

@msporny msporny changed the title Add support for ML-DSA. Add support for ML-DSA to bedrock KMS module core May 24, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.75%. Comparing base (65d6ca7) to head (1613b5d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   95.70%   95.75%   +0.05%     
==========================================
  Files          10       10              
  Lines        1000     1014      +14     
==========================================
+ Hits          957      971      +14     
  Misses         43       43              
Files with missing lines Coverage Δ
lib/core/asymmetricKey.js 96.79% <100.00%> (+0.24%) ⬆️
lib/core/operations.js 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65d6ca7...1613b5d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread package.json Outdated
Comment thread test/package.json
Comment thread .github/workflows/main.yml Outdated
Comment thread lib/core/asymmetricKey.js
} else if(type === 'urn:webkms:multikey:ML-DSA-44' ||
type === 'urn:webkms:multikey:ML-DSA-65' ||
type === 'urn:webkms:multikey:ML-DSA-87') {
keyPair = await MldsaMultikey.from({key});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see this call signature is different from the others -- just making a note of it in case we want to have a target to align (one way or another).

Copy link
Copy Markdown
Member Author

@msporny msporny May 25, 2026

Choose a reason for hiding this comment

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

You had noted that you wanted to switch over to named parameters in that library. I made the change due to the request. I think it still makes sense to use named parameters, but don't know if there was something else driving NOT using named parameters in that library for this particular interface?

It would be easier for me to change the mldsa-multikey library to align w/ the others, though I think the named parameter approach is better for external interfaces (in case we want to add other options in the future).

I'm fine either way, your call... maybe @davidlehn @gannan08 or @tminard have strong opinions here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's move toward named parameters. I'll file issues on the other multikey libs to support those.

Comment thread test/package.json
"@digitalbazaar/bls12-381-multikey": "^2.1.0",
"@digitalbazaar/ecdsa-multikey": "^1.8.0",
"@digitalbazaar/ed25519-multikey": "^1.3.1",
"@digitalbazaar/mldsa-multikey": "digitalbazaar/mldsa-multikey#main",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Before we release 1.0.0 -- take a look at the inconsistency mentioned above. We should probably align to avoid dev frustration (and figure out which way to go).

Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread test/package.json Outdated
@dlongley
Copy link
Copy Markdown
Member

dlongley commented May 25, 2026

@msporny, also: needs a changelog entry.

Co-authored-by: Dave Longley <dlongley@digitalbazaar.com>
@msporny msporny requested a review from dlongley May 25, 2026 17:59
@msporny
Copy link
Copy Markdown
Member Author

msporny commented May 25, 2026

@msporny, also: needs a changelog entry.

Fixed in 689fae8.

Copy link
Copy Markdown
Member

@dlongley dlongley left a comment

Choose a reason for hiding this comment

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

Thanks! I think this is ready to go once the mldsa-multikey 1.0 release is made and used here.

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Co-authored-by: Dave Longley <dlongley@digitalbazaar.com>
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