Constructs a new instance of the MlKem1024 class.
Protected_Protected_Protected_Protected_Protected_Protected_Protected_Lossily compresses and serializes a vector of polynomials.
The vector of polynomials to compress.
The compressed and serialized data as a Uint8Array.
Protected_Lossily compresses and serializes a polynomial.
The output buffer to store the compressed data.
The polynomial to compress.
The compressed and serialized data as a Uint8Array.
Protected_Protected_Deserializes and decompresses a vector of polynomials.
This is the approximate inverse of the _compressU method.
Since compression is lossy, the decompressed data may not match the original vector of polynomials.
The compressed and serialized data as a Uint8Array.
The decompressed vector of polynomials.
Protected_Decompresses a given polynomial, representing the approximate inverse of compress2, in Uint8Array into an array of numbers.
Note that compression is lossy, and thus decompression will not match the original input.
The Uint8Array to decompress.
An array of numbers obtained from the decompression process.
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 MlKem1024 class, which extends the MlKem1024Base class.
This class extends the MlKem1024Base class and provides specific implementation for MlKem1024.
Deprecated
Use createMlKem1024 instead. This async class-based API will be removed in a future release.
Remarks
MlKem1024 is a specific implementation of the ML-KEM key encapsulation mechanism.
Example