|
NAMEECDH_compute_key , ECDH_size
—
Elliptic Curve Diffie-Hellman key exchange
SYNOPSIS#include <openssl/ecdh.h>
int
int
DESCRIPTIONECDH_compute_key () performs Elliptic Curve
Diffie-Hellman key agreement. It combines the private key contained in
ecdh with the other party's
public_key, takes the x component
of the affine coordinates, and optionally applies the key derivation function
KDF. It stores the resulting symmetric key in the buffer
out, which is outlen bytes long.
If KDF is NULL ,
outlen must be at least
ECDH_size (ecdh).
RETURN VALUESECDH_compute_key () returns the length of the computed
key in bytes or -1 if an error occurs.
SEE ALSODH_generate_key(3), DH_size(3), EC_GROUP_new(3), EC_KEY_new(3), EC_POINT_new(3), X25519(3)HISTORYECDH_compute_key () first appeared in OpenSSL 0.9.8 and
has been available since OpenBSD 4.5.
Visit the GSP FreeBSD Man Page Interface. |