API reference for mlkem/main
    Preparing search index...

    Class MlKem768

    ML-KEM-768 with asynchronous operations which take the keys.

    Use createMlKem768Encapsulator and createMlKem768Decapsulator instead. This class will be removed in 4.0.0.

    Hierarchy

    • MlKemAsync
      • MlKem768
    Index
    • Generates a shared secret from the encapsulated ciphertext and the private key.

      Parameters

      • ct: Uint8Array

        A ciphertext generated by encap.

      • sk: Uint8Array

        A private key.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A shared secret.

      MlKemError

    • Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.

      Parameters

      • seed: Uint8Array

        A 64-octet seed for the deterministic key generation.

      Returns Promise<[Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>]>

      A keypair [publicKey, privateKey].

      MlKemError

    • Generates a ciphertext for the public key and a shared secret.

      Parameters

      • pk: Uint8Array

        A public key.

      • Optionalseed: Uint8Array

        An optional 32-octet seed for the deterministic shared secret generation.

      Returns Promise<[Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>]>

      A ciphertext (the encapsulation of the shared secret) and a shared secret.

      MlKemError

    • Generates a keypair [publicKey, privateKey].

      Returns Promise<[Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>]>

      A keypair [publicKey, privateKey].

      MlKemError