[#ECDH_compute_key] = ECDH_compute_key :mrdocs: Perform ECDH and optionally apply a KDF to the shared secret (deprecated). == Synopsis Declared in `<openssl/ec.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[deprecated]] int ECDH_compute_key( void* out, size_t outlen, xref:EC_POINT.adoc[EC_POINT] const* pub_key, xref:EC_KEY.adoc[EC_KEY] const* ecdh, void*(* KDF)(void const*, size_t, void*, size_t*)); ---- [WARNING] ==== https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged. ==== == Return Value Number of bytes written to `out` on success, or 0 on error. == Parameters [cols="1,4"] |=== | Name| Description | *out* | Buffer that receives the derived key material (or KDF output). | *outlen* | Size of `out` in bytes; also passed to `KDF` as initial output capacity. | *pub_key* | Peer's public EC point. | *ecdh* | Local private EC_KEY used for the agreement. | *KDF* | Optional key‐derivation callback; if NULL, copies min(`outlen,` secret length) raw shared secret bytes into `out.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#