org.bouncycastle.pqc.crypto.sdith

## Class SDitHParameters

- java.lang.Object
- - org.bouncycastle.pqc.crypto.sdith.SDitHParameters

-     public class SDitHParameters
      extends java.lang.Object

  SDitH parameter set descriptor.

  SDitH (Syndrome-Decoding-in-the-Head) has 24 NIST-submitted variants formed from the cross of:

  - MPC structure: Hypercube or Threshold,
  - NIST category: 1, 3, or 5,
  - Field: GF(256) or P251.
  The current Bouncy Castle port wires up the Hypercube / Category 1 / GF(256) variant matching the shipped reference KAT vectors. Additional variants can be added by populating new `public static final` constants here and adding the corresponding precomputed tables to `SDitHPrecomputed`.

  The numeric fields follow the reference param.h convention:

  - `m`: code length,
  - `k`: code dimension,
  - `w`: Hamming weight bound on the SD solution,
  - `d`: splitting factor (number of twists),
  - `t`: number of MPC evaluation points per iteration,
  - `tau`: number of parallel MPC repetitions,
  - `dimD`: hypercube dimension (2^D leaf parties),
  - `seedSize`, `rhoSize`, `saltSize`, `commitSize`, `hashSize`: in bytes,
  - `fpointSize`: extension-field byte width (3 or 4),
  - `hashBits`: SHA3 variant used for commitments and Fiat-Shamir,
  - `xofBits`: SHAKE variant used as XOF.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FIELD_GF256`
    `static int` | `FIELD_P251`
    `static SDitHParameters` | `sdith_hypercube_cat1_gf256`
    `static SDitHParameters` | `sdith_hypercube_cat1_p251`
    `static SDitHParameters` | `sdith_hypercube_cat3_gf256`
    `static SDitHParameters` | `sdith_hypercube_cat3_p251`
    `static SDitHParameters` | `sdith_hypercube_cat5_gf256`
    `static SDitHParameters` | `sdith_hypercube_cat5_p251`
    `static SDitHParameters` | `sdith_threshold_cat1_gf256`
    `static SDitHParameters` | `sdith_threshold_cat1_p251`
    `static SDitHParameters` | `sdith_threshold_cat3_gf256`
    `static SDitHParameters` | `sdith_threshold_cat3_p251`
    `static SDitHParameters` | `sdith_threshold_cat5_gf256`
    `static SDitHParameters` | `sdith_threshold_cat5_p251`
    `static int` | `VARIANT_HYPERCUBE`
    `static int` | `VARIANT_THRESHOLD`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCategory()`
    `int` | `getCommitSize()`
    `int` | `getD()`
    `int` | `getDimD()`
    `int` | `getField()`
    `int` | `getFpointMask()`
    `int` | `getFpointSize()`
    `int` | `getHaNSlice()`
    `int` | `getHashBits()`
    `int` | `getHashSize()`
    `int` | `getK()`
    `int` | `getM()`
    `int` | `getMd()`
    `java.lang.String` | `getName()`
    `int` | `getNbParties()` Threshold variant: number of MPC parties.
    `int` | `getNbRevealed()` Threshold variant: number of revealed parties per execution.
    `int` | `getRhoSize()`
    `int` | `getSaltSize()`
    `int` | `getSeedSize()`
    `int` | `getT()`
    `int` | `getTau()`
    `int` | `getTreeMaxOpenLeaves()` Threshold variant: upper bound on Merkle authentication-path nodes per execution.
    `int` | `getVariant()`
    `int` | `getW()`
    `int` | `getWd()`
    `int` | `getXofBits()`
    `int` | `getYSize()`

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

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

- - ### Field Detail

    - #### VARIANT_HYPERCUBE

          public static final int VARIANT_HYPERCUBE

      See Also:
        Constant Field Values

    - #### VARIANT_THRESHOLD

          public static final int VARIANT_THRESHOLD

      See Also:
        Constant Field Values

    - #### FIELD_GF256

          public static final int FIELD_GF256

      See Also:
        Constant Field Values

    - #### FIELD_P251

          public static final int FIELD_P251

      See Also:
        Constant Field Values

    - #### sdith_hypercube_cat1_gf256

          public static final SDitHParameters sdith_hypercube_cat1_gf256

    - #### sdith_hypercube_cat3_gf256

          public static final SDitHParameters sdith_hypercube_cat3_gf256

    - #### sdith_hypercube_cat5_gf256

          public static final SDitHParameters sdith_hypercube_cat5_gf256

    - #### sdith_hypercube_cat1_p251

          public static final SDitHParameters sdith_hypercube_cat1_p251

    - #### sdith_hypercube_cat3_p251

          public static final SDitHParameters sdith_hypercube_cat3_p251

    - #### sdith_hypercube_cat5_p251

          public static final SDitHParameters sdith_hypercube_cat5_p251

    - #### sdith_threshold_cat1_gf256

          public static final SDitHParameters sdith_threshold_cat1_gf256

    - #### sdith_threshold_cat3_gf256

          public static final SDitHParameters sdith_threshold_cat3_gf256

    - #### sdith_threshold_cat5_gf256

          public static final SDitHParameters sdith_threshold_cat5_gf256

    - #### sdith_threshold_cat1_p251

          public static final SDitHParameters sdith_threshold_cat1_p251

    - #### sdith_threshold_cat3_p251

          public static final SDitHParameters sdith_threshold_cat3_p251

    - #### sdith_threshold_cat5_p251

          public static final SDitHParameters sdith_threshold_cat5_p251

  - ### Method Detail

    - #### getNbRevealed

          public int getNbRevealed()

      Threshold variant: number of revealed parties per execution. Zero for hypercube variants.

    - #### getTreeMaxOpenLeaves

          public int getTreeMaxOpenLeaves()

      Threshold variant: upper bound on Merkle authentication-path nodes per execution. Zero for hypercube variants.

    - #### getNbParties

          public int getNbParties()

      Threshold variant: number of MPC parties. For GF(256) this is 256 (`1 << dimD`); for GF(p251) it is 251 (= the prime field size). The Merkle tree always has `1 << dimD` max capacity but only `getNbParties()` leaves are populated for the p251 variants.

    - #### getName

          public java.lang.String getName()

    - #### getVariant

          public int getVariant()

    - #### getField

          public int getField()

    - #### getCategory

          public int getCategory()

    - #### getM

          public int getM()

    - #### getK

          public int getK()

    - #### getW

          public int getW()

    - #### getD

          public int getD()

    - #### getT

          public int getT()

    - #### getTau

          public int getTau()

    - #### getDimD

          public int getDimD()

    - #### getSeedSize

          public int getSeedSize()

    - #### getRhoSize

          public int getRhoSize()

    - #### getSaltSize

          public int getSaltSize()

    - #### getCommitSize

          public int getCommitSize()

    - #### getHashSize

          public int getHashSize()

    - #### getFpointSize

          public int getFpointSize()

    - #### getHashBits

          public int getHashBits()

    - #### getXofBits

          public int getXofBits()

    - #### getWd

          public int getWd()

    - #### getYSize

          public int getYSize()

    - #### getHaNSlice

          public int getHaNSlice()

    - #### getMd

          public int getMd()

    - #### getFpointMask

          public int getFpointMask()