Fix DH_get_nid() so that it does not cache values.
[openssl.git] / doc / man3 / DH_get0_pqg.pod
index 2c63e52b38d3601e9899410ca42c6c357dab4c8c..74268087a18360a4a762a31f52a909bbf9a6a326 100644 (file)
@@ -57,11 +57,9 @@ and therefore the values that have been passed in should not be freed directly
 after this function has been called. The I<q> parameter may be NULL.
 DH_set0_pqg() also checks if the parameters associated with I<p> and I<g> and
 optionally I<q> are associated with known safe prime groups. If it is a safe
-prime group then the value of I<q> will be set to q = (p - 1) / 2 if I<q> is NULL.
-For safe prime groups the optional length parameter I<length> is set to twice
-the value of the maximum_target_security_strength(BN_num_bits(I<p>)) as listed in
-SP800-56Ar3 Table(s) 25 & 26. If it is not a safe prime group then the optional
-length parameter will be set if I<q> is not NULL to BN_num_bits(I<q>).
+prime group then the value of I<q> will be set to q = (p - 1) / 2 if I<q> is
+NULL. The optional length parameter will be set to BN_num_bits(I<q>) if I<q>
+is not NULL.
 
 To get the public and private key values use the DH_get0_key() function. A
 pointer to the public key will be stored in I<*pub_key>, and a pointer to the
@@ -96,7 +94,10 @@ object, or NULL if no such ENGINE has been set. This function is deprecated.
 The DH_get_length() and DH_set_length() functions get and set the optional
 length parameter associated with this DH object. If the length is nonzero then
 it is used, otherwise it is ignored. The I<length> parameter indicates the
-length of the secret exponent (private key) in bits.
+length of the secret exponent (private key) in bits. These functions are
+deprecated. For safe prime groups the optional length parameter I<length> can be
+set to a value greater or equal to 2 * maximum_target_security_strength(BN_num_bits(I<p>))
+as listed in SP800-56Ar3 Table(s) 25 & 26.
 
 =head1 NOTES