X Tutup
The Wayback Machine - https://web.archive.org/web/20250814212405/https://github.com/nodejs/node/pull/59284
Skip to content

crypto: prepare webcrypto key import/export for modern algorithms #59284

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

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

panva
Copy link
Member

@panva panva commented Jul 30, 2025

This PR does not change any observable behaviour in codes or import/export key results. It refactors the code in preparation for the upcoming https://redirect.github.com/WICG/proposals/issues/220 webcrypto extension.

This will keep the diffs from future modern algos implementation PRs cleaner.

@panva panva added crypto Issues and PRs related to the crypto subsystem. webcrypto labels Jul 30, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jul 30, 2025
@panva panva marked this pull request as draft July 30, 2025 10:59
@panva panva marked this pull request as ready for review July 30, 2025 11:07
@panva panva force-pushed the webcrypto-export-refactor branch from 201f541 to 5045296 Compare July 30, 2025 11:56
@panva panva changed the title crypto: prepare webcrypto key export code for modern algorithms crypto: prepare webcrypto key import/export for modern algorithms Jul 30, 2025
@panva panva force-pushed the webcrypto-export-refactor branch from 5045296 to 890b133 Compare July 30, 2025 12:00
@panva panva force-pushed the webcrypto-export-refactor branch from 890b133 to dac91a9 Compare July 30, 2025 12:02
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 73.60000% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.97%. Comparing base (a93da0a) to head (dac91a9).
⚠️ Report is 40 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/crypto/webcrypto.js 75.75% 23 Missing and 1 partial ⚠️
lib/internal/crypto/cfrg.js 0.00% 2 Missing ⚠️
lib/internal/crypto/ec.js 0.00% 2 Missing ⚠️
lib/internal/crypto/keys.js 33.33% 2 Missing ⚠️
lib/internal/crypto/aes.js 0.00% 1 Missing ⚠️
lib/internal/crypto/mac.js 0.00% 1 Missing ⚠️
lib/internal/crypto/rsa.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59284      +/-   ##
==========================================
- Coverage   90.01%   89.97%   -0.04%     
==========================================
  Files         649      649              
  Lines      192182   192208      +26     
  Branches    37660    37659       -1     
==========================================
- Hits       172988   172941      -47     
- Misses      11832    11873      +41     
- Partials     7362     7394      +32     
Files with missing lines Coverage Δ
lib/internal/crypto/util.js 94.54% <100.00%> (+0.14%) ⬆️
lib/internal/crypto/aes.js 89.93% <0.00%> (+0.58%) ⬆️
lib/internal/crypto/mac.js 89.67% <0.00%> (ø)
lib/internal/crypto/rsa.js 92.64% <0.00%> (+0.50%) ⬆️
lib/internal/crypto/cfrg.js 96.74% <0.00%> (-0.53%) ⬇️
lib/internal/crypto/ec.js 96.79% <0.00%> (-0.63%) ⬇️
lib/internal/crypto/keys.js 95.59% <33.33%> (+0.19%) ⬆️
lib/internal/crypto/webcrypto.js 96.34% <75.75%> (+0.14%) ⬆️

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

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 2, 2025
@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2025
@nodejs-github-bot nodejs-github-bot merged commit 700a965 into nodejs:main Aug 5, 2025
60 of 61 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 700a965

panva added a commit to panva/node that referenced this pull request Aug 7, 2025
PR-URL: nodejs#59284
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
targos pushed a commit that referenced this pull request Aug 8, 2025
PR-URL: #59284
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
mete0rfish pushed a commit to mete0rfish/node-contribute that referenced this pull request Aug 9, 2025
PR-URL: nodejs#59284
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
panva added a commit to panva/node that referenced this pull request Aug 9, 2025
PR-URL: nodejs#59284
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
RafaelGSS pushed a commit that referenced this pull request Aug 12, 2025
PR-URL: #59284
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
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. 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
X Tutup