Package org.bouncycastle.math.ec
Class ECFieldElement.F2m
java.lang.Object
org.bouncycastle.math.ec.ECFieldElement
org.bouncycastle.math.ec.ECFieldElement.AbstractF2m
org.bouncycastle.math.ec.ECFieldElement.F2m
- All Implemented Interfaces:
ECConstants
- Enclosing class:
ECFieldElement
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.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bouncycastle.math.ec.ECFieldElement
ECFieldElement.AbstractF2m, ECFieldElement.AbstractFp, ECFieldElement.F2m, ECFieldElement.Fp
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates gaussian normal basis representation (GNB).static final int
Indicates pentanomial basis representation (PPB).static final int
Indicates trinomial basis representation (TPB). -
Method Summary
Methods inherited from class org.bouncycastle.math.ec.ECFieldElement.AbstractF2m
halfTrace, hasFastTrace, trace
Methods inherited from class org.bouncycastle.math.ec.ECFieldElement
encodeTo, getEncoded, getEncodedLength, toString
-
Field Details
-
GNB
public static final int GNBIndicates gaussian normal basis representation (GNB). Number chosen according to X9.62. GNB is not implemented at present.- See Also:
-
TPB
public static final int TPBIndicates trinomial basis representation (TPB). Number chosen according to X9.62.- See Also:
-
PPB
public static final int PPBIndicates pentanomial basis representation (PPB). Number chosen according to X9.62.- See Also:
-
-
Method Details
-
bitLength
public int bitLength()- Overrides:
bitLength
in classECFieldElement
-
isOne
public boolean isOne()- Overrides:
isOne
in classECFieldElement
-
isZero
public boolean isZero()- Overrides:
isZero
in classECFieldElement
-
testBitZero
public boolean testBitZero()- Overrides:
testBitZero
in classECFieldElement
-
toBigInteger
- Specified by:
toBigInteger
in classECFieldElement
-
getFieldName
- Specified by:
getFieldName
in classECFieldElement
-
getFieldSize
public int getFieldSize()- Specified by:
getFieldSize
in classECFieldElement
-
add
- Specified by:
add
in classECFieldElement
-
addOne
- Specified by:
addOne
in classECFieldElement
-
subtract
- Specified by:
subtract
in classECFieldElement
-
multiply
- Specified by:
multiply
in classECFieldElement
-
multiplyMinusProduct
- Overrides:
multiplyMinusProduct
in classECFieldElement
-
multiplyPlusProduct
- Overrides:
multiplyPlusProduct
in classECFieldElement
-
divide
- Specified by:
divide
in classECFieldElement
-
negate
- Specified by:
negate
in classECFieldElement
-
square
- Specified by:
square
in classECFieldElement
-
squareMinusProduct
- Overrides:
squareMinusProduct
in classECFieldElement
-
squarePlusProduct
- Overrides:
squarePlusProduct
in classECFieldElement
-
squarePow
- Overrides:
squarePow
in classECFieldElement
-
invert
- Specified by:
invert
in classECFieldElement
-
sqrt
- Specified by:
sqrt
in classECFieldElement
-
getRepresentation
public int getRepresentation()- Returns:
- the representation of the field
F2m
, either of TPB (trinomial basis representation) or PPB (pentanomial basis representation).
-
getM
public int getM()- Returns:
- the degree
m
of the reduction polynomialf(z)
.
-
getK1
public int getK1()- Returns:
- TPB: The integer
k
wherexm + xk + 1
represents the reduction polynomialf(z)
.
PPB: The integerk1
wherexm + xk3 + xk2 + xk1 + 1
represents the reduction polynomialf(z)
.
-
getK2
public int getK2()- Returns:
- TPB: Always returns
0
PPB: The integerk2
wherexm + xk3 + xk2 + xk1 + 1
represents the reduction polynomialf(z)
.
-
getK3
public int getK3()- Returns:
- TPB: Always set to
0
PPB: The integerk3
wherexm + xk3 + xk2 + xk1 + 1
represents the reduction polynomialf(z)
.
-
equals
-
hashCode
public int hashCode()
-