Top Description Fields Constructors Methods
org.bouncycastle.pqc.legacy.math.linearalgebra

public Class GF2nONBField

extends GF2nField
Class Inheritance
Imports
java.security.SecureRandom, java.util.Random, .Vector

This class implements the abstract class GF2nField for ONB representation. It computes the fieldpolynomial, multiplication matrix and one of its roots mONBRoot, (see for example Certicoms Whitepapers). GF2nField is used by GF2nONBElement which implements the elements of this field.
See Also
GF2nField, GF2nONBElement

Field Summary

Modifier and TypeField and Description
private static final int
private int
mBit

holds the number of relevant bits in mONBPol[mLength-1].

private int
mLength

holds the length of the array-representation of degree mDegree.

pack-priv int[][]
mMult

holds the multiplication matrix

private int
mType

holds the type of mONB

Inherited from org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField:
fieldPolynomialfieldsmatricesmDegreerandom

Constructor Summary

AccessConstructor and Description
public
GF2nONBField(int
-the extention degree of this field
deg
,
SecureRandom
- a source of randomness for generating polynomials on the field.
random
)

constructs an instance of the finite field with 2deg elements and characteristic 2.

Method Summary

Modifier and TypeMethod and Description
protected void
computeCOBMatrix(GF2nField
the GF2nField to convert to
B1
)

Implements abstract org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField.computeCOBMatrix.

Computes the change-of-basis matrix for basis conversion according to 1363.
protected void
computeFieldPolynomial()

Implements abstract org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField.computeFieldPolynomial.

Computes the field polynomial for a ONB according to IEEE 1363 A.7.2 (p110f).
private void
private void
private int
elementOfOrder(int k, int p)

pack-priv int
pack-priv int
protected GF2nElement

Returns:

a random root of the polynomial
getRandomRoot
(GF2Polynomial
a polynomial
polynomial
)

Implements abstract org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField.getRandomRoot.

Computes a random root of the given polynomial.
pack-priv int[][]

Returns:

a-1
invMatrix
(int[][]
the matrix
a
)

Compute the inverse of a matrix a.

Inherited from org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField:
convertequalsgetDegreegetFieldPolynomialhashCodeinvertMatrix

Field Detail

MAXLONGback to summary
private static final int MAXLONG
mBitback to summary
private int mBit

holds the number of relevant bits in mONBPol[mLength-1].

mLengthback to summary
private int mLength

holds the length of the array-representation of degree mDegree.

mMultback to summary
pack-priv int[][] mMult

holds the multiplication matrix

mTypeback to summary
private int mType

holds the type of mONB

Constructor Detail

GF2nONBFieldback to summary
public GF2nONBField(int deg, SecureRandom random) throws RuntimeException

constructs an instance of the finite field with 2deg elements and characteristic 2.

Parameters
deg:int

-the extention degree of this field

random:SecureRandom

- a source of randomness for generating polynomials on the field.

Method Detail

computeCOBMatrixback to summary
protected void computeCOBMatrix(GF2nField B1)

Implements abstract org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField.computeCOBMatrix.

Computes the change-of-basis matrix for basis conversion according to 1363. The result is stored in the lists fields and matrices.

Parameters
B1:GF2nField

the GF2nField to convert to

See Also
P1363 A.7.3, p111ff
computeFieldPolynomialback to summary
protected void computeFieldPolynomial()

Implements abstract org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField.computeFieldPolynomial.

Computes the field polynomial for a ONB according to IEEE 1363 A.7.2 (p110f).

See Also
P1363 A.7.2, p110f
computeMultMatrixback to summary
private void computeMultMatrix()
computeTypeback to summary
private void computeType() throws RuntimeException
elementOfOrderback to summary
private int elementOfOrder(int k, int p)
getONBBitback to summary
pack-priv int getONBBit()
getONBLengthback to summary
pack-priv int getONBLength()
getRandomRootback to summary
protected GF2nElement getRandomRoot(GF2Polynomial polynomial)

Implements abstract org.bouncycastle.pqc.legacy.math.linearalgebra.GF2nField.getRandomRoot.

Computes a random root of the given polynomial.

Parameters
polynomial:GF2Polynomial

a polynomial

Returns:GF2nElement

a random root of the polynomial

See Also
P1363 A.5.6, p103f
invMatrixback to summary
pack-priv int[][] invMatrix(int[][] a)

Compute the inverse of a matrix a.

Parameters
a:int[][]

the matrix

Returns:int[][]

a-1