Top Description Fields Constructors Methods
org.bouncycastle.pqc.jcajce.spec

public Class McElieceCCA2KeyGenParameterSpec

extends Object
implements AlgorithmParameterSpec
Class Inheritance
All Implemented Interfaces
java.security.spec.AlgorithmParameterSpec
Imports
java.security.InvalidParameterException, java.security.spec.AlgorithmParameterSpec, org.bouncycastle.pqc.legacy.math.linearalgebra.PolynomialRingGF2

This class provides a specification for the parameters that are used by the McEliece, McElieceCCA2, and Niederreiter key pair generators.

Field Summary

Modifier and TypeField and Description
public static final int
DEFAULT_M

The default extension degree

public static final int
DEFAULT_T

The default error correcting capability.

private final String
private int
fieldPoly

the field polynomial

private final int
m

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

private final int
n

length of the code

public static final String
public static final String
public static final String
public static final String
public static final String
private final int
t

error correction capability of the code

Constructor Summary

AccessConstructor and Description
public
public
McElieceCCA2KeyGenParameterSpec(int
the length of a Goppa code
keysize
)

Constructor.

public
public
McElieceCCA2KeyGenParameterSpec(int
degree of the finite field GF(2^m)
m
,
int
error correction capability of the code
t
)

Constructor.

public
public
McElieceCCA2KeyGenParameterSpec(int
degree of the finite field GF(2^m)
m
,
int
error correction capability of the code
t
,
int
the field polynomial
poly
)

Constructor.

public
McElieceCCA2KeyGenParameterSpec(int m, int t, int poly, String digest)

Method Summary

Modifier and TypeMethod and Description
public String
getDigest()

Return CCA-2 digest.

public int

Returns:

the field polynomial
getFieldPoly
()

public int

Returns:

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

public int

Returns:

the length of the code
getN
()

public int

Returns:

the error correction capability of the code
getT
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_Mback to summary
public static final int DEFAULT_M

The default extension degree

DEFAULT_Tback to summary
public static final int DEFAULT_T

The default error correcting capability.

digestback to summary
private final String digest
fieldPolyback to summary
private int fieldPoly

the field polynomial

mback to summary
private final int m

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

nback to summary
private final int n

length of the code

SHA1back to summary
public static final String SHA1
SHA224back to summary
public static final String SHA224
SHA256back to summary
public static final String SHA256
SHA384back to summary
public static final String SHA384
SHA512back to summary
public static final String SHA512
tback to summary
private final int t

error correction capability of the code

Constructor Detail

McElieceCCA2KeyGenParameterSpecback to summary
public McElieceCCA2KeyGenParameterSpec()

Constructor. Set the default parameters: extension degree.

McElieceCCA2KeyGenParameterSpecback to summary
public McElieceCCA2KeyGenParameterSpec(int keysize)

Constructor.

Parameters
keysize:int

the length of a Goppa code

Exceptions
IllegalArgumentException:
if keysize < 1.
McElieceCCA2KeyGenParameterSpecback to summary
public McElieceCCA2KeyGenParameterSpec(int keysize, String digest)
McElieceCCA2KeyGenParameterSpecback to summary
public McElieceCCA2KeyGenParameterSpec(int m, int t)

Constructor.

Parameters
m:int

degree of the finite field GF(2^m)

t:int

error correction capability of the code

Exceptions
InvalidParameterException:
if m < 1 or m > 32 or t < 0 or t > n.
McElieceCCA2KeyGenParameterSpecback to summary
public McElieceCCA2KeyGenParameterSpec(int m, int t, String digest)
McElieceCCA2KeyGenParameterSpecback to summary
public McElieceCCA2KeyGenParameterSpec(int m, int t, int poly)

Constructor.

Parameters
m:int

degree of the finite field GF(2^m)

t:int

error correction capability of the code

poly:int

the field polynomial

Exceptions
IllegalArgumentException:
if m < 1 or m > 32 or t < 0 or t > n or poly is not an irreducible field polynomial.
McElieceCCA2KeyGenParameterSpecback to summary
public McElieceCCA2KeyGenParameterSpec(int m, int t, int poly, String digest)

Method Detail

getDigestback to summary
public String getDigest()

Return CCA-2 digest.

getFieldPolyback to summary
public int getFieldPoly()
Returns:int

the field polynomial

getMback to summary
public int getM()
Returns:int

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

getNback to summary
public int getN()
Returns:int

the length of the code

getTback to summary
public int getT()
Returns:int

the error correction capability of the code