Repository navigation
crypto: skip DH checks for recognized groups - #67071
Merged
Merged
Conversation
Explicit DH parameters are recognized as named groups during OpenSSL provider import, but DHPointer::check() only skips primality checks for groups constructed by name. This makes createDiffieHellman() block for seconds on standard MODP groups. Query the imported key's group name to restore the legacy DH_check() shortcut without changing key generation. Add a deterministic regression test with randomness disabled and cover explicit and padded parameters through the JavaScript API. Fixes: nodejs#67067 Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67071 +/- ##
==========================================
- Coverage 92.97% 90.67% -2.30%
==========================================
Files 428 797 +369
Lines 195284 278320 +83036
Branches 30205 53528 +23323
==========================================
+ Hits 181560 252370 +70810
- Misses 13397 16328 +2931
- Partials 327 9622 +9295 🚀 New features to boost your workflow:
|
anonrig
approved these changes
Nov 3, 2026
Collaborator
Collaborator
|
Landed in 3b209b2 |
|
@panva do you know in which Node 26 version this will land? |
Member
Author
|
The fix will be included in future 24.x and 26.x releases, following the usual release policy (at least two weeks in a current or alpha release first). Inclusion in any immediate next release is not guaranteed, as potential security releases follow a separate process. |
aduh95
pushed a commit
that referenced
this pull request
Nov 11, 2026
Explicit DH parameters are recognized as named groups during OpenSSL provider import, but DHPointer::check() only skips primality checks for groups constructed by name. This makes createDiffieHellman() block for seconds on standard MODP groups. Query the imported key's group name to restore the legacy DH_check() shortcut without changing key generation. Add a deterministic regression test with randomness disabled and cover explicit and padded parameters through the JavaScript API. Fixes: #67067 Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #67071 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explicit DH parameters are recognized as named groups during OpenSSL provider import, but DHPointer::check() only skips primality checks for groups constructed by name. This makes createDiffieHellman() block for seconds on standard MODP groups.
Query the imported key's group name to restore the legacy DH_check() shortcut without changing key generation. Add a deterministic regression test with randomness disabled and cover explicit and padded parameters through the JavaScript API.
Fixes: #67067