Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
DH_generate_parameters_ex, DH_check, DH_check_pub_key, DH_generate_parameters — generate and check Diffie-Hellman parametersSYNOPSIS
#include <openssl/dh.h>DH_generate_parameters_ex(DH *dh, int prime_len, int generator, BN_GENCB *cb);
DH_check(DH *dh, int *codes);
DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
DH *
DH_generate_parameters(int prime_len, int generator, void (*callback)(int, int, void *), void *cb_arg);
DESCRIPTION
DH_generate_parameters_ex() generates Diffie-Hellman parameters that can be shared among a group of users, and stores them in the provided DH structure.- DH_CHECK_P_NOT_PRIME
- The parameter dh->p is not prime.
- DH_CHECK_P_NOT_SAFE_PRIME
- The parameter dh->p is not a safe prime.
- DH_UNABLE_TO_CHECK_GENERATOR
- The generator dh->g cannot be checked for suitability: it is neither 2 nor 5.
- DH_NOT_SUITABLE_GENERATOR
- The generator dh->g is not suitable.
- DH_CHECK_PUBKEY_TOO_SMALL
- pub_key is less than or equal to 1.
- DH_CHECK_PUBKEY_TOO_LARGE
-
pub_key is greater than or equal to dh->p
- 1
. - DH_CHECK_PUBKEY_INVALID
- dh->q is set but pub_key to the power of dh->q is not 1 modulo dh->p.