Constructor and Description |
---|
ECFieldF2m(int m)
Creates a new
ECFieldF2m with 2^m elements with a normal
basis. |
ECFieldF2m(int m,
BigInteger rp)
Creates a new
ECFieldF2m with 2^m elements with a polynomial
basis and the reduction polynomial based on rp . |
ECFieldF2m(int m,
int[] ks)
Creates a new
ECFieldF2m with 2^m elements with
a polynomial basis and the reduction polynomial based on ks . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns whether the specified object equals to this finite field.
|
int |
getFieldSize()
Returns the size of this finite field (in bits).
|
int |
getM()
Returns the exponent
m for this finite field, with 2^m as
the number of elements. |
int[] |
getMidTermsOfReductionPolynomial()
Returns a copy of the integer array containing the order of the middle
term(s) of the reduction polynomial for a polynomial basis.
|
BigInteger |
getReductionPolynomial()
Returns the base of the reduction polynomial with the n-th bit
corresponding to the n-th coefficient of the reduction polynomial for a
polynomial basis.
|
int |
hashCode()
Returns the hashcode value for this finite field.
|
public ECFieldF2m(int m)
ECFieldF2m
with 2^m
elements with a normal
basis.m
- the exponent m
for the number of elements.IllegalArgumentException
- if m <= zero
.public ECFieldF2m(int m, BigInteger rp)
ECFieldF2m
with 2^m
elements with a polynomial
basis and the reduction polynomial based on rp
.
The reduction polynomial must be either trinomial or pentanomial.
m
- the exponent m
for the number of elements.rp
- the base of the reduction polynomial with the n-th bit
corresponding to the n-th coefficient of the reduction
polynomial.IllegalArgumentException
- if m <= zero
or the rp
is invalid.public ECFieldF2m(int m, int[] ks)
ECFieldF2m
with 2^m
elements with
a polynomial basis and the reduction polynomial based on ks
.
The reduction polynomial must be either trinomial or pentanomial.
m
- the exponent m
for the number of elements.ks
- the base of the reduction polynomial with coefficients
given in descending order.IllegalArgumentException
- if m <= zero
or the reduction polynomial is not
valid.public boolean equals(Object obj)
equals
in class Object
obj
- the object to compare to this finite field.true
if the specified object is equal to this finite field,
otherwise false
.Object.hashCode()
public int getFieldSize()
getFieldSize
in interface ECField
public int getM()
m
for this finite field, with 2^m
as
the number of elements.m
for this finite fieldpublic int[] getMidTermsOfReductionPolynomial()
null
for a normal basis.public BigInteger getReductionPolynomial()
null
for a normal basis.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)