Skip to content

crypto: improve SubtleCrypto.supports() accuracy - #65222

Open
panva wants to merge 3 commits into
nodejs:mainfrom
panva:better-supports-again
Open

crypto: improve SubtleCrypto.supports() accuracy#65222
panva wants to merge 3 commits into
nodejs:mainfrom
panva:better-supports-again

Conversation

@panva

@panva panva commented Aug 11, 2026

Copy link
Copy Markdown
Member

Constrain context parameters, ML-KEM derived-key imports, HKDF output lengths, and RSA key generation.

Refs: https://redirect.github.com/w3c/webcrypto/pull/558
Refs: https://redirect.github.com/WICG/webcrypto-modern-algos/pull/76
Refs: https://redirect.github.com/WICG/webcrypto-modern-algos/pull/77

Some of it we already had, some genuinely were false positives before and return false from SubtleCrypto.supports() now.

Constrain context parameters, ML-KEM derived-key imports, HKDF output
lengths, and RSA key generation.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
@panva panva added crypto Issues and PRs related to the crypto subsystem. webcrypto labels Aug 11, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@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 11, 2026
@panva panva added the experimental Issues and PRs related to experimental features. label Aug 11, 2026
@nodejs-github-bot

This comment was marked as outdated.

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 11, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.29%. Comparing base (2749388) to head (51bf88d).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/crypto/webidl.js 80.55% 7 Missing ⚠️
lib/internal/crypto/webcrypto.js 98.27% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65222      +/-   ##
==========================================
- Coverage   90.32%   90.29%   -0.03%     
==========================================
  Files         760      760              
  Lines      248601   248665      +64     
  Branches    46920    46933      +13     
==========================================
- Hits       224548   224538      -10     
- Misses      15476    15526      +50     
- Partials     8577     8601      +24     
Files with missing lines Coverage Δ
lib/internal/crypto/hkdf.js 100.00% <100.00%> (ø)
lib/internal/crypto/rsa.js 94.69% <100.00%> (-0.20%) ⬇️
lib/internal/crypto/util.js 97.11% <100.00%> (+0.01%) ⬆️
lib/internal/crypto/webcrypto.js 97.81% <98.27%> (-0.02%) ⬇️
lib/internal/crypto/webidl.js 97.04% <80.55%> (-0.38%) ⬇️

... and 32 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. crypto Issues and PRs related to the crypto subsystem. 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. webcrypto

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants