summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/BN_generate_prime.389
1 files changed, 4 insertions, 85 deletions
diff --git a/src/lib/libcrypto/man/BN_generate_prime.3 b/src/lib/libcrypto/man/BN_generate_prime.3
index df28d3775c..a6e21e0a0e 100644
--- a/src/lib/libcrypto/man/BN_generate_prime.3
+++ b/src/lib/libcrypto/man/BN_generate_prime.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BN_generate_prime.3,v 1.20 2022/11/24 19:06:38 schwarze Exp $ 1.\" $OpenBSD: BN_generate_prime.3,v 1.21 2023/04/30 19:24:42 tb Exp $
2.\" full merge up to: OpenSSL f987a4dd Jun 27 10:12:08 2019 +0200 2.\" full merge up to: OpenSSL f987a4dd Jun 27 10:12:08 2019 +0200
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
@@ -67,7 +67,7 @@
67.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 67.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
68.\" OF THE POSSIBILITY OF SUCH DAMAGE. 68.\" OF THE POSSIBILITY OF SUCH DAMAGE.
69.\" 69.\"
70.Dd $Mdocdate: November 24 2022 $ 70.Dd $Mdocdate: April 30 2023 $
71.Dt BN_GENERATE_PRIME 3 71.Dt BN_GENERATE_PRIME 3
72.Os 72.Os
73.Sh NAME 73.Sh NAME
@@ -80,9 +80,6 @@
80.Nm BN_GENCB_set , 80.Nm BN_GENCB_set ,
81.Nm BN_GENCB_get_arg , 81.Nm BN_GENCB_get_arg ,
82.Nm BN_GENCB_set_old , 82.Nm BN_GENCB_set_old ,
83.Nm BN_generate_prime ,
84.Nm BN_is_prime ,
85.Nm BN_is_prime_fasttest
86.\" Nm BN_prime_checks_for_size is intentionally undocumented 83.\" Nm BN_prime_checks_for_size is intentionally undocumented
87.\" because it is no longer used by LibreSSL. 84.\" because it is no longer used by LibreSSL.
88.Nd generate primes and test for primality 85.Nd generate primes and test for primality
@@ -143,33 +140,6 @@ Deprecated:
143.Fa "void (*cb_fp)(int, int, void *)" 140.Fa "void (*cb_fp)(int, int, void *)"
144.Fa "void *cb_arg" 141.Fa "void *cb_arg"
145.Fc 142.Fc
146.Ft BIGNUM *
147.Fo BN_generate_prime
148.Fa "BIGNUM *ret"
149.Fa "int num"
150.Fa "int safe"
151.Fa "BIGNUM *modulus"
152.Fa "BIGNUM *remainder"
153.Fa "void (*cb_fp)(int, int, void *)"
154.Fa "void *cb_arg"
155.Fc
156.Ft int
157.Fo BN_is_prime
158.Fa "const BIGNUM *a"
159.Fa "int checks"
160.Fa "void (*cb_fp)(int, int, void *)"
161.Fa "BN_CTX *ctx"
162.Fa "void *cb_arg"
163.Fc
164.Ft int
165.Fo BN_is_prime_fasttest
166.Fa "const BIGNUM *a"
167.Fa "int checks"
168.Fa "void (*cb_fp)(int, int, void *)"
169.Fa "BN_CTX *ctx"
170.Fa "void *cb_arg"
171.Fa "int do_trial_division"
172.Fc
173.Sh DESCRIPTION 143.Sh DESCRIPTION
174.Fn BN_is_prime_ex 144.Fn BN_is_prime_ex
175and 145and
@@ -325,36 +295,10 @@ to use the old-style callback function pointer
325.Fa cb_fp 295.Fa cb_fp
326and the additional callback argument 296and the additional callback argument
327.Fa cb_arg . 297.Fa cb_arg .
328.Pp
329.Fn BN_generate_prime
330is a deprecated wrapper around
331.Fn BN_GENCB_set_old
332and
333.Fn BN_generate_prime_ex .
334In contrast to
335.Fn BN_generate_prime_ex ,
336if
337.Dv NULL
338is passed for the
339.Fa ret
340argument, a new
341.Vt BIGNUM
342object is allocated and returned.
343.Pp
344Similarly,
345.Fn BN_is_prime
346and
347.Fn BN_is_prime_fasttest
348are deprecated wrappers around
349.Fn BN_GENCB_set_old
350and
351.Fn BN_is_prime_ex .
352.Sh RETURN VALUES 298.Sh RETURN VALUES
353.Fn BN_is_prime_ex , 299.Fn BN_is_prime_ex
354.Fn BN_is_prime_fasttest_ex ,
355.Fn BN_is_prime ,
356and 300and
357.Fn BN_is_prime_fasttest 301.Fn BN_is_prime_fasttest_ex
358return 0 if the number is composite, 1 if it is prime with a very small 302return 0 if the number is composite, 1 if it is prime with a very small
359error probability, or \-1 on error. 303error probability, or \-1 on error.
360.Pp 304.Pp
@@ -390,11 +334,6 @@ using
390or 334or
391.Fn BN_GENCB_set_old . 335.Fn BN_GENCB_set_old .
392.Pp 336.Pp
393.Fn BN_generate_prime
394returns the prime number on success or
395.Dv NULL
396on failure.
397.Pp
398In some cases, error codes can be obtained by 337In some cases, error codes can be obtained by
399.Xr ERR_get_error 3 . 338.Xr ERR_get_error 3 .
400.Sh SEE ALSO 339.Sh SEE ALSO
@@ -403,26 +342,6 @@ In some cases, error codes can be obtained by
403.Xr DSA_generate_parameters 3 , 342.Xr DSA_generate_parameters 3 ,
404.Xr RSA_generate_key 3 343.Xr RSA_generate_key 3
405.Sh HISTORY 344.Sh HISTORY
406.Fn BN_generate_prime
407and
408.Fn BN_is_prime
409first appeared in SSLeay 0.5.1 and had their
410.Fa cb_arg
411argument added in SSLeay 0.9.0.
412These two functions have been available since
413.Ox 2.4 .
414.Pp
415The
416.Fa ret
417argument to
418.Fn BN_generate_prime
419was added in SSLeay 0.9.1 and
420.Ox 2.6 .
421.Pp
422.Fn BN_is_prime_fasttest
423first appeared in OpenSSL 0.9.5 and has been available since
424.Ox 2.7 .
425.Pp
426.Fn BN_generate_prime_ex , 345.Fn BN_generate_prime_ex ,
427.Fn BN_is_prime_ex , 346.Fn BN_is_prime_ex ,
428.Fn BN_is_prime_fasttest_ex , 347.Fn BN_is_prime_fasttest_ex ,