Class AffineXY

java.lang.Object
org.bouncycastle.crypto.hash2curve.data.AffineXY

public final class AffineXY extends Object
Simple holder for affine field coordinates.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an AffineXY object representing the affine coordinates of an elliptic curve point.
    Constructs an AffineXY object representing the affine coordinates of the provided elliptic curve point.
    AffineXY(ECPoint point, boolean normalize)
    Constructs an AffineXY object representing the affine coordinates of the provided elliptic curve point.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the x-coordinate of the affine point.
    Retrieves the y-coordinate of the affine point.
    Converts the affine coordinates of this object into an elliptic curve point on the specified curve.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AffineXY

      public AffineXY(BigInteger x, BigInteger y)
      Constructs an AffineXY object representing the affine coordinates of an elliptic curve point.
      Parameters:
      x - the x-coordinate of the affine point
      y - the y-coordinate of the affine point
    • AffineXY

      public AffineXY(ECPoint point)
      Constructs an AffineXY object 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

      public AffineXY(ECPoint point, boolean normalize)
      Constructs an AffineXY object representing the affine coordinates of the provided elliptic curve point.
      Parameters:
      point - the elliptic curve point from which the affine coordinates will be extracted
      normalize - true if the point should be normalized before extracting coordinates, false otherwise
      Throws:
      IllegalArgumentException - if the provided point is at infinity
  • Method Details

    • 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 ECPoint object created using the affine coordinates of this object on the given curve
    • getX

      public BigInteger getX()
      Retrieves the x-coordinate of the affine point.
      Returns:
      the x-coordinate as a BigInteger
    • getY

      public BigInteger getY()
      Retrieves the y-coordinate of the affine point.
      Returns:
      the y-coordinate as a BigInteger