public static class

ECFieldElement.F2m

extends ECFieldElement
java.lang.Object
   ↳ org.bouncycastle.math.ec.ECFieldElement
     ↳ org.bouncycastle.math.ec.ECFieldElement.F2m

Class Overview

Class representing the Elements of the finite field 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.

Summary

Constants
int GNB Indicates gaussian normal basis representation (GNB).
int PPB Indicates pentanomial basis representation (PPB).
int TPB Indicates trinomial basis representation (TPB).
[Expand]
Inherited Fields
From interface org.bouncycastle.math.ec.ECConstants
Public Constructors
ECFieldElement.F2m(int m, int k1, int k2, int k3, BigInteger x)
Constructor for PPB.
ECFieldElement.F2m(int m, int k, BigInteger x)
Constructor for TPB.
Public Methods
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(Object anObject)
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)
BigInteger toBigInteger()
[Expand]
Inherited Methods
From class org.bouncycastle.math.ec.ECFieldElement
From class java.lang.Object

Constants

public static final int GNB

Indicates gaussian normal basis representation (GNB). Number chosen according to X9.62. GNB is not implemented at present.

Constant Value: 1 (0x00000001)

public static final int PPB

Indicates pentanomial basis representation (PPB). Number chosen according to X9.62.

Constant Value: 3 (0x00000003)

public static final int TPB

Indicates trinomial basis representation (TPB). Number chosen according to X9.62.

Constant Value: 2 (0x00000002)

Public Constructors

public ECFieldElement.F2m (int m, int k1, int k2, int k3, BigInteger x)

Constructor for PPB.

Parameters
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, BigInteger x)

Constructor for TPB.

Parameters
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 Methods

public 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).

Parameters
a field element.
b field element to be compared.
Throws
IllegalArgumentException if a and b are not elements of the same field F2m (having the same representation).

public ECFieldElement divide (ECFieldElement b)

public boolean equals (Object anObject)

public String getFieldName ()

public int getFieldSize ()

public int getK1 ()

Returns
  • TPB: The integer k where xm + xk + 1 represents the reduction polynomial f(z).
    PPB: The integer k1 where xm + xk3 + xk2 + xk1 + 1 represents the reduction polynomial f(z).

public int getK2 ()

Returns
  • TPB: Always returns 0
    PPB: The integer k2 where xm + xk3 + xk2 + xk1 + 1 represents the reduction polynomial f(z).

public int getK3 ()

Returns
  • TPB: Always set to 0
    PPB: The integer k3 where xm + xk3 + xk2 + xk1 + 1 represents the reduction polynomial f(z).

public int getM ()

Returns
  • the degree m of the reduction polynomial f(z).

public int getRepresentation ()

Returns
  • the representation of the field F2m, either of TPB (trinomial basis representation) or PPB (pentanomial basis representation).

public int hashCode ()

public ECFieldElement invert ()

public ECFieldElement multiply (ECFieldElement b)

public ECFieldElement negate ()

public ECFieldElement sqrt ()

public ECFieldElement square ()

public ECFieldElement subtract (ECFieldElement b)

public BigInteger toBigInteger ()