de.flexiprovider.common.math.finitefields
Class GF2nONBField

java.lang.Object
  |
  +--de.flexiprovider.common.math.finitefields.GF2nField
        |
        +--de.flexiprovider.common.math.finitefields.GF2nONBField

public class GF2nONBField
extends GF2nField

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.

Author:
Birgit Henhapl, Oliver Seiler
See Also:
GF2nField, GF2nONBElement

Field Summary
(package private)  int[][] mMult
          holds the multiplication matrix
 
Fields inherited from class de.flexiprovider.common.math.finitefields.GF2nField
fieldPolynomial, fields, matrices, mDegree
 
Constructor Summary
GF2nONBField(int deg)
          constructs an instance of the finite field with 2deg elements and characteristic 2.
 
Method Summary
protected  void computeCOBMatrix(GF2nField B1)
          Computes the change-of-basis matrix for basis conversion according to 1363.
protected  void computeFieldPolynomial()
          Computes the field polynomial for a ONB according to IEEE 1363 A.7.2 (p110f).
(package private)  int getONBBit()
           
(package private)  int getONBLength()
           
protected  GF2nElement getRandomRoot(GF2Polynomial polynomial)
          Computes a random root of the given polynomial.
(package private)  int[][] invMatrix(int[][] a)
          Compute the inverse of a matrix a.
 
Methods inherited from class de.flexiprovider.common.math.finitefields.GF2nField
convert, equals, getDegree, getFieldPolynomial, hashCode, invertMatrix
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mMult

int[][] mMult
holds the multiplication matrix
Constructor Detail

GF2nONBField

public GF2nONBField(int deg)
             throws NoSuchBasisException
constructs an instance of the finite field with 2deg elements and characteristic 2.
Parameters:
deg - - the extention degree of this field
Throws:
NoSuchBasisException - if an ONB-implementation other than type 1 or type 2 is requested.
Method Detail

getONBLength

int getONBLength()

getONBBit

int getONBBit()

getRandomRoot

protected GF2nElement getRandomRoot(GF2Polynomial polynomial)
Computes a random root of the given polynomial.
Overrides:
getRandomRoot in class GF2nField
Parameters:
polynomial - a polynomial
Returns:
a random root of the polynomial
See Also:
"P1363 A.5.6, p103f"

computeCOBMatrix

protected void computeCOBMatrix(GF2nField B1)
Computes the change-of-basis matrix for basis conversion according to 1363. The result is stored in the lists fields and matrices.
Overrides:
computeCOBMatrix in class GF2nField
Parameters:
B1 - the GF2nField to convert to
See Also:
"P1363 A.7.3, p111ff"

computeFieldPolynomial

protected void computeFieldPolynomial()
Computes the field polynomial for a ONB according to IEEE 1363 A.7.2 (p110f).
Overrides:
computeFieldPolynomial in class GF2nField
See Also:
"P1363 A.7.2, p110f"

invMatrix

int[][] invMatrix(int[][] a)
Compute the inverse of a matrix a.
Parameters:
a - the matrix
Returns:
a-1