summaryrefslogtreecommitdiffstats
path: root/doc/man3/BN_generate_prime.pod
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2019-07-10 21:33:48 +0200
committerBernd Edlinger <bernd.edlinger@hotmail.de>2019-08-09 11:41:08 +0200
commit03b9393e15990f0e557e477e945cb5f334574696 (patch)
treefbdc6eec0ec50af4d07926406fc74d486b36d05e /doc/man3/BN_generate_prime.pod
parent28b4880b8b30c3c19ed34068f9cfa8a89af7e737 (diff)
Update documentation of BN_generate_prime_ex
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9309)
Diffstat (limited to 'doc/man3/BN_generate_prime.pod')
-rw-r--r--doc/man3/BN_generate_prime.pod8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/man3/BN_generate_prime.pod b/doc/man3/BN_generate_prime.pod
index 5de646d916..6a3376b1fd 100644
--- a/doc/man3/BN_generate_prime.pod
+++ b/doc/man3/BN_generate_prime.pod
@@ -58,6 +58,8 @@ BN_generate_prime_ex2() generates a pseudo-random prime number of
at least bit length B<bits> using the BN_CTX provided in B<ctx>. The value of
B<ctx> must not be NULL.
The returned number is probably prime with a negligible error.
+If B<add> is B<NULL> the returned prime number will have exact bit
+length B<bits> with the top most two bits set.
If B<ret> is not B<NULL>, it will be used to store the number.
@@ -94,7 +96,9 @@ If B<add> is not B<NULL>, the prime will fulfill the condition p % B<add>
generator.
If B<safe> is true, it will be a safe prime (i.e. a prime p so
-that (p-1)/2 is also prime).
+that (p-1)/2 is also prime). If B<safe> is true, and B<rem> == B<NULL>
+the condition will be p % B<add> == 3.
+It is recommended that B<add> is a multiple of 4.
The random generator must be seeded prior to calling BN_generate_prime_ex().
If the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to
@@ -218,7 +222,7 @@ and BN_GENCB_get_arg() functions were added in OpenSSL 1.1.0.
=head1 COPYRIGHT
-Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy