Package org.bouncycastle.math.ec
Class ECFieldElement.Fp
- java.lang.Object
-
- org.bouncycastle.math.ec.ECFieldElement
-
- org.bouncycastle.math.ec.ECFieldElement.AbstractFp
-
- org.bouncycastle.math.ec.ECFieldElement.Fp
-
- All Implemented Interfaces:
ECConstants
- Enclosing class:
- ECFieldElement
public static class ECFieldElement.Fp extends ECFieldElement.AbstractFp
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bouncycastle.math.ec.ECFieldElement
ECFieldElement.AbstractF2m, ECFieldElement.AbstractFp, ECFieldElement.F2m, ECFieldElement.Fp
-
-
Constructor Summary
Constructors Constructor Description Fp(BigInteger q, BigInteger x)
Deprecated.Use ECCurve.fromBigInteger to construct field elements
-
Method Summary
-
Methods inherited from class org.bouncycastle.math.ec.ECFieldElement
bitLength, getEncoded, isOne, isZero, squarePow, testBitZero, toString
-
-
-
-
Constructor Detail
-
Fp
public Fp(BigInteger q, BigInteger x)
Deprecated.Use ECCurve.fromBigInteger to construct field elements
-
-
Method Detail
-
toBigInteger
public BigInteger toBigInteger()
- Specified by:
toBigInteger
in classECFieldElement
-
getFieldName
public String getFieldName()
return the field name for this field.- Specified by:
getFieldName
in classECFieldElement
- Returns:
- the string "Fp".
-
getFieldSize
public int getFieldSize()
- Specified by:
getFieldSize
in classECFieldElement
-
getQ
public BigInteger getQ()
-
add
public ECFieldElement add(ECFieldElement b)
- Specified by:
add
in classECFieldElement
-
addOne
public ECFieldElement addOne()
- Specified by:
addOne
in classECFieldElement
-
subtract
public ECFieldElement subtract(ECFieldElement b)
- Specified by:
subtract
in classECFieldElement
-
multiply
public ECFieldElement multiply(ECFieldElement b)
- Specified by:
multiply
in classECFieldElement
-
multiplyMinusProduct
public ECFieldElement multiplyMinusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)
- Overrides:
multiplyMinusProduct
in classECFieldElement
-
multiplyPlusProduct
public ECFieldElement multiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)
- Overrides:
multiplyPlusProduct
in classECFieldElement
-
divide
public ECFieldElement divide(ECFieldElement b)
- Specified by:
divide
in classECFieldElement
-
negate
public ECFieldElement negate()
- Specified by:
negate
in classECFieldElement
-
square
public ECFieldElement square()
- Specified by:
square
in classECFieldElement
-
squareMinusProduct
public ECFieldElement squareMinusProduct(ECFieldElement x, ECFieldElement y)
- Overrides:
squareMinusProduct
in classECFieldElement
-
squarePlusProduct
public ECFieldElement squarePlusProduct(ECFieldElement x, ECFieldElement y)
- Overrides:
squarePlusProduct
in classECFieldElement
-
invert
public ECFieldElement invert()
- Specified by:
invert
in classECFieldElement
-
sqrt
public ECFieldElement sqrt()
return a sqrt root - the routine verifies that the calculation returns the right value - if none exists it returns null.- Specified by:
sqrt
in classECFieldElement
-
modAdd
protected BigInteger modAdd(BigInteger x1, BigInteger x2)
-
modDouble
protected BigInteger modDouble(BigInteger x)
-
modHalf
protected BigInteger modHalf(BigInteger x)
-
modHalfAbs
protected BigInteger modHalfAbs(BigInteger x)
-
modInverse
protected BigInteger modInverse(BigInteger x)
-
modMult
protected BigInteger modMult(BigInteger x1, BigInteger x2)
-
modReduce
protected BigInteger modReduce(BigInteger x)
-
modSubtract
protected BigInteger modSubtract(BigInteger x1, BigInteger x2)
-
-