Skip to content

Function: kem() ​

kem(): KEM

Defined in: cnsa2.ts:336

Pure ML-KEM-1024: the CNSA 2.0 key-establishment algorithm. NSA does not require hybrid and says not to use one on NSS mission systems except NSA-specified exceptions, so this is the recommended choice. Seal data with it via Envelope.seal(): a pure ML-KEM-1024 key produces an envelope v2 (HKDF-SHA-384 + AES-256-GCM; quantum-safe-py reads and writes the same bytes).

Returns ​

KEM

A KEM bound to ML-KEM-1024.

Example ​

ts
const k = cnsa2.kem();
using pair = k.generateKeyPair();
const sealed = Envelope.seal(data, pair.publicKey);

Apache-2.0.