MLKEMEngine (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.crypto.kems.mlkem

## Class MLKEMEngine

- java.lang.Object
- - org.bouncycastle.crypto.kems.mlkem.MLKEMEngine

-     public class MLKEMEngine
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `SeedBytes`
    `static int` | `SymBytes`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkModulus(byte[] t)`
    `boolean` | `checkPrivateKey(byte[] encoding)`
    `byte[][]` | `generateKemKeyPair(java.security.SecureRandom random)`
    `byte[][]` | `generateKemKeyPairInternal(byte[] d, byte[] z)`
    `int` | `getCipherTextBytes()`
    `int` | `getIndCpaPublicKeyBytes()`
    `int` | `getIndCpaSecretKeyBytes()`
    `static MLKEMEngine` | `getInstance(MLKEMParameters mlkemParameters)`
    `int` | `getPolyVecBytes()`
    `byte[]` | `kemDecrypt(MLKEMPrivateKeyParameters privateKey, byte[] cipherText)`
    `byte[][]` | `kemEncrypt(MLKEMPublicKeyParameters publicKey, byte[] randBytes)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SymBytes

          public static final int SymBytes

      See Also:
        Constant Field Values

    - #### SeedBytes

          public static final int SeedBytes

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          public static MLKEMEngine getInstance(MLKEMParameters mlkemParameters)

    - #### getCipherTextBytes

          public int getCipherTextBytes()

    - #### getIndCpaPublicKeyBytes

          public int getIndCpaPublicKeyBytes()

    - #### getIndCpaSecretKeyBytes

          public int getIndCpaSecretKeyBytes()

    - #### getPolyVecBytes

          public int getPolyVecBytes()

    - #### checkModulus

          public boolean checkModulus(byte[] t)

    - #### checkPrivateKey

          public boolean checkPrivateKey(byte[] encoding)

    - #### generateKemKeyPair

          public byte[][] generateKemKeyPair(java.security.SecureRandom random)

    - #### generateKemKeyPairInternal

          public byte[][] generateKemKeyPairInternal(byte[] d,
                                                     byte[] z)

    - #### kemEncrypt

          public byte[][] kemEncrypt(MLKEMPublicKeyParameters publicKey,
                                     byte[] randBytes)

    - #### kemDecrypt

          public byte[] kemDecrypt(MLKEMPrivateKeyParameters privateKey,
                                   byte[] cipherText)