Package org.gudy.bouncycastle.math.ec
Class ECPoint
- java.lang.Object
-
- org.gudy.bouncycastle.math.ec.ECPoint
-
- Direct Known Subclasses:
ECPoint.F2m
,ECPoint.Fp
public abstract class ECPoint extends java.lang.Object
base class for points on elliptic curves.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ECPoint.F2m
Elliptic curve points over F2mstatic class
ECPoint.Fp
Elliptic curve points over Fp
-
Field Summary
Fields Modifier and Type Field Description private static X9IntegerConverter
converter
(package private) ECCurve
curve
protected ECMultiplier
multiplier
protected PreCompInfo
preCompInfo
protected boolean
withCompression
(package private) ECFieldElement
x
(package private) ECFieldElement
y
-
Constructor Summary
Constructors Modifier Constructor Description protected
ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ECPoint
add(ECPoint b)
(package private) void
assertECMultiplier()
Sets the defaultECMultiplier
, unless already set.boolean
equals(java.lang.Object other)
ECCurve
getCurve()
abstract byte[]
getEncoded(boolean ignore)
ECFieldElement
getX()
ECFieldElement
getY()
int
hashCode()
boolean
isCompressed()
boolean
isInfinity()
ECPoint
multiply(java.math.BigInteger k)
Multiplies thisECPoint
by the given number.abstract ECPoint
negate()
(package private) void
setPreCompInfo(PreCompInfo preCompInfo)
Sets thePreCompInfo
.abstract ECPoint
subtract(ECPoint b)
abstract ECPoint
twice()
-
-
-
Field Detail
-
curve
ECCurve curve
-
x
ECFieldElement x
-
y
ECFieldElement y
-
withCompression
protected boolean withCompression
-
multiplier
protected ECMultiplier multiplier
-
preCompInfo
protected PreCompInfo preCompInfo
-
converter
private static X9IntegerConverter converter
-
-
Constructor Detail
-
ECPoint
protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y)
-
-
Method Detail
-
getCurve
public ECCurve getCurve()
-
getX
public ECFieldElement getX()
-
getY
public ECFieldElement getY()
-
isInfinity
public boolean isInfinity()
-
isCompressed
public boolean isCompressed()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
setPreCompInfo
void setPreCompInfo(PreCompInfo preCompInfo)
Sets thePreCompInfo
. Used byECMultiplier
s to save the precomputation for thisECPoint
to store the precomputation result for use by subsequent multiplication.- Parameters:
preCompInfo
- The values precomputed by theECMultiplier
.
-
getEncoded
public abstract byte[] getEncoded(boolean ignore)
-
negate
public abstract ECPoint negate()
-
twice
public abstract ECPoint twice()
-
assertECMultiplier
void assertECMultiplier()
Sets the defaultECMultiplier
, unless already set.
-
multiply
public ECPoint multiply(java.math.BigInteger k)
Multiplies thisECPoint
by the given number.- Parameters:
k
- The multiplicator.- Returns:
k * this
.
-
-