GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [v24.x backport] crypto, test, and tooling fixes by panva · Pull Request #66970 · nodejs/node

Conversation

@panva

@panva panva commented Oct 23, 2026

Copy link
Copy Markdown
Member

Backports the following to v24.x-staging:

  • tools: harden GitHub Actions workflows #66013
  • crypto: use current FIPS state for availability #66160
  • crypto: fix various edge cases #66237
  • test: reduce expensive crypto test variants #66244
  • crypto: improve random synchronous number generation performance #66348
  • test: address WPT flakes and failure expectations #66322
  • crypto: remove key mutexes #66413

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions
  • @nodejs/crypto
  • @nodejs/gyp
  • @nodejs/security-wg
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch. labels Oct 23, 2026
@panva
panva requested a review from aduh95 October 23, 2026 22:56
@nodejs-github-bot

nodejs-github-bot commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78619/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Oct 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.22652% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.42%. Comparing base (9e39360) to head (4afe009).
⚠️ Report is 850 commits behind head on v24.x-staging.

Files with missing lines Patch % Lines
src/crypto/crypto_random.cc 37.03% 9 Missing and 8 partials ⚠️
lib/internal/crypto/webidl.js 91.25% 6 Missing and 1 partial ⚠️
lib/internal/crypto/util.js 94.44% 6 Missing ⚠️
lib/internal/crypto/hash.js 50.00% 4 Missing ⚠️
src/crypto/crypto_keys.cc 84.21% 0 Missing and 3 partials ⚠️
src/crypto/crypto_kmac.cc 71.42% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           v24.x-staging   #66970      +/-   ##
=================================================
+ Coverage          90.31%   90.42%   +0.11%     
=================================================
  Files                711      717       +6     
  Lines             228425   240605   +12180     
  Branches           43160    45901    +2741     
=================================================
+ Hits              206293   217574   +11281     
- Misses             14090    14509     +419     
- Partials            8042     8522     +480     
Files with missing lines Coverage Δ
lib/internal/crypto/aes.js 94.59% <100.00%> (+0.86%) ⬆️
lib/internal/crypto/argon2.js 98.71% <100.00%> (+0.01%) ⬆️
lib/internal/crypto/cfrg.js 95.45% <100.00%> (-0.59%) ⬇️
lib/internal/crypto/chacha20_poly1305.js 98.26% <100.00%> (+0.03%) ⬆️
lib/internal/crypto/diffiehellman.js 97.69% <100.00%> (-0.01%) ⬇️
lib/internal/crypto/ec.js 96.94% <100.00%> (+0.05%) ⬆️
lib/internal/crypto/hkdf.js 100.00% <100.00%> (ø)
lib/internal/crypto/keygen.js 98.23% <100.00%> (-0.21%) ⬇️
lib/internal/crypto/mac.js 99.03% <100.00%> (+0.03%) ⬆️
lib/internal/crypto/ml_dsa.js 97.07% <100.00%> (-0.45%) ⬇️
... and 18 more

... and 273 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78623/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78625/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95
aduh95 force-pushed the v24.x-staging branch from a83a23b to 9847a56 Compare October 28, 2026 18:34
panva and others added 11 commits October 28, 2026 20:44
@panva
tools: use self-repository references
b36ce76
Resolve local actions and reusable workflows from the running
workflow commit with $/ references, independent of checkout paths.

Remove the tarball job's action-only checkout and the WPT action
checkout/copy workaround, which are no longer needed.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66013
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Xuguang Mei <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
@panva
crypto: use current FIPS state for availability
b6709c1
Refresh conditional algorithm registration on FIPS changes and use the
current state for parameter restrictions.

Use per-algorithm availability checks in normalization and native named
key generation. Remove getPqcKeyTypes().

