Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ECFieldF2m

public class ECFieldF2m
extends Object implements ECField

java.lang.Object
   ↳ java.security.spec.ECFieldF2m


The parameters specifying a characteristic 2 finite field of an elliptic curve.

Summary

Public constructors

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.

Public methods

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.

Inherited methods

From class java.lang.Object
From interface java.security.spec.ECField

Public constructors

ECFieldF2m

Added in API level 1
ECFieldF2m (int m)

Creates a new ECFieldF2m with 2^m elements with a normal basis.

Parameters
m int: the exponent m for the number of elements.
Throws
IllegalArgumentException if m <= zero.

ECFieldF2m

Added in API level 1
ECFieldF2m (int m, 
                BigInteger rp)

Creates a new 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.

Parameters
m int: the exponent m for the number of elements.
rp BigInteger: the base of the reduction polynomial with the n-th bit corresponding to the n-th coefficient of the reduction polynomial.
Throws
IllegalArgumentException if m <= zero or the rp is invalid.

ECFieldF2m

Added in API level 1
ECFieldF2m (int m, 
                int[] ks)

Creates a new 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.

Parameters
m int: the exponent m for the number of elements.
ks int: the base of the reduction polynomial with coefficients given in descending order.
Throws
IllegalArgumentException if m <= zero or the reduction polynomial is not valid.

Public methods

equals

Added in API level 1
boolean equals (Object obj)

Returns whether the specified object equals to this finite field.

Parameters
obj Object: the object to compare to this finite field.
Returns
boolean true if the specified object is equal to this finite field, otherwise false.

getFieldSize

Added in API level 1
int getFieldSize ()

Returns the size of this finite field (in bits).

Returns
int the size of this finite field (in bits).

getM

Added in API level 1
int getM ()

Returns the exponent m for this finite field, with 2^m as the number of elements.

Returns
int the exponent m for this finite field

getMidTermsOfReductionPolynomial

Added in API level 1
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.

Returns
int[] a copy of the integer array containing the order of the middle term(s) of the reduction polynomial for a polynomial basis or null for a normal basis.

getReductionPolynomial

Added in API level 1
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.

Returns
BigInteger 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 or null for a normal basis.

hashCode

Added in API level 1
int hashCode ()

Returns the hashcode value for this finite field.

Returns
int the hashcode value for this finite field.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.