Package org.bouncycastle.pqc.jcajce.spec
Class McElieceCCA2KeyGenParameterSpec
- java.lang.Object
-
- org.bouncycastle.pqc.jcajce.spec.McElieceCCA2KeyGenParameterSpec
-
- All Implemented Interfaces:
java.security.spec.AlgorithmParameterSpec
public class McElieceCCA2KeyGenParameterSpec extends java.lang.Object implements java.security.spec.AlgorithmParameterSpecThis class provides a specification for the parameters that are used by the McEliece, McElieceCCA2, and Niederreiter key pair generators.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MThe default extension degreestatic intDEFAULT_TThe default error correcting capability.static java.lang.StringSHA1static java.lang.StringSHA224static java.lang.StringSHA256static java.lang.StringSHA384static java.lang.StringSHA512
-
Constructor Summary
Constructors Constructor Description McElieceCCA2KeyGenParameterSpec()Constructor.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, java.lang.String digest)McElieceCCA2KeyGenParameterSpec(int m, int t, java.lang.String digest)McElieceCCA2KeyGenParameterSpec(int keysize, java.lang.String digest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDigest()Return CCA-2 digest.intgetFieldPoly()intgetM()intgetN()intgetT()
-
-
-
Field Detail
-
SHA1
public static final java.lang.String SHA1
- See Also:
- Constant Field Values
-
SHA224
public static final java.lang.String SHA224
- See Also:
- Constant Field Values
-
SHA256
public static final java.lang.String SHA256
- See Also:
- Constant Field Values
-
SHA384
public static final java.lang.String SHA384
- See Also:
- Constant Field Values
-
SHA512
public static final java.lang.String SHA512
- See Also:
- Constant Field Values
-
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
-
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:
java.lang.IllegalArgumentException- if keysize < 1.
-
McElieceCCA2KeyGenParameterSpec
public McElieceCCA2KeyGenParameterSpec(int keysize, java.lang.String digest)
-
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:
java.security.InvalidParameterException- if m < 1 or m > 32 or t < 0 or t > n.
-
McElieceCCA2KeyGenParameterSpec
public McElieceCCA2KeyGenParameterSpec(int m, int t, java.lang.String digest)
-
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:
java.lang.IllegalArgumentException- if m < 1 or m > 32 or t < 0 or t > n or poly is not an irreducible field polynomial.
-
McElieceCCA2KeyGenParameterSpec
public McElieceCCA2KeyGenParameterSpec(int m, int t, int poly, java.lang.String digest)
-
-
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
-
getDigest
public java.lang.String getDigest()
Return CCA-2 digest.
-
-