Protected_Protected_Protected_Protected_Protected_Protected_Protected_Compresses the given array of coefficients into a Uint8Array.
The output Uint8Array.
The array of coefficients.
The compressed Uint8Array.
Protected_Compresses the given array of numbers into a Uint8Array.
The Uint8Array to store the compressed values.
The array of numbers to compress.
The compressed Uint8Array.
Protected_Protected_Decompresses a Uint8Array into a two-dimensional array of numbers.
The Uint8Array to decompress.
The decompressed two-dimensional array.
Protected_Decompresses a Uint8Array into an array of numbers.
The Uint8Array to decompress.
An array of numbers.
Protected_Protected_Protected_Protected_Protected_Protected_Generates a 2D array of noise samples.
The noise parameter.
The offset value.
The size of the array.
The generated 2D array of noise samples.
Protected_Generates a 2-dimensional array of noise samples.
The noise parameter.
The offset value.
The size of the array.
The generated 2-dimensional array of noise samples.
Protected_Sets up the MlKemBase instance by loading the necessary crypto library. If the crypto library is already loaded, this method does nothing.
A promise that resolves when the setup is complete.
Protected_Generates a ciphertext for the public key and a shared secret.
If an error occurred, throws MlKemError.
A ciphertext generated by encap.
A private key.
A shared secret.
Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.
If an error occurred, throws MlKemError.
A 64-octet seed for the deterministic key generation.
A kaypair [publicKey, privateKey].
Generates a shared secret from the encapsulated ciphertext and the private key.
If an error occurred, throws MlKemError.
A public key.
Optionalseed: Uint8ArrayAn optional 32-octet seed for the deterministic shared secret generation.
A ciphertext (encapsulated public key) and a shared secret.
Generates a keypair [publicKey, privateKey].
If an error occurred, throws MlKemError.
A kaypair [publicKey, privateKey].
Represents the MlKem768 class, which extends the MlKemBase class.
This class extends the MlKemBase class and provides specific implementation for MlKem768.
Deprecated
Use createMlKem768 instead. This async class-based API will be removed in a future release.
Remarks
MlKem768 is a specific implementation of the ML-KEM key encapsulation mechanism.
Example