Class AffineXY
java.lang.Object
org.bouncycastle.crypto.hash2curve.data.AffineXY
Simple holder for affine field coordinates.
-
Constructor Summary
ConstructorsConstructorDescriptionAffineXY(BigInteger x, BigInteger y) Constructs anAffineXYobject representing the affine coordinates of an elliptic curve point.Constructs anAffineXYobject representing the affine coordinates of the provided elliptic curve point.Constructs anAffineXYobject representing the affine coordinates of the provided elliptic curve point. -
Method Summary
-
Constructor Details
-
AffineXY
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
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:
IllegalArgumentException- if the provided point is at infinity
-
AffineXY
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:
IllegalArgumentException- if the provided point is at infinity
-
-
Method Details
-
toPoint
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
Retrieves the x-coordinate of the affine point.- Returns:
- the x-coordinate as a
BigInteger
-
getY
Retrieves the y-coordinate of the affine point.- Returns:
- the y-coordinate as a
BigInteger
-