public static EciesPublicKey createForNistCurve(
      EciesParameters parameters, ECPoint publicPoint, @Nullable Integer idRequirement)
      throws GeneralSecurityException {
    if (parameters.getCurveType().equals(EciesParameters.CurveType.X25519)) {
      throw new GeneralSecurityException(
          "createForNistCurve may only be called with parameters for NIST curve");
    }
    validateIdRequirement(parameters.getVariant(), idRequirement);
    EllipticCurvesUtil.checkPointOnCurve(
        publicPoint, getParameterSpecNistCurve(parameters.getCurveType()));

    Bytes prefix = createOutputPrefix(parameters.getVariant(), idRequirement);

    return new EciesPublicKey(parameters, publicPoint, null, prefix, idRequirement);
  }
Creates a new ECIES public key using a NIST Curve.

@param parameters ECIES parameters for the public key
@param publicPoint public point as a {@code ECPoint}.
@param idRequirement key id requirement, which must be null for {@code NO_PREFIX} variant and
    non-null for all other variants
java_src/src/main/java/com/google/crypto/tink/hybrid/EciesPublicKey.java