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.359
1 files changed, 54 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/BN_generate_prime.3 b/src/lib/libcrypto/man/BN_generate_prime.3
index 5d4f931a04..b3926afaa9 100644
--- a/src/lib/libcrypto/man/BN_generate_prime.3
+++ b/src/lib/libcrypto/man/BN_generate_prime.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: BN_generate_prime.3,v 1.6 2017/01/07 05:06:22 schwarze Exp $ 1.\" $OpenBSD: BN_generate_prime.3,v 1.7 2018/02/23 12:16:08 schwarze Exp $
2.\" OpenSSL 2afb29b4 Aug 14 16:47:13 2014 -0400 2.\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org> 4.\" This file was written by Ulf Moeller <ulf@openssl.org>
5.\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>. 5.\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>.
@@ -50,7 +50,7 @@
50.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
51.\" OF THE POSSIBILITY OF SUCH DAMAGE. 51.\" OF THE POSSIBILITY OF SUCH DAMAGE.
52.\" 52.\"
53.Dd $Mdocdate: January 7 2017 $ 53.Dd $Mdocdate: February 23 2018 $
54.Dt BN_GENERATE_PRIME 3 54.Dt BN_GENERATE_PRIME 3
55.Os 55.Os
56.Sh NAME 56.Sh NAME
@@ -58,8 +58,11 @@
58.Nm BN_is_prime_ex , 58.Nm BN_is_prime_ex ,
59.Nm BN_is_prime_fasttest_ex , 59.Nm BN_is_prime_fasttest_ex ,
60.Nm BN_GENCB_call , 60.Nm BN_GENCB_call ,
61.Nm BN_GENCB_new ,
62.Nm BN_GENCB_free ,
61.Nm BN_GENCB_set_old , 63.Nm BN_GENCB_set_old ,
62.Nm BN_GENCB_set , 64.Nm BN_GENCB_set ,
65.Nm BN_GENCB_get_arg ,
63.Nm BN_generate_prime , 66.Nm BN_generate_prime ,
64.Nm BN_is_prime , 67.Nm BN_is_prime ,
65.Nm BN_is_prime_fasttest 68.Nm BN_is_prime_fasttest
@@ -96,6 +99,12 @@
96.Fa "int a" 99.Fa "int a"
97.Fa "int b" 100.Fa "int b"
98.Fc 101.Fc
102.Ft BN_GENCB *
103.Fn BN_GENCB_new void
104.Ft void
105.Fo BN_GENCB_free
106.Fa "BN_GENCB *cb"
107.Fc
99.Ft void 108.Ft void
100.Fo BN_GENCB_set_old 109.Fo BN_GENCB_set_old
101.Fa "BN_GENCB *gencb" 110.Fa "BN_GENCB *gencb"
@@ -108,6 +117,10 @@
108.Fa "int (*callback)(int, int, BN_GENCB *)" 117.Fa "int (*callback)(int, int, BN_GENCB *)"
109.Fa "void *cb_arg" 118.Fa "void *cb_arg"
110.Fc 119.Fc
120.Ft void *
121.Fo BN_GENCB_get_arg
122.Fa "BN_GENCB *cb"
123.Fc
111.Pp 124.Pp
112Deprecated: 125Deprecated:
113.Pp 126.Pp
@@ -260,9 +273,16 @@ structures that are supported: "new" style and "old" style.
260New programs should prefer the "new" style, whilst the "old" style is 273New programs should prefer the "new" style, whilst the "old" style is
261provided for backwards compatibility purposes. 274provided for backwards compatibility purposes.
262.Pp 275.Pp
276A
277.Vt BN_GENCB
278structure should be created through a call to
279.Fn BN_GENCB_new
280and freed through a call to
281.Fn BN_GENCB_free .
282.Pp
263For "new" style callbacks a 283For "new" style callbacks a
264.Vt BN_GENCB 284.Vt BN_GENCB
265structure should be initialised with a call to the macro 285structure should be initialised with a call to
266.Fn BN_GENCB_set , 286.Fn BN_GENCB_set ,
267where 287where
268.Fa gencb 288.Fa gencb
@@ -276,7 +296,7 @@ and
276is a 296is a
277.Vt void * . 297.Vt void * .
278"Old" style callbacks are the same except they are initialised with a 298"Old" style callbacks are the same except they are initialised with a
279call to the macro 299call to
280.Fn BN_GENCB_set_old 300.Fn BN_GENCB_set_old
281and 301and
282.Fa callback 302.Fa callback
@@ -291,6 +311,15 @@ for new style callbacks or
291.Fn callback a b cb_arg 311.Fn callback a b cb_arg
292for old style. 312for old style.
293.Pp 313.Pp
314It is possible to obtain the argument associated with a
315.Vt BN_GENCB
316structure (set via a call to
317.Fn BN_GENCB_set
318or
319.Fn BN_GENCB_set_old )
320using
321.Fn BN_GENCB_get_arg .
322.Pp
294.Fn BN_generate_prime 323.Fn BN_generate_prime
295(deprecated) works in the same way as 324(deprecated) works in the same way as
296.Fn BN_generate_prime_ex 325.Fn BN_generate_prime_ex
@@ -326,6 +355,18 @@ returns the prime number on success,
326.Dv NULL 355.Dv NULL
327otherwise. 356otherwise.
328.Pp 357.Pp
358.Fn BN_GENCB_new
359returns a pointer to a
360.Vt BN_GENCB
361structure on success, or
362.Dv NULL
363otherwise.
364.Pp
365.Fn BN_GENCB_get_arg
366returns the argument previously associated with a
367.Vt BN_GENCB
368structure.
369.Pp
329Callback functions should return 1 on success or 0 on error. 370Callback functions should return 1 on success or 0 on error.
330.Pp 371.Pp
331The error codes can be obtained by 372The error codes can be obtained by
@@ -342,10 +383,18 @@ arguments to
342and to 383and to
343.Fn BN_is_prime 384.Fn BN_is_prime
344were added in SSLeay 0.9.0. 385were added in SSLeay 0.9.0.
386.Pp
345The 387The
346.Fa ret 388.Fa ret
347argument to 389argument to
348.Fn BN_generate_prime 390.Fn BN_generate_prime
349was added in SSLeay 0.9.1. 391was added in SSLeay 0.9.1.
392.Pp
350.Fn BN_is_prime_fasttest 393.Fn BN_is_prime_fasttest
351was added in OpenSSL 0.9.5. 394was added in OpenSSL 0.9.5.
395.Pp
396.Fn BN_GENCB_new ,
397.Fn BN_GENCB_free ,
398and
399.Fn BN_GENCB_get_arg
400were added in OpenSSL 1.1.0 .