[#EVP_PKEY_keygen]
= EVP&lowbar;PKEY&lowbar;keygen
:mrdocs:

Generate a key pair into &ast;`ppkey` using an initialised keygen context&period;

== Synopsis

Declared in `&lt;openssl&sol;evp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;keygen(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]** ppkey);
----

== Return Value

1 on success, or a non&hyphen;positive value on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Context prepared with EVP&lowbar;PKEY&lowbar;keygen&lowbar;init() (and any controls)&period;
| *ppkey*
| Address of an EVP&lowbar;PKEY pointer that receives the new key (allocated if NULL)&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
