public static ECPublicKey getEcPublicKey(
      ECParameterSpec spec, PointFormatType pointFormat, final byte[] publicKey)
      throws GeneralSecurityException {
    ECPoint point = pointDecode(spec.getCurve(), pointFormat, publicKey);
    ECPublicKeySpec pubSpec = new ECPublicKeySpec(point, spec);
    KeyFactory kf = EngineFactory.KEY_FACTORY.getInstance("EC");
    return (ECPublicKey) kf.generatePublic(pubSpec);
  }
Returns an {@link ECPublicKey} from {@code publicKey} that is a public key in point format
{@code pointFormat} on {@code curve}.
java_src/src/main/java/com/google/crypto/tink/subtle/EllipticCurves.java