[#ECDH_KDF_X9_62]
= ECDH&lowbar;KDF&lowbar;X9&lowbar;62
:mrdocs:

Derive key material from an ECDH shared secret using the X9&period;63 KDF (deprecated)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
ECDH&lowbar;KDF&lowbar;X9&lowbar;62(
    unsigned char* out,
    size&lowbar;t outlen,
    unsigned char const* Z,
    size&lowbar;t Zlen,
    unsigned char const* sinfo,
    size&lowbar;t sinfolen,
    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.
====
== Description

Historically named for ANSI X9&period;62&semi; the KDF is actually specified in ANSI X9&period;63&period; Retained for ABI compatibility (prefer X9&period;63&hyphen;named APIs)&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| Destination buffer for the derived key material&period;
| *outlen*
| Number of bytes to write to `out&period;`
| *Z*
| Shared secret (ECDH Z) octets used as KDF key input&period;
| *Zlen*
| Length of `Z` in bytes&period;
| *sinfo*
| Optional shared&hyphen;info &sol; OtherInfo octets bound into the KDF, or NULL if `sinfolen` is 0&period;
| *sinfolen*
| Length of `sinfo` in bytes&period;
| *md*
| Message digest used by the X9&period;63 KDF (for example SHA&hyphen;256)&period;
|===


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