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

public Class McElieceKeyGenParameterSpec

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 int
fieldPoly

the field polynomial

private int
m

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

private int
n

length of the code

private int
t

error correction capability of the code

Constructor Summary

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

Constructor.

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

Constructor.

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

Constructor.

Method Summary

Modifier and TypeMethod and Description
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.

fieldPolyback to summary
private int fieldPoly

the field polynomial

mback to summary
private int m

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

nback to summary
private int n

length of the code

tback to summary
private int t

error correction capability of the code

Constructor Detail

McElieceKeyGenParameterSpecback to summary
public McElieceKeyGenParameterSpec()

Constructor. Set the default parameters: extension degree.

McElieceKeyGenParameterSpecback to summary
public McElieceKeyGenParameterSpec(int keysize)

Constructor.

Parameters
keysize:int

the length of a Goppa code

Exceptions
IllegalArgumentException:
if keysize < 1.
McElieceKeyGenParameterSpecback to summary
public McElieceKeyGenParameterSpec(int m, int t) throws InvalidParameterException

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.
McElieceKeyGenParameterSpecback to summary
public McElieceKeyGenParameterSpec(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.

Method Detail

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