node/test/fixtures/webcrypto
Filip Skokan 8ec37ebbd6
crypto: support non-byte WebCrypto lengths and cSHAKE
Add shared bit-length helpers for WebCrypto operations that accept bit
sequences whose length is not byte-aligned.

Use the helpers for cSHAKE output, ECDH-derived bits, HMAC/KMAC key
generation/import/derivation, and KMAC sign/verify output. Preserve the
requested bit length in CryptoKey algorithm metadata while storing and
exporting rounded-up byte material with unused low bits cleared.

Keep byte-multiple validation for algorithms whose specs require it.

Extend the lower-end of KMAC's key length support.

Enable cSHAKE customization and functionName parameters.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63988
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-06-20 18:42:04 +02:00
..
supports-level-2.mjs crypto: support non-byte WebCrypto lengths and cSHAKE 2026-06-20 18:42:04 +02:00
supports-modern-algorithms.mjs crypto: support non-byte WebCrypto lengths and cSHAKE 2026-06-20 18:42:04 +02:00
supports-secure-curves.mjs crypto: improve accuracy of SubtleCrypto.supports 2026-05-06 13:49:06 +00:00
supports-sha3.mjs crypto: support non-byte WebCrypto lengths and cSHAKE 2026-06-20 18:42:04 +02:00