Skip to content

crypto: support ML-KEM in Web Cryptography #59569

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

panva
Copy link
Member

@panva panva commented Aug 21, 2025

Adds ML-KEM and encap/decap methods to SubtleCrypto as per

JWK import/export is not implemented because it has not been standardized yet and there are open questions about it in the IETF JOSE WG.

@panva panva added crypto Issues and PRs related to the crypto subsystem. semver-minor PRs that contain new features and should be released in the next minor version. experimental Issues and PRs related to experimental features. webcrypto dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Aug 21, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/security-wg
  • @nodejs/web-infra

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Aug 21, 2025
@panva panva force-pushed the webcrypto-ml-kem branch from 8625fe6 to 8ed0c72 Compare August 21, 2025 14:26
@nodejs-github-bot

This comment was marked as outdated.

Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 90.02695% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.87%. Comparing base (d30090b) to head (8ed0c72).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/crypto/webcrypto.js 91.00% 33 Missing ⚠️
lib/internal/crypto/ml_kem.js 89.19% 31 Missing ⚠️
src/crypto/crypto_keys.cc 78.04% 1 Missing and 8 partials ⚠️
lib/internal/crypto/keys.js 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59569      +/-   ##
==========================================
+ Coverage   89.74%   89.87%   +0.13%     
==========================================
  Files         667      668       +1     
  Lines      195301   196032     +731     
  Branches    38261    38495     +234     
==========================================
+ Hits       175280   176191     +911     
+ Misses      12465    12314     -151     
+ Partials     7556     7527      -29     
Files with missing lines Coverage Δ
lib/internal/crypto/ml_dsa.js 94.32% <100.00%> (-0.06%) ⬇️
lib/internal/crypto/util.js 95.05% <100.00%> (+0.20%) ⬆️
lib/internal/crypto/webidl.js 98.74% <100.00%> (+<0.01%) ⬆️
src/crypto/crypto_keys.h 56.60% <ø> (ø)
lib/internal/crypto/keys.js 95.17% <88.88%> (+0.03%) ⬆️
src/crypto/crypto_keys.cc 73.56% <78.04%> (+0.26%) ⬆️
lib/internal/crypto/ml_kem.js 89.19% <89.19%> (ø)
lib/internal/crypto/webcrypto.js 96.05% <91.00%> (-1.29%) ⬇️

... and 45 files with indirect coverage changes

🚀 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.

@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Issues and PRs related to the crypto subsystem. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. experimental Issues and PRs related to experimental features. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version. webcrypto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants