ML-KEM decapsulation, native where the runtime has ML-KEM: the raw secret key is imported in a PKCS#8 wrapper and crypto.decapsulate() runs in OpenSSL. Falls back to @noble/post-quantum elsewhere.
crypto.decapsulate()
ML-KEM security level (512, 768, or 1024).
Ciphertext from bridgedMlKemEncapsulate.
bridgedMlKemEncapsulate
Raw secret (decapsulation) key bytes from bridgedMlKemKeygen.
bridgedMlKemKeygen
32-byte shared secret.
const sharedSecret = bridgedMlKemDecapsulate(768, cipherText, secretKey); Copy
const sharedSecret = bridgedMlKemDecapsulate(768, cipherText, secretKey);
ML-KEM decapsulation, native where the runtime has ML-KEM: the raw secret key is imported in a PKCS#8 wrapper and
crypto.decapsulate()runs in OpenSSL. Falls back to @noble/post-quantum elsewhere.