Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/limitations/builtin-apis/crypto.mdx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- **Crypto:** Hashing, HMAC, PBKDF2, and HKDF support every digest `crypto.getHashes()` lists in Node 24, with OpenSSL's aliases and object identifiers. Hash and Hmac accept every Buffer encoding and any TypedArray or DataView, `createHash` and `hash.copy` take `outputLength`, and `crypto.hash` takes its options object; HMAC, PBKDF2, and HKDF reject the SHAKE and KMAC digests with Node's errors. Hash and Hmac values are also Transforms: they can be written, piped into, used as `pipeline()` stages, read, and listened to, and they report Node's errors after the stream flushes. `copy()` of a Hash whose stream flushed, and stream use of a value after its stream closed, throw a coded SC2020 error. `timingSafeEqual` compares any view or ArrayBuffer. Secret KeyObjects (`createSecretKey`, `generateKey` and `generateKeySync` for `hmac` and `aes`) support `type`, `symmetricKeySize`, `export()`, `equals()`, and `instanceof KeyObject`, and createHmac, hkdf, createCipheriv, and createDecipheriv accept them; asymmetric keys, `KeyObject.from()`, and `toCryptoKey()` are not available. `randomFill`, `randomFillSync` (every view kind and ArrayBuffer), `randomInt`, `randomUUID`, and `randomUUIDv7` follow Node 24.22, including callback timing; a `randomInt` callback whose error parameter is typed `Error | null` receives `null` where Node passes `undefined`. Scrypt supports its default parameters, numeric options, aliases, and memory limit. Both KDFs accept strings, Buffers, numeric typed arrays, DataViews, and fixed-length ArrayBuffers. `createCipheriv` and `createDecipheriv` support aes-128, aes-192, and aes-256 in CBC, CTR, and GCM modes and chacha20-poly1305, on native targets, through `update()`, `final()`, `setAAD()`, `setAutoPadding()`, `getAuthTag()`, and `setAuthTag()`; other ciphers, cipher streams, and wasm32-wasi builds are refused. Decrypting chacha20-poly1305 without an authentication tag fails in `final()`; Node 24.22 returns unverified plaintext. After `update()` fails, for example past the AES-GCM limit of 2^36 - 32 bytes per message, every later call on that cipher throws; Node still lets `final()` run. An output encoding that is a function or an instance of a class defining `toString` throws a coded SC2020 error. Public-key operations remain unsupported. Native derivations finish before their deferred callbacks, so computation blocks the caller.
- **Crypto:** Hashing, HMAC, PBKDF2, and HKDF support every digest `crypto.getHashes()` lists in Node 24, with OpenSSL's aliases and object identifiers. Hash and Hmac accept every Buffer encoding and any TypedArray or DataView, `createHash` and `hash.copy` take `outputLength`, and `crypto.hash` takes its options object; HMAC, PBKDF2, and HKDF reject the SHAKE and KMAC digests with Node's errors. Hash and Hmac values are also Transforms: they can be written, piped into, used as `pipeline()` stages, read, and listened to, and they report Node's errors after the stream flushes. `copy()` of a Hash whose stream flushed, and stream use of a value after its stream closed, throw a coded SC2020 error. Through `unknown` and `any` slots and untyped JavaScript, Hash and Hmac values keep their identity and support `update()`, `digest()`, and Hash's `copy()`, called or read as values; their stream and event members there throw a coded SC2020 error. `timingSafeEqual` compares any view or ArrayBuffer. Secret KeyObjects (`createSecretKey`, `generateKey` and `generateKeySync` for `hmac` and `aes`) support `type`, `symmetricKeySize`, `export()`, `equals()`, and `instanceof KeyObject`, and createHmac, hkdf, createCipheriv, and createDecipheriv accept them; asymmetric keys, `KeyObject.from()`, and `toCryptoKey()` are not available. `randomFill`, `randomFillSync` (every view kind and ArrayBuffer), `randomInt`, `randomUUID`, and `randomUUIDv7` follow Node 24.22, including callback timing; a `randomInt` callback whose error parameter is typed `Error | null` receives `null` where Node passes `undefined`. Scrypt supports its default parameters, numeric options, aliases, and memory limit. Both KDFs accept strings, Buffers, numeric typed arrays, DataViews, and fixed-length ArrayBuffers. `createCipheriv` and `createDecipheriv` support aes-128, aes-192, and aes-256 in CBC, CTR, and GCM modes and chacha20-poly1305, on native targets, through `update()`, `final()`, `setAAD()`, `setAutoPadding()`, `getAuthTag()`, and `setAuthTag()`; other ciphers, cipher streams, and wasm32-wasi builds are refused. Decrypting chacha20-poly1305 without an authentication tag fails in `final()`; Node 24.22 returns unverified plaintext. After `update()` fails, for example past the AES-GCM limit of 2^36 - 32 bytes per message, every later call on that cipher throws; Node still lets `final()` run. An output encoding that is a function or an instance of a class defining `toString` throws a coded SC2020 error. Public-key operations remain unsupported. Native derivations finish before their deferred callbacks, so computation blocks the caller.
24 changes: 24 additions & 0 deletions internal/compatibility/generated/node-v24-backlog.json
Original file line number Diff line number Diff line change
Expand Up @@ -6736,6 +6736,8 @@
"source": "compiler-dedicated:crypto.createHash",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -6774,6 +6776,8 @@
"source": "compiler-dedicated:crypto.createHmac",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -7396,6 +7400,8 @@
"source": "compiler-dedicated:crypto.hash",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -7519,6 +7525,8 @@
"source": "compiler-dedicated:crypto.pbkdf2",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -7557,6 +7565,8 @@
"source": "compiler-dedicated:crypto.pbkdf2Sync",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -9037,6 +9047,8 @@
"source": "compiler-dedicated:Hash",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -9075,6 +9087,8 @@
"source": "compiler-dedicated:hash.copy",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -9113,6 +9127,8 @@
"source": "compiler-dedicated:hash.digest",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -9151,6 +9167,8 @@
"source": "compiler-dedicated:hash.update",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -9189,6 +9207,8 @@
"source": "compiler-dedicated:Hmac",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -9227,6 +9247,8 @@
"source": "compiler-dedicated:hmac.digest",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -9265,6 +9287,8 @@
"source": "compiler-dedicated:hmac.update",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down
32 changes: 32 additions & 0 deletions internal/compatibility/generated/node-v24-internal.json
Original file line number Diff line number Diff line change
Expand Up @@ -19861,6 +19861,8 @@
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/node24-crypto-kdf-errors.ts",
"tests/corpus/node24-crypto-kdf-options.ts",
"tests/corpus/node24-crypto-kdf.ts",
Expand Down Expand Up @@ -20402,6 +20404,8 @@
"evidence": "compiler-dedicated:crypto.createHash",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -20439,6 +20443,8 @@
"evidence": "compiler-dedicated:crypto.createHmac",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -21040,6 +21046,8 @@
"evidence": "compiler-dedicated:crypto.hash",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -21158,6 +21166,8 @@
"evidence": "compiler-dedicated:crypto.pbkdf2",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -21195,6 +21205,8 @@
"evidence": "compiler-dedicated:crypto.pbkdf2Sync",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -23095,6 +23107,8 @@
"evidence": "compiler-dedicated:Hash",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -23132,6 +23146,8 @@
"evidence": "compiler-dedicated:hash.copy",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -23169,6 +23185,8 @@
"evidence": "compiler-dedicated:hash.digest",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -23206,6 +23224,8 @@
"evidence": "compiler-dedicated:hash.update",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -23243,6 +23263,8 @@
"evidence": "compiler-dedicated:Hmac",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -23280,6 +23302,8 @@
"evidence": "compiler-dedicated:hmac.digest",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -23317,6 +23341,8 @@
"evidence": "compiler-dedicated:hmac.update",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -25031,6 +25057,8 @@
"evidence": "compiler-dedicated:crypto.pbkdf2",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -28114,6 +28142,8 @@
"evidence": "compiler-dedicated:Hash",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down Expand Up @@ -28164,6 +28194,8 @@
"evidence": "compiler-dedicated:Hmac",
"tests": [
"tests/corpus/5760-crypto-hash-stream.ts",
"tests/corpus/5768-crypto-hash-unknown.ts",
"tests/corpus/5769-crypto-hash-unknown.cjs",
"tests/corpus/5761-crypto-hash-stream-states.ts",
"tests/corpus/5762-crypto-hash-stream.cjs",
"tests/corpus/2890-crypto-static-utility.ts",
Expand Down
Loading
Loading