Enable supports() tests under FIPS and cover state transitions in warmed
workers.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66160
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@panva
crypto: use internal random buffer bounds
d0c0275
Read buffer lengths and element sizes from internal slots in
randomFillSync() and randomFill(). Shadowed properties can otherwise
skip filling, change the selected range, or fail a native bounds check.

Use the intrinsic byte length for the getRandomValues() quota check and
keep its delegation to randomFillSync().

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66237
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
@panva
test: reduce expensive crypto test variants
f233bab
Skip redundant PBKDF2 WPT variants during regular CI. Keep the full
matrix when producing a WPT report. Retain the RSA WPT variants because
v24 cannot skip whole variants without hanging empty test runs.

Use fewer scrypt, PBKDF2, and Argon2 derivations in parallel tests.
Reuse RSA key material across OAEP hash and PSS salt tests.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66244
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Xuguang Mei <[email protected]>
@panva
crypto: separate conversion from validation
2b7a132
Convert algorithm dictionaries on the original receiver, with name
read once. Validate normalized parameters in their operation steps
after the method-level key checks and generation usage checks.

This also makes Argon2 validation use converted parallelism and keeps
later dictionary conversion errors ahead of semantic parameter errors.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66237
Backport-PR-URL: nodejs#66391
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Xuguang Mei <[email protected]>
@panva
crypto: use backend cSHAKE and KMAC
9194871
Require cSHAKE and KMAC output lengths and KMAC key lengths to be
multiples of 8 bits. KMAC keys must be at least 32 bits. Share these
restrictions between operations and supports.

Use OpenSSL's KMAC provider for all supported inputs and its cSHAKE
implementation for non-empty function names or customization strings.
Keep using SHAKE when both cSHAKE parameters are empty. Remove the
custom Keccak framing, partial-bit handling, and short-key fallback.

Document the OpenSSL 4.0 requirement for non-empty cSHAKE parameters and
reject customization strings containing null bytes. Keep the documented
512-byte customization limit and let backend failures reach callers.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66237
Backport-PR-URL: nodejs#66391
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Xuguang Mei <[email protected]>
@mertcanaltin @panva
crypto: improve random synchronous number generation performance
ec18142
Instead of creating a RandomBytesJob object, it calls CSPRNG()
directly now.

Assisted-by: Claude Code
Signed-off-by: Mert Can Altin <[email protected]>
PR-URL: nodejs#66348
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Filip Skokan <[email protected]>
@panva
test: scope Blob WPT failures to big-endian
2559033
The typed array Blob constructor tests expect little-endian byte order.
Mark them as expected failures only on big-endian platforms, so failures
on little-endian platforms remain visible.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Claude, Codex
PR-URL: nodejs#66322
Reviewed-By: Daeyeon Jeong <[email protected]>
@panva
test: honor allowed WPT promise rejections
8ec2cb9
Honor allow_uncaught_exception for unhandled promise rejections in the
WPT worker path. Apply setup settings before nested callbacks, preserve
settings after results start, and apply promise_setup settings when its
callback runs. Keep rejection failures in single_test mode.

Cover the worker runner and remove the flaky expectation for the Web
Locks test that deliberately rejects.

Refs: nodejs#59142
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Claude, Codex
PR-URL: nodejs#66322
Reviewed-By: Daeyeon Jeong <[email protected]>
@panva
crypto: remove KEM key locking
138ed26
ncrypto::KEM creates a new EVP_PKEY_CTX per operation. Parameters,
entropy, scratch buffers, and outputs are private to each call. ML-KEM
expansion finishes during import, and operations read an immutable key.
EC and X25519 retain read-only recipient keys. RSA synchronizes mutable
caches internally.

Remove the outer locks serializing jobs that share a KeyObject or
CryptoKey. Cover cold keys and worker clones across RSA, EC, X25519, and
ML-KEM, checking every resulting shared secret.

