openssl/crypto/dh
Shane Lontis 738ee1819e Fix DH_get_nid() so that it does not cache values.
DH_set0_pqg() is now responsible for caching the nid, q and length.

DH with or without named safe prime groups now default to using the maximum private key length (BN_num_bits(q) - 1)
when generating a DH private key. The code is now shared between fips and non fips mode for DH key generation.

The OSSL_PKEY_PARAM_DH_PRIV_LEN parameter can be used during keygen to override the maximum private key length to be
in the range (2 * strength ... bits(q) - 1). Where the strength depends on the length of p.

Added q = (p - 1) / 2 safe prime BIGNUMS so that the code is data driven (To simplify adding new names).
The BIGNUMS were code generated.

Fix error in documented return value for DH_get_nid

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11562)
2020-04-20 11:07:38 +10:00
..
build.info Use build.info, not ifdef for crypto modules 2020-04-16 13:52:22 +02:00
dh_ameth.c Fix DH_get_nid() so that it does not cache values. 2020-04-20 11:07:38 +10:00
dh_asn1.c Deprecate the low level Diffie-Hellman functions. 2020-02-20 19:04:57 +10:00
dh_backend.c Add DH keygen to providers 2020-04-16 01:14:00 +10:00
dh_check.c Deprecate the low level Diffie-Hellman functions. 2020-02-20 19:04:57 +10:00
dh_depr.c Use build.info, not ifdef for crypto modules 2020-04-16 13:52:22 +02:00
dh_err.c
dh_gen.c Add DH keygen to providers 2020-04-16 01:14:00 +10:00
dh_group_params.c Fix DH_get_nid() so that it does not cache values. 2020-04-20 11:07:38 +10:00
dh_kdf.c Deprecate the low level Diffie-Hellman functions. 2020-02-20 19:04:57 +10:00
dh_key.c Fix DH_get_nid() so that it does not cache values. 2020-04-20 11:07:38 +10:00
dh_lib.c Fix DH_get_nid() so that it does not cache values. 2020-04-20 11:07:38 +10:00
dh_local.h Fix DH_get_nid() so that it does not cache values. 2020-04-20 11:07:38 +10:00
dh_meth.c Deprecate the low level Diffie-Hellman functions. 2020-02-20 19:04:57 +10:00
dh_pmeth.c Deprecate the low level Diffie-Hellman functions. 2020-02-20 19:04:57 +10:00
dh_prn.c Deprecate the low level Diffie-Hellman functions. 2020-02-20 19:04:57 +10:00
dh_rfc5114.c Deprecate the low level Diffie-Hellman functions. 2020-02-20 19:04:57 +10:00