[#OSSL_HPKE_keygen] = OSSL_HPKE_keygen :mrdocs: Generate an HPKE recipient key pair for `suite,` optionally from IKM. == Synopsis Declared in `<openssl/hpke.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int OSSL_HPKE_keygen( OSSL_HPKE_SUITE suite, unsigned char* pub, size_t* publen, xref:EVP_PKEY.adoc[EVP_PKEY]** priv, unsigned char const* ikm, size_t ikmlen, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* libctx, char const* propq); ---- == Return Value 1 on success, or 0 on error. == Parameters [cols="1,4"] |=== | Name| Description | *suite* | Suite whose KEM determines the key type. | *pub* | Destination for the encoded public key; on input *`publen` is capacity. | *publen* | In/out public‐key length. | *priv* | Address of an EVP_PKEY* set to the new private key on success. | *ikm* | Optional input key material for deterministic generation, or NULL for random. | *ikmlen* | Length of `ikm` (0 when `ikm` is NULL); should be >= recommended IKM length. | *libctx* | Library context for algorithm fetches, or NULL for the default. | *propq* | Optional property query string, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#