[#DH_KDF_X9_42]
= DH&lowbar;KDF&lowbar;X9&lowbar;42
:mrdocs:

Derive keying material with the ANSI X9&period;42 &sol; RFC 2631 KDF (deprecated)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
DH&lowbar;KDF&lowbar;X9&lowbar;42(
    unsigned char* out,
    size&lowbar;t outlen,
    unsigned char const* Z,
    size&lowbar;t Zlen,
    xref:ASN1_OBJECT.adoc[ASN1&lowbar;OBJECT]* key&lowbar;oid,
    unsigned char const* ukm,
    size&lowbar;t ukmlen,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* md);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| Output buffer of `outlen` bytes receiving the derived key&period;
| *outlen*
| Desired derived&hyphen;key length&period;
| *Z*
| Shared secret bytes&period;
| *Zlen*
| Length of `Z&period;`
| *key&lowbar;oid*
| Algorithm OID embedded in the OtherInfo structure&period;
| *ukm*
| Optional partyInfo&sol;UKM bytes, or NULL&period;
| *ukmlen*
| Length of `ukm` when non&hyphen;NULL&period;
| *md*
| Message digest used by the KDF&period;
|===


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