Refs: https://docs.openssl.org/3.5/man7/openssl-threads/
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66413
Reviewed-By: James M Snell <[email protected]>
@panva
crypto: remove key export and metadata locks
4afe009
Raw and JWK getters return independently owned bytes or BIGNUMs. RSA
metadata snapshots public parameters and PSS restrictions. EC fallback
paths reconstruct or duplicate the source key. EC PKCS8 export changes
encoding flags only on its own clone.

Early OpenSSL 3 key downgrading mutated shared provider fields. Current
OpenSSL publishes separate legacy and provider conversion caches under
internal read/write locks. Ordinary DER/PEM export, equality, signing,
and key derivation already access the same keys without these locks.

Remove export and metadata acquisitions, including their coverage of V8
allocation and encoding, and remove the now-unused shared mutex storage.
Retain shared immutable key ownership. The concurrent reuse test checks
that EC PKCS8 export leaves the original flags intact.

Refs: nodejs#36825
Refs: https://docs.openssl.org/3.5/man7/openssl-threads/
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: nodejs#66413
Reviewed-By: James M Snell <[email protected]>
@panva
panva force-pushed the backport-v24-20261024 branch from 14bd819 to 4afe009 Compare October 28, 2026 19:47
aduh95
aduh95 approved these changes Oct 29, 2026
View reviewed changes
@aduh95

aduh95 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Landed in 9847a56...a531093

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
tools: use self-repository references
736229e
Resolve local actions and reusable workflows from the running
workflow commit with $/ references, independent of checkout paths.

Remove the tarball job's action-only checkout and the WPT action
checkout/copy workaround, which are no longer needed.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66013
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
crypto: use current FIPS state for availability
2538ce8
Refresh conditional algorithm registration on FIPS changes and use the
current state for parameter restrictions.

Use per-algorithm availability checks in normalization and native named
key generation. Remove getPqcKeyTypes().

Enable supports() tests under FIPS and cover state transitions in warmed
workers.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66160
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
crypto: use internal random buffer bounds
d5367e0
Read buffer lengths and element sizes from internal slots in
randomFillSync() and randomFill(). Shadowed properties can otherwise
skip filling, change the selected range, or fail a native bounds check.

Use the intrinsic byte length for the getRandomValues() quota check and
keep its delegation to randomFillSync().

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66237
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
test: reduce expensive crypto test variants
3113be3
Skip redundant PBKDF2 WPT variants during regular CI. Keep the full
matrix when producing a WPT report. Retain the RSA WPT variants because
v24 cannot skip whole variants without hanging empty test runs.

Use fewer scrypt, PBKDF2, and Argon2 derivations in parallel tests.
Reuse RSA key material across OAEP hash and PSS salt tests.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66244
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
crypto: separate conversion from validation
93b5e5a
Convert algorithm dictionaries on the original receiver, with name
read once. Validate normalized parameters in their operation steps
after the method-level key checks and generation usage checks.

This also makes Argon2 validation use converted parallelism and keeps
later dictionary conversion errors ahead of semantic parameter errors.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66237
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
crypto: use backend cSHAKE and KMAC
a0d2fb3
Require cSHAKE and KMAC output lengths and KMAC key lengths to be
multiples of 8 bits. KMAC keys must be at least 32 bits. Share these
restrictions between operations and supports.

Use OpenSSL's KMAC provider for all supported inputs and its cSHAKE
implementation for non-empty function names or customization strings.
Keep using SHAKE when both cSHAKE parameters are empty. Remove the
custom Keccak framing, partial-bit handling, and short-key fallback.

Document the OpenSSL 4.0 requirement for non-empty cSHAKE parameters and
reject customization strings containing null bytes. Keep the documented
512-byte customization limit and let backend failures reach callers.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66237
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@mertcanaltin @aduh95
crypto: improve random synchronous number generation performance
bb1def2
Instead of creating a RandomBytesJob object, it calls CSPRNG()
directly now.

