Filip Skokan
acbc3ff133
test,benchmark: drop OpenSSL 1.x-only coverage
...
Delete test-crypto-ecb.js, which can no longer run anywhere: Blowfish
is available only from OpenSSL's legacy provider and is absent from
BoringSSL.
The addon and cctest version guards become OPENSSL_IS_BORINGSSL checks.
Remove legacy digest-alias coverage and unreachable OpenSSL 1.x
branches. JavaScript test and benchmark gates, skip reasons, and TLS
error expectations that distinguished OpenSSL 1.x from provider-backed
OpenSSL now distinguish BoringSSL, including PKCS12 parsing, named DH
groups, private-key serialization, RSA-PSS parameters, consolidated
provider caches, FIPS availability, and empty KMAC output. Keep the CCM
alternate finalization error only for BoringSSL.
Provider-only test skips use version-neutral terminology or state the
actual minimum OpenSSL version.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/64777
Fixes: https://github.com/nodejs/node/issues/56733
Refs: https://github.com/nodejs/node/pull/64211
Refs: https://github.com/nodejs/node/pull/63966
Refs: https://github.com/nodejs/node/pull/53329
Refs: https://github.com/nodejs/node/pull/48950
Refs: https://github.com/nodejs/node/issues/45465
Refs: https://github.com/nodejs/node/issues/42827
Refs: https://github.com/nodejs/node/issues/47076
Refs: https://github.com/nodejs/node/pull/62862
Refs: https://github.com/nodejs/node/pull/38512
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
2026-10-25 22:36:32 +01:00
Filip Skokan
7e58295439
crypto: wire up SHA-3 with BoringSSL
...
Add SHA3-256, SHA3-384, and SHA3-512 to name lookup and getHashes().
BoringSSL exposes EVP_sha3_* descriptors but omits them from its
digest registry. Map the names directly to those descriptors so
node:crypto can use them too.
When using BoringSSL, limit WebCrypto SHA-3 support to digest
operations.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66922
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-10-24 22:04:14 +00:00
Node.js GitHub Bot
56da329c76
test: update WPT for WebCryptoAPI to e15690d276
...
PR-URL: https://github.com/nodejs/node/pull/66813
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-10-20 00:46:45 +00:00
Node.js GitHub Bot
782a3ac8ae
test: update WPT for WebCryptoAPI to b638c093cd
...
PR-URL: https://github.com/nodejs/node/pull/66689
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-10-14 21:09:57 +00:00
Filip Skokan
b48f24afbd
test: reduce expensive crypto test variants
...
Skip redundant RSA keygen and PBKDF2 WPT variants during regular CI.
Keep the full matrix when producing a WPT report.
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 <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66244
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
2026-09-25 14:25:32 +00:00
Filip Skokan
18c2b337af
crypto: use current FIPS state for availability
...
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 <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2026-09-23 08:50:56 +00:00
Node.js GitHub Bot
fe4a42b0e7
test: update WPT for WebCryptoAPI to 55ce71bb9d
...
PR-URL: https://github.com/nodejs/node/pull/65813
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2026-09-07 14:21:39 +00:00
Filip Skokan
b0d56c7328
test,benchmark: use OpenSSL feature helpers
...
Add isBoringSSL to the test crypto helpers and use it in tests and
benchmarks. Replace hasOpenSSL3 call sites with hasOpenSSL(3).
Assisted-by: Codex
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65762
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
2026-09-05 13:31:22 +00:00
Node.js GitHub Bot
62b7388d41
test: update WPT for WebCryptoAPI to e235e089b4
...
PR-URL: https://github.com/nodejs/node/pull/65478
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2026-08-24 09:54:03 +00:00
Filip Skokan
ed9f464b31
crypto: disable non-FIPS WebCrypto paths in FIPS mode
...
Hide TurboSHAKE and KangarooTwelve when FIPS is enabled. Reject cSHAKE
and KMAC parameters that require implementations outside the OpenSSL
provider, while keeping provider-backed paths available.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65172
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2026-08-11 19:34:34 +00:00
Filip Skokan
45550ee0f3
test: update tests to run with OpenSSL >= 3.0 FIPS mode
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64960
Fixes: https://github.com/nodejs/node/issues/48379
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Aviv Keller <me@aviv.sh >
2026-08-05 15:38:11 +00:00
Filip Skokan
d90d9d55ad
crypto: limit KangarooTwelveParams customization to 512 bytes
...
To align with a future OpenSSL-imposed limit.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64557
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-07-19 15:58:25 +00:00
Node.js GitHub Bot
fd3f870219
test: update WPT for WebCryptoAPI to ec2fee39a4
...
PR-URL: https://github.com/nodejs/node/pull/64435
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-07-14 00:55:29 +00:00
Filip Skokan
29890721cd
crypto: reject small-order EdDSA points during verify
...
Return false for Ed25519 and Ed448 one-shot verification when the public
key or signature R component is a known low-order point. This keeps key
import behavior unchanged while making WebCrypto verification match WPT
expectations across OpenSSL variants.
Remove the stale WPT expected-failure entry and add focused regression
coverage for both curves.
Closes: https://github.com/nodejs/node/issues/54572
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64026
Fixes: https://github.com/nodejs/node/issues/54572
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2026-06-23 20:44:57 +02:00
Node.js GitHub Bot
bb3f7e80b2
test: update WPT for WebCryptoAPI to 0c413fb56b
...
PR-URL: https://github.com/nodejs/node/pull/63647
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-06-01 19:03:32 +00:00
Node.js GitHub Bot
b5659d14ab
test: update WPT for WebCryptoAPI to 97bbc7247a
...
PR-URL: https://github.com/nodejs/node/pull/63417
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2026-05-20 20:21:23 +00:00
Filip Skokan
550f195277
crypto: wire ML-DSA and ML-KEM for use when using BoringSSL
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63255
Refs: https://github.com/electron/electron/issues/36256
Refs: https://github.com/electron/electron/issues/41720
Refs: https://github.com/electron/electron/pull/51127
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-05-17 18:18:14 +00:00
Filip Skokan
be9f78f0dc
crypto: wire ChaCha20-Poly1305 in Web Cryptography when using BoringSSL
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63255
Refs: https://github.com/electron/electron/issues/36256
Refs: https://github.com/electron/electron/issues/41720
Refs: https://github.com/electron/electron/pull/51127
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-05-17 18:18:13 +00:00
Filip Skokan
07431982bb
crypto: wire AES-KW in Web Cryptography when using BoringSSL
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63255
Refs: https://github.com/electron/electron/issues/36256
Refs: https://github.com/electron/electron/issues/41720
Refs: https://github.com/electron/electron/pull/51127
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-05-17 18:18:11 +00:00
Filip Skokan
e107f3c3c0
src: add BoringSSL EVP enumeration fallback
...
BoringSSL declares EVP_CIPHER_do_all_sorted and
EVP_MD_do_all_sorted, but stock no-decrepit builds do not provide
those symbols. Add a Node build flag that keeps ncrypto and its
dependents on a local BoringSSL fallback list when libdecrepit is
absent.
Keep embedders that provide the EVP enumeration symbols on the normal
OpenSSL-compatible path, matching Electron's patched BoringSSL build.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63206
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-05-11 15:36:55 +00:00
Filip Skokan
0bd46c151b
crypto: improve accuracy of SubtleCrypto.supports
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63104
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-05-06 13:49:06 +00:00
Filip Skokan
e0cab9dcf7
crypto: add TurboSHAKE and KangarooTwelve Web Cryptography algorithms
...
PR-URL: https://github.com/nodejs/node/pull/62183
Refs: https://wicg.github.io/webcrypto-modern-algos/#kangarootwelve
Refs: https://wicg.github.io/webcrypto-modern-algos/#turboshake
Refs: https://www.rfc-editor.org/rfc/rfc9861.html
Refs: https://redirect.github.com/openssl/openssl/issues/30304
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-03-26 22:04:32 +01:00
Node.js GitHub Bot
1baafcc882
test: update WPT resources, interfaces and WebCryptoAPI
...
PR-URL: https://github.com/nodejs/node/pull/62389
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-03-26 10:47:22 +01:00
Filip Skokan
b328bf74bd
lib,src: implement QuotaExceededError as DOMException-derived interface
...
Implement QuotaExceededError as a DOMException-derived interface per the
WebIDL specification update.
QuotaExceededError is now a proper constructor exposed as a global
[Exposed=*] interface that extends DOMException with optional `quota`
and `requested` attributes (both nullable doubles, defaulting to null).
The constructor validates that quota and requested are finite,
non-negative, and that requested is not less than quota when both are
provided.
QuotaExceededError is [Serializable] and supports structuredClone,
preserving the quota and requested values across the serialization
boundary.
Callers updated:
- crypto.getRandomValues() now throws a QuotaExceededError instance
- WebStorage (C++) now constructs QuotaExceededError directly
Refs: https://redirect.github.com/whatwg/webidl/pull/1465
Fixes: https://github.com/nodejs/node/issues/58987
PR-URL: https://github.com/nodejs/node/pull/62293
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2026-03-19 14:41:50 +01:00
Node.js GitHub Bot
597fc3a7f5
test: update WPT for WebCryptoAPI to c58b6f4e0e
...
PR-URL: https://github.com/nodejs/node/pull/60702
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
2025-11-15 12:52:12 +00:00
Filip Skokan
8e5c5b3b04
test: update WPT resources,WebCryptoAPI,webstorage
...
PR-URL: https://github.com/nodejs/node/pull/59311
Refs: https://github.com/nodejs/node/issues/58987
Refs: https://github.com/nodejs/node/issues/59310
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-03 11:31:39 +00:00
Livia Medeiros
c11c7be36e
crypto: forbid passing Float16Array to getRandomValues()
...
PR-URL: https://github.com/nodejs/node/pull/57880
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2025-04-17 07:26:53 +00:00
Filip Skokan
0116e80827
crypto: allow non-multiple of 8 in SubtleCrypto.deriveBits
...
PR-URL: https://github.com/nodejs/node/pull/55296
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-11-23 08:22:12 -08:00
Filip Skokan
c63255b0c0
test,crypto: update WebCryptoAPI WPT
...
PR-URL: https://github.com/nodejs/node/pull/55512
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-10-26 07:41:27 +00:00
Filip Skokan
fc02b88f89
test,crypto: update WebCryptoAPI WPT
...
Refs: #54572
Refs: #54468
PR-URL: https://github.com/nodejs/node/pull/54593
Refs: https://github.com/nodejs/node/issues/54572
Refs: https://github.com/nodejs/node/pull/54468
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-08-29 16:46:40 +00:00