@blockchaincommons/components - v1.0.0-beta.4
    Preparing search index...

    Function mlkemDecapsulate

    ML-KEM Module - Post-Quantum Key Encapsulation Mechanism

    This module provides ML-KEM (Module-Lattice-Based Key Encapsulation Mechanism) implementation for post-quantum key agreement.

    ML-KEM is standardized by NIST as part of FIPS 203.

    Security levels:

    • MLKEM512: NIST Level 1 (AES-128 equivalent)
    • MLKEM768: NIST Level 3 (AES-192 equivalent)
    • MLKEM1024: NIST Level 5 (AES-256 equivalent)
    • Decapsulate a shared secret using a private key and ciphertext.

      Parameters

      • level: MLKEMLevel

        The ML-KEM security level

      • secretKey: Uint8Array

        The secret key bytes

      • ciphertext: Uint8Array

        The ciphertext bytes

      Returns Uint8Array

      The shared secret bytes