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
..
2019-07-02 14:22:29 +02:00
2019-12-11 19:04:01 +01:00
2019-10-11 15:30:57 +02:00
2019-10-11 15:30:57 +02:00
2019-10-11 15:30:57 +02:00
2019-10-11 15:30:57 +02:00
2019-10-31 14:26:34 +01:00
2019-08-19 00:06:41 +02:00
2019-10-14 22:54:02 +02:00
2019-08-19 07:19:56 +02:00
2019-07-01 10:09:22 +02:00
2019-10-11 15:30:57 +02:00
2019-12-11 19:04:01 +01:00
2019-11-15 17:20:33 +01:00
2019-11-15 17:20:33 +01:00
2019-12-11 19:04:01 +01:00
2020-02-26 17:21:08 +01:00
2019-07-02 14:22:29 +02:00
2019-09-04 10:38:13 +02:00
2020-01-22 18:06:49 +01:00
2020-01-19 10:14:39 +10:00
2019-12-11 19:04:01 +01:00
2019-07-02 14:22:29 +02:00
2019-10-09 17:44:04 +02:00
2019-10-31 14:26:34 +01:00
2020-01-22 18:06:49 +01:00
2020-03-09 10:46:57 +01:00
2019-12-11 19:04:01 +01:00
2019-11-06 19:38:32 +01:00
2019-08-19 00:06:41 +02:00
2019-05-31 12:23:58 +02:00