Skip to content

feat: add ML-DSA-44/65/87 key and signature support - #121

Merged
genaris merged 3 commits into
openwallet-foundation:mainfrom
Welhelha:mldsa_wrapper
Nov 24, 2026
Merged

genaris merged 3 commits into
openwallet-foundation:mainfrom
Welhelha:mldsa_wrapper

Conversation

@Welhelha

Copy link
Copy Markdown
Contributor

Summary

Adds support for ML-DSA (FIPS 204) keys and signatures (ML-DSA-44, ML-DSA-65 and
ML-DSA-87) to askar-shared, the shared API layer used by the Askar JavaScript wrappers.

Native ML-DSA support is available since Askar 0.6.0
(openwallet-foundation/askar#500, openwallet-foundation/askar#507,
version bump in openwallet-foundation/askar#515).

Related: openwallet-foundation/askar#349 (FIPS 204 support request).

Changes

  • Add the ML-DSA algorithms to the key algorithm and signature algorithm enums.
  • Extend the JWK model with the alg, pub and priv fields (as used by the AKP
    key type from RFC 9964), and make crv / x optional, since ML-DSA keys do not use them.
  • Add tests covering:
    • sign / verify,
    • key reconstruction from public and secret bytes,
    • JWK round-trip (export, then import).
  • Add a changeset proposing a minor bump for the three Askar packages.

Requirements

  • The native bindings are unchanged. ML-DSA works only with a native Askar library
    version 0.6.0 or later, built with ML-DSA support.
  • With an older native library, ML-DSA operations will fail at runtime.

Verification

  • git diff --check passes
  • pnpm test: 56/56 tests pass locally, including the ML-DSA tests in keys.test.ts
  • pnpm build succeeds for all three packages
  • pnpm types:check passes

Signed-off-by: Welhelha <martin.evain2005@icloud.com>
Signed-off-by: Welhelha <martin.evain2005@icloud.com>
@changeset-bot

changeset-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 38d1393

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@openwallet-foundation/askar-nodejs Minor
@openwallet-foundation/askar-react-native Minor
@openwallet-foundation/askar-shared Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Welhelha

Copy link
Copy Markdown
Contributor Author

Update: Askar v0.6.0-dev.1 has just been published as a pre-release. It contains the native ML-DSA support this PR relies on.

The stable 0.6.0 release is still pending, so for now ML-DSA works with this pre-release native library (or any build that includes it).

@Welhelha
Welhelha marked this pull request as ready for review November 24, 2026 15:41
@Welhelha
Welhelha requested a review from a team as a code owner November 24, 2026 15:41

@genaris genaris left a comment

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.

Note that we need to bump the native library to v0.6.0-dev.1 in both nodejs and react-native's package.json files.

Comment thread .changeset/mild-mldsa.md Resolved
Signed-off-by: Welhelha <martin.evain2005@icloud.com>
@Welhelha

Copy link
Copy Markdown
Contributor Author

Thanks for the review! I’ve addressed the feedback in commit 38d1393: updated the native Askar version, split the changesets, and fixed the ML-DSA test cleanup and naming.

@genaris genaris changed the title feat(shared): add ML-DSA-44/65/87 key and signature support feat: add ML-DSA-44/65/87 key and signature support Nov 24, 2026
@genaris
genaris merged commit 67bea3a into openwallet-foundation:main Nov 24, 2026
15 checks passed
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