Filip Skokan
e0748dfd9d
benchmark: cover Web Crypto conversion costs
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66237
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Aviv Keller <me@aviv.sh >
2026-09-25 13:23:25 +00:00
Filip Skokan
194eb69f8b
test: deflake test-benchmark-crypto
...
Test mode reduces bufferSize to one, giving the random buffers a 1/256
chance of matching and failing the comparison count assertion. Use 256
bytes in test mode and force the first bytes to differ before timing.
Remove the flaky designation.
Fixes: https://github.com/nodejs/node/issues/52690
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66151
Fixes: https://github.com/nodejs/node/issues/58353
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-09-21 21:06:43 +00:00
Filip Skokan
59b5ac83ba
crypto: read RSA-PSS restrictions from provider
...
Query salt length and digest restrictions instead of serializing the key
to SPKI and parsing its algorithm identifier. A readable salt length
distinguishes restricted keys, including empty parameter sequences, from
unrestricted keys.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66108
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-09-20 14:21:47 +00:00
Filip Skokan
6adf7c1722
crypto: skip private RSA parameters in key details
...
Retrieving asymmetricKeyDetails only needs the modulus, public exponent,
and RSA-PSS restrictions. Add a public-only Rsa view so provider-backed
keys do not also extract private components or probe additional primes.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66108
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-09-20 14:21:46 +00:00
Filip Skokan
1a3712d1f8
crypto: use names for asymmetric key algorithms
...
Provider-backed keys can have no numeric OpenSSL ID. Identify and
construct asymmetric keys by algorithm name, replacing the custom PQC
name-to-NID substitution with provider-aware matching in ncrypto.
Centralize known algorithm names, public key-type names, capabilities,
and backend compatibility in ncrypto. Use named key generation jobs and
remove asymmetric EVP_PKEY constants from the internal JavaScript
binding.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/65966
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-09-17 20:25:55 +00:00
Filip Skokan
bd4f1dcaf3
crypto: avoid EC raw export reconstruction
...
Read private scalars and matching uncompressed provider encodings
directly.
Assisted-by: GitHub Copilot
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65908
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2026-09-10 19:23:00 +00:00
Filip Skokan
7ac27d4512
crypto: export EC JWK coordinates directly
...
Query provider coordinates together instead of serializing and
decoding the public point.
Assisted-by: GitHub Copilot
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65908
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2026-09-10 19:22:59 +00:00
Filip Skokan
050a87d863
crypto: read EC curve metadata directly
...
Avoid reconstructing EC keys for key details and TLS ephemeral-key
curve reporting.
Assisted-by: GitHub Copilot
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65908
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2026-09-10 19:22:58 +00:00
Filip Skokan
e026733cd0
crypto: optimize and benchmark key preparation
...
Optimize asymmetric key preparation with benchmark and regression
coverage for the supported input paths.
Assisted-by: GitHub Copilot
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65892
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-09-09 21:45:48 +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
Filip Skokan
2384897f39
crypto: cache valid ECDH key pairs
...
Avoid repeating EC key-pair validation after a pair has already been
established or validated. Invalidate the positive-only cache whenever
public-key mutation can make the pair inconsistent.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65615
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-09-04 10:36:50 +00:00
James M Snell
f850cea429
benchmark: implement node:bench version of bench tools
...
Signed-off-by: James M Snel <jasnell@gmail.com >
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/65606
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
2026-09-03 15:37:21 +00:00
Filip Skokan
1d8062421e
crypto: add a generic MAC API
...
Add getMacs() and createMac() to node:crypto as a layer on top of
OpenSSL EVP_MAC. Support incremental and streaming operations with
provider parameter validation and configurable output sizes.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65553
Refs: https://github.com/nodejs/node/issues/32433
Refs: https://github.com/nodejs/node/issues/40921
Refs: https://github.com/nodejs/node/issues/48314
Refs: https://github.com/nodejs/node/pull/32448
Refs: https://github.com/nodejs/node/pull/32477
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-08-29 00:58:18 +02:00
Filip Skokan
8d46b146be
benchmark: add crypto class benchmarks
...
Measure construction and low-cost method paths for crypto classes whose
state is stored in native or private slots.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-08-26 21:36:04 +00:00
Filip Skokan
e7a69c4992
crypto: discover ciphers from OpenSSL providers
...
Enumerate usable ciphers and aliases from activated OpenSSL 3 providers
instead of maintaining lists of provider-only algorithms. Skip numeric
OID aliases and filter NULL, TLS composite, multiblock, and
encrypt-then-MAC implementations that the Cipher APIs cannot use.
Preserve the OpenSSL 1.1.1 and BoringSSL paths.
Expose CBC-CTS, SM4-GCM, SM4-CCM, SM4-XTS, and additional AES key wrap
implementations. Add `ctsMode` (CS1/CS2/CS3) and `xtsStandard`
(GB/IEEE) options for selecting provider CTS and SM4-XTS variants.
Keep ordinary cipher construction on the original binding and legacy
lookup paths.
Lazily cache successful provider fetches per Environment for
string initialization and `getCipherInfo()`.
Index entries by case-insensitive query, canonical, and alias names.
Deduplicate owners by provider and canonical identity. Return borrowed
pointers on warm hits.
Use the shared process-wide FIPS-state generation to invalidate
per-Environment cipher caches and refresh `getCiphers()` snapshots in
the main thread and workers. Existing cipher contexts retain their
implementation and can finish across a transition. Release provider
owners before unloading worker addon DSOs.
Enforce one-shot updates for CBC-CTS, AES key wrap, SIV/GCM-SIV, and
CCM decryption. Reject finalization without required input or CCM tags,
and defer authentication failures to `final()`. Document streaming and
XTS data-unit constraints.
Add known-answer vectors, option validation, provider round trips,
cache, worker, snapshot, FIPS transition, and construction benchmark
coverage.
Fixes: https://github.com/nodejs/node/issues/43040
Fixes: https://github.com/nodejs/node/issues/64866
Refs: https://github.com/nodejs/node/issues/62982
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65484
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-08-25 23:11:06 +00:00
Filip Skokan
87a6aa674a
benchmark: trim down the argon2 sets
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64218
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-07-02 15:29:07 +00:00
Filip Skokan
8fa5954569
crypto: use EVP_MAC for HMAC on OpenSSL >=3
...
Closes: https://github.com/nodejs/node/issues/59493
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63942
Fixes: https://github.com/nodejs/node/issues/59493
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-06-19 07:50:57 +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
25f80fb764
src: decouple KeyObject and CryptoKey and move CryptoKey to src
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/62924
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-05-04 00:09:07 +02:00
Filip Skokan
c29a34cd48
crypto: add JWK support for ML-KEM and SLH-DSA key types
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/62706
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-04-21 17:32:23 +00:00
Filip Skokan
d4fa60cf9f
crypto: add raw key formats support to the KeyObject APIs
...
Add raw key format support (raw-public, raw-private, raw-seed) to
KeyObject.prototype.export(), crypto.createPrivateKey(),
and crypto.createPublicKey() for applicable asymmetric keys (EC,
CFRG curves, ML-DSA, ML-KEM, and SLH-DSA).
Also wire these to the Web Cryptography APIs and remove the unnecessary
KeyExportJob. The KeyExportJob classes were removed because the export
operations they performed are not computationally expensive. They're
just serialization of already-available key data (SPKI, PKCS8, raw
bytes). Running them as async CryptoJobs on the libuv thread pool added
unnecessary overhead and complexity for operations that complete
instantly.
PR-URL: https://github.com/nodejs/node/pull/62240
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-03-26 10:31:26 +01:00
Ali Hassan
9c1c08e73a
benchmark: fix destructuring in dgram/single-buffer
...
PR #59872 renamed the config key from `num` to `n` but did not update
the destructuring in main(), leaving `{ num: n }` which resolves to
undefined. This caused the benchmark to produce near-zero throughput
since the send-batching logic never fires when n is undefined.
Refs: https://github.com/nodejs/node/pull/59872
PR-URL: https://github.com/nodejs/node/pull/62084
Refs: https://github.com/nodejs/performance/issues/187
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-03-16 18:16:39 +00:00
SeokhunEom
42d0e1307b
benchmark: use boolean options in benchmark tests
...
Use boolean values for randomUUID benchmark and
deprecate benchmark instead of 0/1.
PR-URL: https://github.com/nodejs/node/pull/60129
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
2025-12-25 10:45:07 +00:00
James M Snell
ed94bc48f3
src: update crypto.getCipherInfo() to use DictionaryTemplate
...
Also, have it use a null prototype
PR-URL: https://github.com/nodejs/node/pull/60036
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2025-10-05 14:05:35 +00:00
Filip Skokan
f8d68d30ae
crypto: support ML-KEM, DHKEM, and RSASVE key encapsulation mechanisms
...
PR-URL: https://github.com/nodejs/node/pull/59491
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-08-20 14:30:58 +00:00
bdcab711b8
crypto: add argon2() and argon2Sync() methods
...
Co-authored-by: Filip Skokan <panva.ip@gmail.com >
Co-authored-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/50353
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-08-19 19:30:38 +00:00
Filip Skokan
f4413175b4
benchmark: reflect current OpenSSL in crypto key benchmarks
...
PR-URL: https://github.com/nodejs/node/pull/59459
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2025-08-15 10:24:46 +00:00
Filip Skokan
24e28c41b5
crypto: support ML-DSA KeyObject, sign, and verify
...
PR-URL: https://github.com/nodejs/node/pull/59259
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-06 21:49:30 +00:00
Tobias Nießen
08609b5222
crypto: make timingSafeEqual faster for Uint8Array
...
Add a fast API that V8 can use if the user supplies Uint8Arrays
(including Buffers) to timingSafeEqual.
PR-URL: https://github.com/nodejs/node/pull/52341
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-04-08 11:36:53 +00:00
Joyee Cheung
4c46439fe9
crypto: implement crypto.hash()
...
This patch introduces a helper crypto.hash() that computes
a digest from the input at one shot. This can be 1.2-1.6x faster
than the object-based createHash() for smaller inputs (<= 5MB)
that are readily available (not streamed) and incur less memory
overhead since no intermediate objects will be created.
PR-URL: https://github.com/nodejs/node/pull/51044
Refs: https://github.com/nodejs/performance/issues/136
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-02-27 13:27:19 +01:00
Marco Ippolito
215f4d04b7
crypto: move createCipher and createDecipher to eol
...
PR-URL: https://github.com/nodejs/node/pull/50973
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-12-15 14:00:52 +00:00
Lei Shi
29af78e8fb
benchmark: update iterations in benchmark/crypto/aes-gcm-throughput.js
...
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50929
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-12-09 18:25:14 +00:00
Lei Shi
e158b11404
benchmark: update iteration and size in benchmark/crypto/randomBytes.js
...
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50868
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-12-09 18:25:04 +00:00
Joyee Cheung
c97322adff
benchmark: add create-hash benchmark
...
PR-URL: https://github.com/nodejs/node/pull/51026
Refs: https://github.com/nodejs/performance/issues/136
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-05 22:59:31 +00:00
Lei Shi
23031d9b0a
benchmark: update iterations in benchmark/crypto/hkdf.js
...
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50866
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2023-12-03 06:31:41 +00:00
Lei Shi
1b16bf6561
benchmark: update iterations in benchmark/crypto/get-ciphers.js
...
Fixes: https://github.com/nodejs/node/issues/50571
PR-URL: https://github.com/nodejs/node/pull/50863
Refs: https://github.com/nodejs/node/issues/50571
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2023-12-02 03:04:25 +00:00
Lei Shi
bae7e3831d
benchmark: increase the iteration number to an appropriate value
...
Current iteration number is too small that fwrite occupies large
portion of execution time which made crypo execution time measured
inaccurate. The iteration above 1e5 makes 50% higher and stable
score.
PR-URL: https://github.com/nodejs/node/pull/50766
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2023-11-19 06:33:59 +00:00
Filip Skokan
0e92bf1b66
benchmark: refactor crypto oneshot
...
PR-URL: https://github.com/nodejs/node/pull/48267
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-06-05 19:00:41 +00:00
Filip Skokan
6327d4582a
benchmark: add crypto.create*Key
...
PR-URL: https://github.com/nodejs/node/pull/48284
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-06-05 16:45:47 +00:00
Antoine du Hamel
214b00d215
benchmark: add trailing commas in benchmark/crypto
...
PR-URL: https://github.com/nodejs/node/pull/46553
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-02-10 00:54:53 +00:00
Filip Skokan
7ad069c53c
crypto: use globalThis.crypto over require('crypto').webcrypto
...
PR-URL: https://github.com/nodejs/node/pull/45817
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-12-16 19:55:42 +00:00
Momtchil Momtchev
8671e4a116
test: upgrade all 1024 bit RSA keys to 2048 bits
...
Ubuntu 22.04 Jammy rejects 1024 bit RSA Keys
PR-URL: https://github.com/nodejs/node/pull/44498
Refs: https://github.com/nodejs/node/issues/44497
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2022-09-27 20:19:35 +02:00
Antoine du Hamel
6ee4228498
crypto: validate this value for webcrypto.getRandomValues
...
PR-URL: https://github.com/nodejs/node/pull/41760
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-02-26 17:12:48 +00:00
Rich Trott
a7215c8fa7
benchmark: remove unreachable code from crypto/hash-stream-creation
...
`hash.digest('buffer')` has returned a Buffer and not a string since at
least Node.js 0.10.6. The benchmark, as it is written, will not work on
any version of Node.js prior to 16.x (due to `Object.hasOwn()`) and
certainly won't run on versions earlier than 0.10.6 due to const/let and
probably other things. Remove impossible-to-reach code intended to
accommodate Node.js earlier than 0.10.6.
PR-URL: https://github.com/nodejs/node/pull/41535
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-17 05:31:21 +00:00
Brian White
ed01811e71
benchmark: increase crypto DSA keygen params
...
OpenSSL 3.0 increased the minimum values for these parameters.
PR-URL: https://github.com/nodejs/node/pull/40416
Fixes: https://github.com/nodejs/node/issues/40410
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-10-16 06:03:10 -04:00
Filip Skokan
e8cb6446ef
crypto: reconcile oneshot sign/verify sync and async implementations
...
PR-URL: https://github.com/nodejs/node/pull/37816
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-08 10:08:26 +02:00
Tobias Nießen
5dae7d6758
crypto: add buffering to randomInt
...
PR-URL: https://github.com/nodejs/node/pull/35110
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-04-03 15:37:53 +02:00
James M Snell
0008a675ff
crypto: implement randomuuid
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36729
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
2021-01-07 12:44:36 -08:00
James M Snell
dae283d96f
crypto: refactoring internals, add WebCrypto
...
Fixes: https://github.com/nodejs/node/issues/678
Refs: https://github.com/nodejs/node/issues/26854
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35093
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-07 17:27:05 -07:00
Ruben Bridgewater
bb6125bac7
benchmark: remove special test entries
...
This reverts commit 7cfbc9f90f .
PR-URL: https://github.com/nodejs/node/pull/31755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-03-09 22:35:54 +01:00