GF2nField, GF2nPolynomialElement
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private int[] | |
| pack-priv GF2Polynomial[] | squaringMatrix
Matrix used for fast squaring |
| private int |
| Access | Constructor and Description |
|---|---|
| public | GF2nPolynomialField(int
the extention degree of this field deg, SecureRandom source of randomness for generating new polynomials. random)constructs an instance of the finite field with 2deg elements and characteristic 2. |
| public | GF2nPolynomialField(int
the degree of this field deg, SecureRandom source of randomness for generating new polynomials. random, boolean 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) file)constructs an instance of the finite field with 2deg elements and characteristic 2. |
| public | GF2nPolynomialField(int
degree of the GF2nField deg, SecureRandom source of randomness for generating new polynomials. random, GF2Polynomial the field polynomial to use 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
the GF2nField to convert to B1)Implements abstract org. |
| protected void | computeFieldPolynomial()
Implements abstract org. |
| protected void | |
| private void | |
| public int[] | Returns: the middle coefficients of the used field pentanomialReturns 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 | Returns: a random root of polynomialthe polynomial polynomial)Implements abstract org. |
| public GF2Polynomial | Returns: a copy of squaringMatrix[i]the index of the row vector to return i)Return row vector i of the squaring matrix. |
| public int | Returns: the middle coefficient of the used field trinomialReturns the degree of the middle coefficient of the used field trinomial (x^n + x^(getTc()) + 1). |
| public boolean | Returns: true if the field polynomial is a pentanomialReturns true if the field polynomial is a pentanomial. |
| public boolean | Returns: true if the field polynomial is a trinomialReturns true if the field polynomial is a trinomial. |
| private boolean | Returns: true if an irreducible pentanomial is foundTests all pentanomials of degree (n+1) until a irreducible is found and stores the result in field polynomial. |
| private boolean | Returns: trueTests random polynomials of degree (n+1) until an irreducible is found and stores the result in field polynomial. |
| private boolean | Returns: true if an irreducible trinomial is foundTests all trinomials of degree (n+1) until a irreducible is found and stores the result in field polynomial. |
| isPentanomial | back to summary |
|---|---|
| private boolean isPentanomial | |
| isTrinomial | back to summary |
|---|---|
| private boolean isTrinomial | |
| pc | back to summary |
|---|---|
| private int[] pc | |
| squaringMatrix | back to summary |
|---|---|
| pack-priv GF2Polynomial[] squaringMatrix Matrix used for fast squaring | |
| tc | back to summary |
|---|---|
| private int tc | |
| GF2nPolynomialField | back to summary |
|---|---|
| public GF2nPolynomialField(int deg, SecureRandom random) constructs an instance of the finite field with 2deg elements and characteristic 2.
| |
| GF2nPolynomialField | back to summary |
|---|---|
| public GF2nPolynomialField(int deg, SecureRandom random, boolean file) constructs an instance of the finite field with 2deg elements and characteristic 2.
| |
| GF2nPolynomialField | back to summary |
|---|---|
| public GF2nPolynomialField(int deg, SecureRandom random, GF2Polynomial polynomial) throws RuntimeException Creates a new GF2nField of degree i and uses the given polynomial as field polynomial. The polynomial is checked whether it is irreducible. This can take some time if i is huge!
| |
| computeCOBMatrix | back to summary |
|---|---|
| protected void computeCOBMatrix(GF2nField B1) Implements abstract org. Computes the change-of-basis matrix for basis conversion according to 1363. The result is stored in the lists fields and matrices.
| |
| computeFieldPolynomial | back to summary |
|---|---|
| protected void computeFieldPolynomial() Implements abstract org. Computes the field polynomial. This can take a long time for big degrees. | |
| computeFieldPolynomial2 | back to summary |
|---|---|
| protected void computeFieldPolynomial2() Computes the field polynomial. This can take a long time for big degrees. | |
| computeSquaringMatrix | back to summary |
|---|---|
| private void computeSquaringMatrix() Computes a new squaring matrix used for fast squaring.
| |
| getPc | back to summary |
|---|---|
| public int[] getPc() throws RuntimeException Returns the degree of the middle coefficients of the used field pentanomial (x^n + x^(getPc()[2]) + x^(getPc()[1]) + x^(getPc()[0]) + 1).
| |
| getRandomRoot | back to summary |
|---|---|
| protected GF2nElement getRandomRoot(GF2Polynomial polynomial) Implements abstract org. Compute a random root of the given GF2Polynomial.
| |
| getSquaringVector | back to summary |
|---|---|
| public GF2Polynomial getSquaringVector(int i) Return row vector i of the squaring matrix.
| |
| getTc | back to summary |
|---|---|
| public int getTc() throws RuntimeException Returns the degree of the middle coefficient of the used field trinomial (x^n + x^(getTc()) + 1).
| |
| isPentanomial | back to summary |
|---|---|
| public boolean isPentanomial() Returns true if the field polynomial is a pentanomial. The coefficients can be retrieved using getPc().
| |
| isTrinomial | back to summary |
|---|---|
| public boolean isTrinomial() Returns true if the field polynomial is a trinomial. The coefficient can be retrieved using getTc().
| |
| testPentanomials | back to summary |
|---|---|
| private boolean testPentanomials() Tests all pentanomials of degree (n+1) until a irreducible is found and stores the result in field polynomial. Returns false if no irreducible pentanomial exists in GF(2^n). This can take very long for huge degrees.
| |
| testRandom | back to summary |
|---|---|
| private boolean testRandom() Tests random polynomials of degree (n+1) until an irreducible is found and stores the result in field polynomial. This can take very long for huge degrees.
| |
| testTrinomials | back to summary |
|---|---|
| private boolean testTrinomials() Tests all trinomials of degree (n+1) until a irreducible is found and stores the result in field polynomial. Returns false if no irreducible trinomial exists in GF(2^n). This can take very long for huge degrees.
| |