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).
|
static int |
PPB
Indicates pentanomial basis representation (PPB).
|
static int |
TPB
Indicates trinomial basis representation (TPB).
|
| Constructor and Description |
|---|
ECFieldElement.F2m(int m,
int k,
java.math.BigInteger x)
Deprecated.
Use ECCurve.fromBigInteger to construct field elements
|
ECFieldElement.F2m(int m,
int k1,
int k2,
int k3,
java.math.BigInteger x)
Deprecated.
Use ECCurve.fromBigInteger to construct field elements
|
getEncoded, toStringpublic static final int GNB
public static final int TPB
public static final int PPB
public ECFieldElement.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 ECFieldElement.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.public int bitLength()
bitLength in class ECFieldElementpublic boolean isOne()
isOne in class ECFieldElementpublic boolean isZero()
isZero in class ECFieldElementpublic boolean testBitZero()
testBitZero in class ECFieldElementpublic 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 addOne()
addOne in class ECFieldElementpublic ECFieldElement subtract(ECFieldElement b)
subtract in class ECFieldElementpublic ECFieldElement multiply(ECFieldElement b)
multiply in class ECFieldElementpublic ECFieldElement multiplyMinusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)
multiplyMinusProduct in class ECFieldElementpublic ECFieldElement multiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)
multiplyPlusProduct in class ECFieldElementpublic ECFieldElement divide(ECFieldElement b)
divide in class ECFieldElementpublic ECFieldElement negate()
negate in class ECFieldElementpublic ECFieldElement square()
square in class ECFieldElementpublic ECFieldElement squareMinusProduct(ECFieldElement x, ECFieldElement y)
squareMinusProduct in class ECFieldElementpublic ECFieldElement squarePlusProduct(ECFieldElement x, ECFieldElement y)
squarePlusProduct in class ECFieldElementpublic ECFieldElement squarePow(int pow)
squarePow 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.Object