Skip to content

crypto: accept key data in crypto.diffieHellman() and cleanup DH jobs#62527

Open
panva wants to merge 2 commits intonodejs:mainfrom
panva:key-data-in-dh
Open

crypto: accept key data in crypto.diffieHellman() and cleanup DH jobs#62527
panva wants to merge 2 commits intonodejs:mainfrom
panva:key-data-in-dh

Conversation

@panva
Copy link
Copy Markdown
Member

@panva panva commented Mar 31, 2026

  • Accept key data in addition to KeyObject instances in crypto.diffieHellman(options) as options.privateKey and options.publicKey, same inputs like in the other node:crypto functions.
  • cleanup unused DH jobs
  • align crypto key argument names in docs/code/error messages

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. 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 Mar 31, 2026
@panva panva added semver-minor PRs that contain new features and should be released in the next minor version. 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. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. crypto Issues and PRs related to the crypto subsystem. labels Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 96.29630% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.80%. Comparing base (f48ac91) to head (99f04d8).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
src/crypto/crypto_dh.cc 50.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62527      +/-   ##
==========================================
+ Coverage   89.77%   89.80%   +0.03%     
==========================================
  Files         697      697              
  Lines      215749   215755       +6     
  Branches    41304    41285      -19     
==========================================
+ Hits       193681   193767      +86     
+ Misses      14161    14100      -61     
+ Partials     7907     7888      -19     
Files with missing lines Coverage Δ
lib/internal/crypto/cipher.js 97.95% <100.00%> (+<0.01%) ⬆️
lib/internal/crypto/diffiehellman.js 97.92% <100.00%> (+0.22%) ⬆️
lib/internal/crypto/keygen.js 93.00% <100.00%> (ø)
lib/internal/crypto/keys.js 96.39% <100.00%> (ø)
lib/internal/crypto/sig.js 96.44% <100.00%> (ø)
src/crypto/crypto_ec.cc 70.42% <ø> (+0.61%) ⬆️
src/crypto/crypto_ec.h 16.66% <ø> (+4.16%) ⬆️
src/crypto/crypto_dh.cc 67.80% <50.00%> (+0.61%) ⬆️

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

@panva panva requested review from anonrig and jasnell April 3, 2026 07:39
@panva panva added the review wanted PRs that need reviews. label Apr 7, 2026
@panva panva added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Apr 7, 2026
@panva panva added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 8, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 8, 2026
@nodejs-github-bot

This comment was marked as outdated.

panva added 2 commits April 8, 2026 09:11
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 8, 2026
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. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. 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. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. review wanted PRs that need reviews. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants