Package org.bouncycastle.pqc.jcajce.spec
Class McElieceCCA2KeyGenParameterSpec
java.lang.Object
org.bouncycastle.pqc.jcajce.spec.McElieceCCA2KeyGenParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
This class provides a specification for the parameters that are used by the
McEliece, McElieceCCA2, and Niederreiter key pair generators.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.McElieceCCA2KeyGenParameterSpec(int keysize) Constructor.McElieceCCA2KeyGenParameterSpec(int m, int t) Constructor.McElieceCCA2KeyGenParameterSpec(int m, int t, int poly) Constructor.McElieceCCA2KeyGenParameterSpec(int m, int t, int poly, String digest) McElieceCCA2KeyGenParameterSpec(int m, int t, String digest) McElieceCCA2KeyGenParameterSpec(int keysize, String digest) -
Method Summary
-
Field Details
-
SHA1
- See Also:
-
SHA224
- See Also:
-
SHA256
- See Also:
-
SHA384
- See Also:
-
SHA512
- See Also:
-
DEFAULT_M
public static final int DEFAULT_MThe default extension degree- See Also:
-
DEFAULT_T
public static final int DEFAULT_TThe default error correcting capability.- See Also:
-
-
Constructor Details
-
McElieceCCA2KeyGenParameterSpec
public McElieceCCA2KeyGenParameterSpec()Constructor. Set the default parameters: extension degree. -
McElieceCCA2KeyGenParameterSpec
public McElieceCCA2KeyGenParameterSpec(int keysize) Constructor.- Parameters:
keysize- the length of a Goppa code- Throws:
IllegalArgumentException- if keysize < 1.
-
McElieceCCA2KeyGenParameterSpec
-
McElieceCCA2KeyGenParameterSpec
public McElieceCCA2KeyGenParameterSpec(int m, int t) Constructor.- Parameters:
m- degree of the finite field GF(2^m)t- error correction capability of the code- Throws:
InvalidParameterException- if m < 1 or m > 32 or t < 0 or t > n.
-
McElieceCCA2KeyGenParameterSpec
-
McElieceCCA2KeyGenParameterSpec
public McElieceCCA2KeyGenParameterSpec(int m, int t, int poly) Constructor.- Parameters:
m- degree of the finite field GF(2^m)t- error correction capability of the codepoly- 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.
-
McElieceCCA2KeyGenParameterSpec
-
-
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
-
getDigest
Return CCA-2 digest.
-