public static void validatePublicKey(ECPublicKey publicKey, ECPrivateKey privateKey)
      throws GeneralSecurityException {
    validatePublicKeySpec(publicKey, privateKey);
    EllipticCurvesUtil.checkPointOnCurve(publicKey.getW(), privateKey.getParams().getCurve());
  }
Checks that the public key's params is the same as the private key's params, and the public key
is a valid point on the private key's curve.

@since 1.1.0
java_src/src/main/java/com/google/crypto/tink/subtle/EllipticCurves.java