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 intIndicates gaussian normal basis representation (GNB).static final intIndicates pentanomial basis representation (PPB).static final intIndicates trinomial basis representation (TPB). -
Method Summary
Methods inherited from class org.bouncycastle.math.ec.ECFieldElement.AbstractF2m
halfTrace, hasFastTrace, traceMethods inherited from class org.bouncycastle.math.ec.ECFieldElement
getEncoded, 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:
bitLengthin classECFieldElement
-
isOne
public boolean isOne()- Overrides:
isOnein classECFieldElement
-
isZero
public boolean isZero()- Overrides:
isZeroin classECFieldElement
-
testBitZero
public boolean testBitZero()- Overrides:
testBitZeroin classECFieldElement
-
toBigInteger
- Specified by:
toBigIntegerin classECFieldElement
-
getFieldName
- Specified by:
getFieldNamein classECFieldElement
-
getFieldSize
public int getFieldSize()- Specified by:
getFieldSizein classECFieldElement
-
add
- Specified by:
addin classECFieldElement
-
addOne
- Specified by:
addOnein classECFieldElement
-
subtract
- Specified by:
subtractin classECFieldElement
-
multiply
- Specified by:
multiplyin classECFieldElement
-
multiplyMinusProduct
- Overrides:
multiplyMinusProductin classECFieldElement
-
multiplyPlusProduct
- Overrides:
multiplyPlusProductin classECFieldElement
-
divide
- Specified by:
dividein classECFieldElement
-
negate
- Specified by:
negatein classECFieldElement
-
square
- Specified by:
squarein classECFieldElement
-
squareMinusProduct
- Overrides:
squareMinusProductin classECFieldElement
-
squarePlusProduct
- Overrides:
squarePlusProductin classECFieldElement
-
squarePow
- Overrides:
squarePowin classECFieldElement
-
invert
- Specified by:
invertin classECFieldElement
-
sqrt
- Specified by:
sqrtin 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
mof the reduction polynomialf(z).
-
getK1
public int getK1()- Returns:
- TPB: The integer
kwherexm + xk + 1represents the reduction polynomialf(z).
PPB: The integerk1wherexm + xk3 + xk2 + xk1 + 1represents the reduction polynomialf(z).
-
getK2
public int getK2()- Returns:
- TPB: Always returns
0
PPB: The integerk2wherexm + xk3 + xk2 + xk1 + 1represents the reduction polynomialf(z).
-
getK3
public int getK3()- Returns:
- TPB: Always set to
0
PPB: The integerk3wherexm + xk3 + xk2 + xk1 + 1represents the reduction polynomialf(z).
-
equals
-
hashCode
public int hashCode()
-