Creates an ML-KEM-768 instance with synchronous operations which take the keys.
A promise that resolves to an MlKemInterface instance.
Use createMlKem768Encapsulator and createMlKem768Decapsulator instead. This function will be removed in 4.0.0.
import { createMlKem768 } from "@webpqc/mlkem";const ctx = await createMlKem768();const [pk, sk] = ctx.generateKeyPair(); // syncconst [ct, ssS] = ctx.encap(pk); // syncconst ssR = ctx.decap(ct, sk); // sync// ssS and ssR contain the same bytes Copy
import { createMlKem768 } from "@webpqc/mlkem";const ctx = await createMlKem768();const [pk, sk] = ctx.generateKeyPair(); // syncconst [ct, ssS] = ctx.encap(pk); // syncconst ssR = ctx.decap(ct, sk); // sync// ssS and ssR contain the same bytes
Creates an ML-KEM-768 instance with synchronous operations which take the keys.