Assisted-by: Claude Code
Signed-off-by: Mert Can Altin <[email protected]>
PR-URL: #66348
Backport-PR-URL: #66970
Signed-off-by: Filip Skokan <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
test: scope Blob WPT failures to big-endian
5e2b640
The typed array Blob constructor tests expect little-endian byte order.
Mark them as expected failures only on big-endian platforms, so failures
on little-endian platforms remain visible.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Claude, Codex
PR-URL: #66322
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
test: honor allowed WPT promise rejections
a4b6853
Honor allow_uncaught_exception for unhandled promise rejections in the
WPT worker path. Apply setup settings before nested callbacks, preserve
settings after results start, and apply promise_setup settings when its
callback runs. Keep rejection failures in single_test mode.

Cover the worker runner and remove the flaky expectation for the Web
Locks test that deliberately rejects.

Refs: #59142
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Claude, Codex
PR-URL: #66322
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
crypto: remove KEM key locking
47811d8
ncrypto::KEM creates a new EVP_PKEY_CTX per operation. Parameters,
entropy, scratch buffers, and outputs are private to each call. ML-KEM
expansion finishes during import, and operations read an immutable key.
EC and X25519 retain read-only recipient keys. RSA synchronizes mutable
caches internally.

Remove the outer locks serializing jobs that share a KeyObject or
CryptoKey. Cover cold keys and worker clones across RSA, EC, X25519, and
ML-KEM, checking every resulting shared secret.

Refs: https://docs.openssl.org/3.5/man7/openssl-threads/
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66413
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 29, 2026
@panva @aduh95
crypto: remove key export and metadata locks
a531093
Raw and JWK getters return independently owned bytes or BIGNUMs. RSA
metadata snapshots public parameters and PSS restrictions. EC fallback
paths reconstruct or duplicate the source key. EC PKCS8 export changes
encoding flags only on its own clone.

Early OpenSSL 3 key downgrading mutated shared provider fields. Current
OpenSSL publishes separate legacy and provider conversion caches under
internal read/write locks. Ordinary DER/PEM export, equality, signing,
and key derivation already access the same keys without these locks.

Remove export and metadata acquisitions, including their coverage of V8
allocation and encoding, and remove the now-unused shared mutex storage.
Retain shared immutable key ownership. The concurrent reuse test checks
that EC PKCS8 export leaves the original flags intact.

Refs: #36825
Refs: https://docs.openssl.org/3.5/man7/openssl-threads/
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66413
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
@aduh95 aduh95 closed this Oct 29, 2026
@panva
panva deleted the backport-v24-20261024 branch October 29, 2026 12:25
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
tools: use self-repository references
81162db
Resolve local actions and reusable workflows from the running
workflow commit with $/ references, independent of checkout paths.

Remove the tarball job's action-only checkout and the WPT action
checkout/copy workaround, which are no longer needed.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66013
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
crypto: use current FIPS state for availability
1a2b5cc
Refresh conditional algorithm registration on FIPS changes and use the
current state for parameter restrictions.

Use per-algorithm availability checks in normalization and native named
key generation. Remove getPqcKeyTypes().

Enable supports() tests under FIPS and cover state transitions in warmed
workers.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66160
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
crypto: use internal random buffer bounds
f393f8b
Read buffer lengths and element sizes from internal slots in
randomFillSync() and randomFill(). Shadowed properties can otherwise
skip filling, change the selected range, or fail a native bounds check.

Use the intrinsic byte length for the getRandomValues() quota check and
keep its delegation to randomFillSync().

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66237
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
test: reduce expensive crypto test variants
4c23f80
Skip redundant PBKDF2 WPT variants during regular CI. Keep the full
matrix when producing a WPT report. Retain the RSA WPT variants because
v24 cannot skip whole variants without hanging empty test runs.

