[#EVP_KDF_derive]
= EVP&lowbar;KDF&lowbar;derive
:mrdocs:

Derive keying material into `key` using the parameters bound to `ctx&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;KDF&lowbar;derive(
    xref:EVP_KDF_CTX.adoc[EVP&lowbar;KDF&lowbar;CTX]* ctx,
    unsigned char* key,
    size&lowbar;t keylen,
    xref:OSSL_PARAM.adoc[OSSL&lowbar;PARAM] const params[]);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Initialized KDF context&period;
| *key*
| Output buffer for the derived key&period;
| *keylen*
| Number of bytes to write to `key&period;`
| *params*
| Optional additional OSSL&lowbar;PARAM array, or NULL&period;
|===


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