ECPoint toECPoint(BigInteger modulus) {
      if (isInfinity()) {
        return ECPoint.POINT_INFINITY;
      }
      BigInteger zInv = z.modInverse(modulus);
      BigInteger zInv2 = zInv.multiply(zInv).mod(modulus);
      return new ECPoint(
          x.multiply(zInv2).mod(modulus),
          y.multiply(zInv2).mod(modulus).multiply(zInv).mod(modulus));
    }
Jacobian representation of elliptic curve points.

<p>The point (X, Y) is represented by a triple (x, y, z), where X = x/z^2 and Y = y/z^3.
java_src/src/main/java/com/google/crypto/tink/internal/EllipticCurvesUtil.java