DH_generate_key(3) | LibreSSL | DH_generate_key(3) |
NAME
DH_generate_key, DH_compute_key - perform Diffie-Hellman key exchangeSYNOPSIS
#include <openssl/dh.h>
int DH_generate_key(DH *dh);
int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);
DESCRIPTION
DH_generate_key() performs the first step of a Diffie-Hellman key exchange by generating private and public DH values. By calling DH_compute_key(), these are combined with the other party's public value to compute the shared key.RETURN VALUES
DH_generate_key() returns 1 on success, 0 otherwise.SEE ALSO
dh(3), ERR_get_error(3), rand(3), DH_size(3)HISTORY
DH_generate_key() and DH_compute_key() are available in all versions of SSLeay and OpenSSL.2015-10-26 | LibreSSL |