Use fewer scrypt, PBKDF2, and Argon2 derivations in parallel tests.
Reuse RSA key material across OAEP hash and PSS salt tests.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66244
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
crypto: separate conversion from validation
06254be
Convert algorithm dictionaries on the original receiver, with name
read once. Validate normalized parameters in their operation steps
after the method-level key checks and generation usage checks.

This also makes Argon2 validation use converted parallelism and keeps
later dictionary conversion errors ahead of semantic parameter errors.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66237
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
crypto: use backend cSHAKE and KMAC
fe956fe
Require cSHAKE and KMAC output lengths and KMAC key lengths to be
multiples of 8 bits. KMAC keys must be at least 32 bits. Share these
restrictions between operations and supports.

Use OpenSSL's KMAC provider for all supported inputs and its cSHAKE
implementation for non-empty function names or customization strings.
Keep using SHAKE when both cSHAKE parameters are empty. Remove the
custom Keccak framing, partial-bit handling, and short-key fallback.

Document the OpenSSL 4.0 requirement for non-empty cSHAKE parameters and
reject customization strings containing null bytes. Keep the documented
512-byte customization limit and let backend failures reach callers.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66237
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@mertcanaltin @aduh95
crypto: improve random synchronous number generation performance
4613bec
Instead of creating a RandomBytesJob object, it calls CSPRNG()
directly now.

Assisted-by: Claude Code
Signed-off-by: Mert Can Altin <[email protected]>
PR-URL: #66348
Backport-PR-URL: #66970
Signed-off-by: Filip Skokan <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
test: scope Blob WPT failures to big-endian
c37a227
The typed array Blob constructor tests expect little-endian byte order.
Mark them as expected failures only on big-endian platforms, so failures
on little-endian platforms remain visible.

Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Claude, Codex
PR-URL: #66322
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
test: honor allowed WPT promise rejections
ef26bae
Honor allow_uncaught_exception for unhandled promise rejections in the
WPT worker path. Apply setup settings before nested callbacks, preserve
settings after results start, and apply promise_setup settings when its
callback runs. Keep rejection failures in single_test mode.

Cover the worker runner and remove the flaky expectation for the Web
Locks test that deliberately rejects.

Refs: #59142
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Claude, Codex
PR-URL: #66322
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
crypto: remove KEM key locking
73ab077
ncrypto::KEM creates a new EVP_PKEY_CTX per operation. Parameters,
entropy, scratch buffers, and outputs are private to each call. ML-KEM
expansion finishes during import, and operations read an immutable key.
EC and X25519 retain read-only recipient keys. RSA synchronizes mutable
caches internally.

Remove the outer locks serializing jobs that share a KeyObject or
CryptoKey. Cover cold keys and worker clones across RSA, EC, X25519, and
ML-KEM, checking every resulting shared secret.

Refs: https://docs.openssl.org/3.5/man7/openssl-threads/
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66413
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
crypto: remove key export and metadata locks
726d62d
Raw and JWK getters return independently owned bytes or BIGNUMs. RSA
metadata snapshots public parameters and PSS restrictions. EC fallback
paths reconstruct or duplicate the source key. EC PKCS8 export changes
encoding flags only on its own clone.

Early OpenSSL 3 key downgrading mutated shared provider fields. Current
OpenSSL publishes separate legacy and provider conversion caches under
internal read/write locks. Ordinary DER/PEM export, equality, signing,
and key derivation already access the same keys without these locks.

Remove export and metadata acquisitions, including their coverage of V8
allocation and encoding, and remove the now-unused shared mutex storage.
Retain shared immutable key ownership. The concurrent reuse test checks
that EC PKCS8 export leaves the original flags intact.

Refs: #36825
Refs: https://docs.openssl.org/3.5/man7/openssl-threads/
Signed-off-by: Filip Skokan <[email protected]>
Assisted-by: Codex
PR-URL: #66413
Backport-PR-URL: #66970
Reviewed-By: Antoine du Hamel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@panva @nodejs-github-bot @aduh95 @mertcanaltin
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.