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

org.bouncycastle.crypto.kems.frodo

## Class FrodoKEMEngine

- java.lang.Object
- - org.bouncycastle.crypto.kems.frodo.FrodoKEMEngine

-     public class FrodoKEMEngine
      extends java.lang.Object

  FrodoKEM as standardised in ISO/IEC 18033-2:2006/Amd 2:2026, Clause 14, for the SHAKE parameter sets at security levels 976 and 1344. A single engine implements both the salted "FrodoKEM" (Salted Fujisaki-Okamoto transform) and the ephemeral "eFrodoKEM" (no salt) variants, selected by the `salted` flag: when salted, the seed seedSE is enlarged to 2*len_mu bits and a salt of 2*len_mu bits is folded into the G_2 hash and the shared secret and carried in the ciphertext; when not salted, len_salt is zero and every salt operation below is a no-op.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `nbar`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCipherTextSize()`
    `static FrodoKEMEngine` | `getInstance(FrodoKEMParameters params)`
    `int` | `getPrivateKeySize()`
    `int` | `getPublicKeySize()`
    `int` | `getSessionKeySize()`
    `void` | `kem_dec(byte[] ss, byte[] ct, byte[] sk)`
    `void` | `kem_enc(byte[] ct, byte[] ss, byte[] pk, java.security.SecureRandom random)`
    `void` | `kem_keypair(byte[] pk, byte[] sk, java.security.SecureRandom random)`

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

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

- - ### Field Detail

    - #### nbar

          public static final int nbar

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          public static FrodoKEMEngine getInstance(FrodoKEMParameters params)

    - #### getCipherTextSize

          public int getCipherTextSize()

    - #### getSessionKeySize

          public int getSessionKeySize()

    - #### getPrivateKeySize

          public int getPrivateKeySize()

    - #### getPublicKeySize

          public int getPublicKeySize()

    - #### kem_keypair

          public void kem_keypair(byte[] pk,
                                  byte[] sk,
                                  java.security.SecureRandom random)

    - #### kem_enc

          public void kem_enc(byte[] ct,
                              byte[] ss,
                              byte[] pk,
                              java.security.SecureRandom random)

    - #### kem_dec

          public void kem_dec(byte[] ss,
                              byte[] ct,
                              byte[] sk)