public static class ECFieldElement.F2m extends ECFieldElement
F2m in polynomial basis (PB)
representation. Both trinomial (TPB) and pentanomial (PPB) polynomial
basis representations are supported. Gaussian normal basis (GNB)
representation is not supported.ECFieldElement.F2m, ECFieldElement.Fp| Modifier and Type | Field and Description |
|---|---|
static int |
GNB
Indicates gaussian normal basis representation (GNB).
|
private int |
k1
TPB: The integer
k where xm +
xk + 1 represents the reduction polynomial
f(z). |
private int |
k2
TPB: Always set to
0PPB: The integer k2 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z). |
private int |
k3
TPB: Always set to
0PPB: The integer k3 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z). |
private int |
m
The exponent
m of F2m. |
static int |
PPB
Indicates pentanomial basis representation (PPB).
|
private int |
representation
TPB or PPB.
|
private int |
t
The number of
ints required to hold m bits. |
static int |
TPB
Indicates trinomial basis representation (TPB).
|
private IntArray |
x
The
IntArray holding the bits. |
| Modifier | Constructor and Description |
|---|---|
|
F2m(int m,
int k,
java.math.BigInteger x)
Constructor for TPB.
|
|
F2m(int m,
int k1,
int k2,
int k3,
java.math.BigInteger x)
Constructor for PPB.
|
private |
F2m(int m,
int k1,
int k2,
int k3,
IntArray x) |
| Modifier and Type | Method and Description |
|---|---|
ECFieldElement |
add(ECFieldElement b) |
static void |
checkFieldElements(ECFieldElement a,
ECFieldElement b)
Checks, if the ECFieldElements
a and b
are elements of the same field F2m
(having the same representation). |
ECFieldElement |
divide(ECFieldElement b) |
boolean |
equals(java.lang.Object anObject) |
java.lang.String |
getFieldName() |
int |
getFieldSize() |
int |
getK1() |
int |
getK2() |
int |
getK3() |
int |
getM() |
int |
getRepresentation() |
int |
hashCode() |
ECFieldElement |
invert() |
ECFieldElement |
multiply(ECFieldElement b) |
ECFieldElement |
negate() |
ECFieldElement |
sqrt() |
ECFieldElement |
square() |
ECFieldElement |
subtract(ECFieldElement b) |
java.math.BigInteger |
toBigInteger() |
toStringpublic static final int GNB
public static final int TPB
public static final int PPB
private int representation
private int m
m of F2m.private int k1
k where xm +
xk + 1 represents the reduction polynomial
f(z).k1 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).private int k2
0k2 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).private int k3
0k3 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).private IntArray x
IntArray holding the bits.private int t
ints required to hold m bits.public F2m(int m,
int k1,
int k2,
int k3,
java.math.BigInteger x)
m - The exponent m of
F2m.k1 - The integer k1 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).k2 - The integer k2 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).k3 - The integer k3 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).x - The BigInteger representing the value of the field element.public F2m(int m,
int k,
java.math.BigInteger x)
m - The exponent m of
F2m.k - The integer k where xm +
xk + 1 represents the reduction
polynomial f(z).x - The BigInteger representing the value of the field element.private F2m(int m,
int k1,
int k2,
int k3,
IntArray x)
public java.math.BigInteger toBigInteger()
toBigInteger in class ECFieldElementpublic java.lang.String getFieldName()
getFieldName in class ECFieldElementpublic int getFieldSize()
getFieldSize in class ECFieldElementpublic static void checkFieldElements(ECFieldElement a, ECFieldElement b)
a and b
are elements of the same field F2m
(having the same representation).a - field element.b - field element to be compared.java.lang.IllegalArgumentException - if a and b
are not elements of the same field
F2m (having the same
representation).public ECFieldElement add(ECFieldElement b)
add in class ECFieldElementpublic ECFieldElement subtract(ECFieldElement b)
subtract in class ECFieldElementpublic ECFieldElement multiply(ECFieldElement b)
multiply in class ECFieldElementpublic ECFieldElement divide(ECFieldElement b)
divide in class ECFieldElementpublic ECFieldElement negate()
negate in class ECFieldElementpublic ECFieldElement square()
square in class ECFieldElementpublic ECFieldElement invert()
invert in class ECFieldElementpublic ECFieldElement sqrt()
sqrt in class ECFieldElementpublic int getRepresentation()
F2m, either of
TPB (trinomial
basis representation) or
PPB (pentanomial
basis representation).public int getM()
m of the reduction polynomial
f(z).public int getK1()
k where xm +
xk + 1 represents the reduction polynomial
f(z).k1 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).public int getK2()
0k2 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).public int getK3()
0k3 where xm +
xk3 + xk2 + xk1 + 1
represents the reduction polynomial f(z).public boolean equals(java.lang.Object anObject)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 1998-2014 Gamma Technologies. All Rights Reserved.