private static void validatePublicKey(HpkeParameters.KemId kemId, Bytes publicKeyBytes)
      throws GeneralSecurityException {
    validatePublicKeyByteLength(kemId, publicKeyBytes);
    validatePublicKeyOnCurve(kemId, publicKeyBytes);
  }
Validate public key according to https://www.rfc-editor.org/rfc/rfc9180.html#section-7.1.4.

<p>Specifically, validate public key lengths and NIST KEM public key values according to
Section 5.6.2.3.4 of https://doi.org/10.6028/nist.sp.800-56ar3.
java_src/src/main/java/com/google/crypto/tink/hybrid/HpkePublicKey.java