$ the-wire · showcase
Crypto fixes multi-prime RSA JWK handling, adds Hybrid KEMs
By RepoJournal · Filed · About Node.js
Node.js crypto gets two significant updates: consistent multi-prime RSA key handling across formats and experimental Hybrid KEM support in Web Cryptography.
A fix for multi-prime RSA keys in nodejs/node closes an inconsistency between PKCS#8 and JWK formats [1]. Previously, converting a multi-prime PKCS#8 key to JWK omitted the `oth` member, importing a JWK discarded additional primes, and exporting a JWK to PKCS#8 could produce an invalid two-prime key (or was unreachable). After this change, all operations preserve all primes: PKCS#8 to JWK includes `oth`, JWK imports all primes, and JWK to PKCS#8 produces a valid key with all primes. This is a behavior change for anyone handling multi-prime RSA keys through JWK; keys that were previously rejected or silently truncated will now be handled fully.
Web Cryptography now includes Hybrid KEM algorithms, added experimentally and disabled under FIPS at startup [2]. The implementation is composed in JavaScript because the underlying primitives are not yet available; the PR notes "The hybrid JS side composition and secondary handle slots will all go away when OpenSSL lands support for these," which would also enable them in `node:crypto` encap/decap.
Test and benchmark infrastructure now uses a new `isBoringSSL` helper and has migrated `hasOpenSSL3` call sites to `hasOpenSSL(3)` [3]. The older helper remains in place for now to avoid conflicts with in-flight PRs, but the direction is set for its eventual removal.
Lower-priority updates: the doc-kit contributing guide was refreshed [4], and a reliability report for 2026-09-06 was added [5].
Action items
References
- [1] crypto: fix multi-prime RSA JWKs ↗ nodejs/node
- [2] crypto: add Hybrid KEMs to Web Cryptography ↗ nodejs/node
- [3] test,benchmark: use OpenSSL feature helpers ↗ nodejs/node
- [4] chore: update contributing.md (#1083) ↗ nodejs/doc-kit
- [5] Add report for 2026-09-06 ↗ nodejs/reliability