Perform ECDH and optionally apply a KDF to the shared secret (deprecated).
Declared in <openssl/ec.h>
[[deprecated]]
int
ECDH_compute_key(
void* out,
size_t outlen,
EC_POINT const* pub_key,
EC_KEY const* ecdh,
void*(* KDF)(void const*, size_t, void*, size_t*));
Deprecated. Use of this entity is allowed but discouraged.
Number of bytes written to out on success, or 0 on error.
| 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. |