



@deftypefun {int} {gnutls_hpke_derive_keypair} (gnutls_hpke_kem_t @var{kem}, const gnutls_datum_t * @var{ikm}, gnutls_privkey_t @var{privkey}, gnutls_pubkey_t @var{pubkey})
@var{kem}: The KEM algorithm to use for key pair generation.

@var{ikm}: A pointer to a gnutls_datum_t structure containing the input key material (IKM) to be used for key pair
generation.

@var{privkey}: An initialized private key.

@var{pubkey}: An initialized public key.

This function derives a key pair (private key and public key) for
the specified KEM algorithm from the provided input key material
( @code{ikm} ).

 @code{ikm} is used as a seed for the key generation process, allowing for
deterministic key pair generation if the same IKM is used. The
function checks that the provided parameters are valid and that the
KEM algorithm is supported.

 @code{ikm} should be a non-empty byte string that serves as the seed for
key pair generation.

@strong{Returns:} 0 on success, or a negative error code on failure

@strong{Since:} 3.8.13
@end deftypefun
