@AccessesPartialKey
  private static EciesPrivateKey createKey(
      EciesParameters parameters, @Nullable Integer idRequirement) throws GeneralSecurityException {
    // toParameterSpec throws for curve X25519
    KeyPair keyPair = EllipticCurves.generateKeyPair(toParameterSpec(parameters.getCurveType()));
    ECPublicKey ecPubKey = (ECPublicKey) keyPair.getPublic();
    ECPrivateKey ecPrivKey = (ECPrivateKey) keyPair.getPrivate();

    EciesPublicKey publicKey =
        EciesPublicKey.createForNistCurve(parameters, ecPubKey.getW(), idRequirement);
    return EciesPrivateKey.createForNistCurve(
        publicKey,
        SecretBigInteger.fromBigInteger(ecPrivKey.getS(), InsecureSecretKeyAccess.get()));
  }
This key manager generates new {@code EciesAeadHkdfPrivateKey} keys and produces new instances of
{@code EciesAeadHkdfHybridDecrypt}.
java_src/src/main/java/com/google/crypto/tink/hybrid/EciesAeadHkdfPrivateKeyManager.java