summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/RSA_generate_key.pod
diff options
context:
space:
mode:
authorschwarze <>2016-11-04 10:17:17 +0000
committerschwarze <>2016-11-04 10:17:17 +0000
commit195fe5e91c60bd205043b4bea113abdff1c67bcc (patch)
tree1d15fe02d83a7ffb422ebe78c34ee1117da63e59 /src/lib/libcrypto/doc/RSA_generate_key.pod
parent00872265b9546fcf2d5795aa3a120c35142d268b (diff)
downloadopenbsd-195fe5e91c60bd205043b4bea113abdff1c67bcc.tar.gz
openbsd-195fe5e91c60bd205043b4bea113abdff1c67bcc.tar.bz2
openbsd-195fe5e91c60bd205043b4bea113abdff1c67bcc.zip
convert RSA manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/doc/RSA_generate_key.pod')
-rw-r--r--src/lib/libcrypto/doc/RSA_generate_key.pod79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/lib/libcrypto/doc/RSA_generate_key.pod b/src/lib/libcrypto/doc/RSA_generate_key.pod
deleted file mode 100644
index 00026f04df..0000000000
--- a/src/lib/libcrypto/doc/RSA_generate_key.pod
+++ /dev/null
@@ -1,79 +0,0 @@
1=pod
2
3=head1 NAME
4
5RSA_generate_key_ex, RSA_generate_key - generate RSA key pair
6
7=head1 SYNOPSIS
8
9 #include <openssl/rsa.h>
10
11 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
12
13Deprecated:
14
15 RSA *RSA_generate_key(int num, unsigned long e,
16 void (*callback)(int,int,void *), void *cb_arg);
17
18=head1 DESCRIPTION
19
20RSA_generate_key_ex() generates a key pair and stores it in the B<RSA>
21structure provided in B<rsa>.
22
23The modulus size will be of length B<bits>, and the public exponent will be
24B<e>. Key sizes with B<num> E<lt> 1024 should be considered insecure.
25The exponent is an odd number, typically 3, 17 or 65537.
26
27A callback function may be used to provide feedback about the
28progress of the key generation. If B<cb> is not B<NULL>, it
29will be called as follows using the BN_GENCB_call() function
30described on the L<BN_generate_prime(3)|BN_generate_prime(3)> page:
31
32=over 4
33
34=item *
35
36While a random prime number is generated, it is called as
37described in L<BN_generate_prime(3)|BN_generate_prime(3)>.
38
39=item *
40
41When the n-th randomly generated prime is rejected as not
42suitable for the key, B<BN_GENCB_call(cb, 2, n)> is called.
43
44=item *
45
46When a random p has been found with p-1 relatively prime to B<e>,
47it is called as B<BN_GENCB_call(cb, 3, 0)>.
48
49=back
50
51The process is then repeated for prime q with B<BN_GENCB_call(cb, 3, 1)>.
52
53RSA_generate_key is deprecated (new applications should use
54RSA_generate_key_ex instead). RSA_generate_key works in the same was as
55RSA_generate_key_ex except it uses "old style" call backs. See
56L<BN_generate_prime(3)|BN_generate_prime(3)> for further details.
57
58=head1 RETURN VALUE
59
60If key generation fails, RSA_generate_key() returns B<NULL>.
61
62The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
63
64=head1 BUGS
65
66B<BN_GENCB_call(cb, 2, x)> is used with two different meanings.
67
68RSA_generate_key() goes into an infinite loop for illegal input values.
69
70=head1 SEE ALSO
71
72L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>,
73L<RSA_free(3)|RSA_free(3)>, L<BN_generate_prime(3)|BN_generate_prime(3)>
74
75=head1 HISTORY
76
77The B<cb_arg> argument was added in SSLeay 0.9.0.
78
79=cut