public class GF2nPolynomialField extends GF2nField
GF2nField,
GF2nPolynomialElement| Constructor and Description |
|---|
GF2nPolynomialField(int deg,
java.security.SecureRandom random)
constructs an instance of the finite field with 2deg
elements and characteristic 2.
|
GF2nPolynomialField(int deg,
java.security.SecureRandom random,
boolean file)
constructs an instance of the finite field with 2deg
elements and characteristic 2.
|
GF2nPolynomialField(int deg,
java.security.SecureRandom random,
GF2Polynomial polynomial)
Creates a new GF2nField of degree i and uses the given
polynomial as field polynomial.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeCOBMatrix(GF2nField B1)
Computes the change-of-basis matrix for basis conversion according to
1363.
|
protected void |
computeFieldPolynomial()
Computes the field polynomial.
|
protected void |
computeFieldPolynomial2()
Computes the field polynomial.
|
int[] |
getPc()
Returns the degree of the middle coefficients of the used field
pentanomial (x^n + x^(getPc()[2]) + x^(getPc()[1]) + x^(getPc()[0]) + 1).
|
protected GF2nElement |
getRandomRoot(GF2Polynomial polynomial)
Compute a random root of the given GF2Polynomial.
|
GF2Polynomial |
getSquaringVector(int i)
Return row vector i of the squaring matrix.
|
int |
getTc()
Returns the degree of the middle coefficient of the used field trinomial
(x^n + x^(getTc()) + 1).
|
boolean |
isPentanomial()
Returns true if the field polynomial is a pentanomial.
|
boolean |
isTrinomial()
Returns true if the field polynomial is a trinomial.
|
convert, equals, getDegree, getFieldPolynomial, hashCode, invertMatrixpublic GF2nPolynomialField(int deg,
java.security.SecureRandom random)
deg - the extention degree of this fieldrandom - source of randomness for generating new polynomials.public GF2nPolynomialField(int deg,
java.security.SecureRandom random,
boolean file)
deg - the degree of this fieldrandom - source of randomness for generating new polynomials.file - true if you want to read the field polynomial from the
file false if you want to use a random fielpolynomial
(this can take very long for huge degrees)public GF2nPolynomialField(int deg,
java.security.SecureRandom random,
GF2Polynomial polynomial)
throws java.lang.RuntimeException
deg - degree of the GF2nFieldrandom - source of randomness for generating new polynomials.polynomial - the field polynomial to usejava.lang.RuntimeExceptionpublic boolean isTrinomial()
public boolean isPentanomial()
public int getTc()
throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic int[] getPc()
throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic GF2Polynomial getSquaringVector(int i)
i - the index of the row vector to returnGF2nPolynomialElement.squareMatrix()protected GF2nElement getRandomRoot(GF2Polynomial polynomial)
getRandomRoot in class GF2nFieldpolynomial - the polynomialprotected void computeCOBMatrix(GF2nField B1)
computeCOBMatrix in class GF2nFieldB1 - the GF2nField to convert toprotected void computeFieldPolynomial()
computeFieldPolynomial in class GF2nFieldprotected void computeFieldPolynomial2()