McElieceParameters (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.pqc.crypto.mceliece

## Class McElieceParameters

- java.lang.Object
- - org.bouncycastle.pqc.crypto.mceliece.McElieceParameters

- All Implemented Interfaces:
    CipherParameters
  Direct Known Subclasses:
    McElieceCCA2Parameters

      public class McElieceParameters
      extends java.lang.Object
      implements CipherParameters

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_M` The default extension degree
    `static int` | `DEFAULT_T` The default error correcting capability.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `McElieceParameters()` Constructor.
    `McElieceParameters(int keysize)` Constructor.
    `McElieceParameters(int m, int t)` Constructor.
    `McElieceParameters(int m, int t, int poly)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getFieldPoly()`
    `int` | `getM()`
    `int` | `getN()`
    `int` | `getT()`

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

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

- - ### Field Detail

    - #### DEFAULT_M

          public static final int DEFAULT_M

      The default extension degree
      See Also:
        Constant Field Values

    - #### DEFAULT_T

          public static final int DEFAULT_T

      The default error correcting capability.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### McElieceParameters

          public McElieceParameters()

      Constructor. Set the default parameters: extension degree.

    - #### McElieceParameters

          public McElieceParameters(int keysize)
                             throws java.lang.IllegalArgumentException

      Constructor.
      Parameters:
        `keysize` - the length of a Goppa code
      Throws:
        `java.lang.IllegalArgumentException` - if `keysize < 1`.

    - #### McElieceParameters

          public McElieceParameters(int m,
                            int t)
                             throws java.lang.IllegalArgumentException

      Constructor.
      Parameters:
        `m` - degree of the finite field GF(2^m)
        `t` - error correction capability of the code
      Throws:
        `java.lang.IllegalArgumentException` - if `m < 1` or `m > 32` or `t < 0` or `t > n`.

    - #### McElieceParameters

          public McElieceParameters(int m,
                            int t,
                            int poly)
                             throws java.lang.IllegalArgumentException

      Constructor.
      Parameters:
        `m` - degree of the finite field GF(2^m)
        `t` - error correction capability of the code
        `poly` - the field polynomial
      Throws:
        `java.lang.IllegalArgumentException` - if `m < 1` or `m > 32` or `t < 0` or `t > n` or `poly` is not an irreducible field polynomial.

  - ### Method Detail

    - #### getM

          public int getM()

      Returns:
        the extension degree of the finite field GF(2^m)

    - #### getN

          public int getN()

      Returns:
        the length of the code

    - #### getT

          public int getT()

      Returns:
        the error correction capability of the code

    - #### getFieldPoly

          public int getFieldPoly()

      Returns:
        the field polynomial