=pod =head1 NAME dh - Diffie-Hellman key agreement =head1 SYNOPSIS #include DH *DH_new(void); void DH_free(DH *dh); DH *DH_generate_parameters(int prime_len, int generator, void (*callback)(int, int, void *), void *cb_arg); int DH_check(const DH *dh, int *codes); int DH_generate_key(DH *dh); int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); void DH_set_default_method(const DH_METHOD *meth); const DH_METHOD *DH_get_default_method(void); int DH_set_method(DH *dh, const DH_METHOD *meth); DH *DH_new_method(ENGINE *engine); const DH_METHOD *DH_OpenSSL(void); DH *d2i_DHparams(DH **a, unsigned char **pp, long length); int i2d_DHparams(const DH *a, unsigned char **pp); int DHparams_print_fp(FILE *fp, const DH *x); int DHparams_print(BIO *bp, const DH *x); =head1 DESCRIPTION These functions implement the Diffie-Hellman key agreement protocol. The generation of shared DH parameters is described in L; L describes how to perform a key agreement. The B structure consists of several BIGNUM components. The prime B

, the generate B, the Private key B and the public key B. Optionally there may also be an additional parameter B. Note that DH keys may use non-standard B implementations, either directly or by the use of B modules. In some cases (eg. an ENGINE providing support for hardware-embedded keys), these BIGNUM values will not be used by the implementation or may be used for alternative data storage. =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L =head1 COPYRIGHT Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L. =cut