Class AffineXY
- java.lang.Object
-
- org.bouncycastle.crypto.hash2curve.data.AffineXY
-
public final class AffineXY extends java.lang.ObjectSimple holder for affine field coordinates.
-
-
Constructor Summary
Constructors Constructor Description AffineXY(java.math.BigInteger x, java.math.BigInteger y)Constructs anAffineXYobject representing the affine coordinates of an elliptic curve point.AffineXY(ECPoint point)Constructs anAffineXYobject representing the affine coordinates of the provided elliptic curve point.AffineXY(ECPoint point, boolean normalize)Constructs anAffineXYobject representing the affine coordinates of the provided elliptic curve point.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigIntegergetX()Retrieves the x-coordinate of the affine point.java.math.BigIntegergetY()Retrieves the y-coordinate of the affine point.ECPointtoPoint(ECCurve curve)Converts the affine coordinates of this object into an elliptic curve point on the specified curve.
-
-
-
Constructor Detail
-
AffineXY
public AffineXY(java.math.BigInteger x, java.math.BigInteger y)Constructs anAffineXYobject representing the affine coordinates of an elliptic curve point.- Parameters:
x- the x-coordinate of the affine pointy- the y-coordinate of the affine point
-
AffineXY
public AffineXY(ECPoint point)
Constructs anAffineXYobject representing the affine coordinates of the provided elliptic curve point.- Parameters:
point- the elliptic curve point from which the affine coordinates will be extracted- Throws:
java.lang.IllegalArgumentException- if the provided point is at infinity
-
AffineXY
public AffineXY(ECPoint point, boolean normalize)
Constructs anAffineXYobject representing the affine coordinates of the provided elliptic curve point.- Parameters:
point- the elliptic curve point from which the affine coordinates will be extractednormalize-trueif the point should be normalized before extracting coordinates,falseotherwise- Throws:
java.lang.IllegalArgumentException- if the provided point is at infinity
-
-
Method Detail
-
toPoint
public ECPoint toPoint(ECCurve curve)
Converts the affine coordinates of this object into an elliptic curve point on the specified curve.- Parameters:
curve- the elliptic curve to which the point belongs- Returns:
- an
ECPointobject created using the affine coordinates of this object on the given curve
-
getX
public java.math.BigInteger getX()
Retrieves the x-coordinate of the affine point.- Returns:
- the x-coordinate as a
BigInteger
-
getY
public java.math.BigInteger getY()
Retrieves the y-coordinate of the affine point.- Returns:
- the y-coordinate as a
BigInteger
-
-