Class McElieceParameters

java.lang.Object
org.bouncycastle.pqc.legacy.crypto.mceliece.McElieceParameters
All Implemented Interfaces:
CipherParameters
Direct Known Subclasses:
McElieceCCA2Parameters

public class McElieceParameters extends Object implements CipherParameters
  • Field Details

    • DEFAULT_M

      public static final int DEFAULT_M
      The default extension degree
      See Also:
    • DEFAULT_T

      public static final int DEFAULT_T
      The default error correcting capability.
      See Also:
  • Constructor Details

    • McElieceParameters

      public McElieceParameters()
      Constructor. Set the default parameters: extension degree.
    • McElieceParameters

      public McElieceParameters(Digest digest)
    • McElieceParameters

      public McElieceParameters(int keysize)
      Constructor.
      Parameters:
      keysize - the length of a Goppa code
      Throws:
      IllegalArgumentException - if keysize < 1.
    • McElieceParameters

      public McElieceParameters(int keysize, Digest digest)
      Constructor.
      Parameters:
      keysize - the length of a Goppa code
      digest - CCA2 mode digest
      Throws:
      IllegalArgumentException - if keysize < 1.
    • McElieceParameters

      public McElieceParameters(int m, int t)
      Constructor.
      Parameters:
      m - degree of the finite field GF(2^m)
      t - error correction capability of the code
      Throws:
      IllegalArgumentException - if m < 1 or m > 32 or t < 0 or t > n.
    • McElieceParameters

      public McElieceParameters(int m, int t, Digest digest)
      Constructor.
      Parameters:
      m - degree of the finite field GF(2^m)
      t - error correction capability of the code
      Throws:
      IllegalArgumentException - if m < 1 or m > 32 or t < 0 or t > n.
    • McElieceParameters

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

      public McElieceParameters(int m, int t, int poly, Digest digest)
      Constructor.
      Parameters:
      m - degree of the finite field GF(2^m)
      t - error correction capability of the code
      poly - the field polynomial
      digest - CCA2 mode digest
      Throws:
      IllegalArgumentException - if m < 1 or m > 32 or t < 0 or t > n or poly is not an irreducible field polynomial.
  • Method Details

    • 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