• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1=pod
2{- OpenSSL::safe::output_do_not_edit_headers(); -}
3
4=head1 NAME
5
6openssl-genrsa - generate an RSA private key
7
8=head1 SYNOPSIS
9
10B<openssl> B<genrsa>
11[B<-help>]
12[B<-out> I<filename>]
13[B<-passout> I<arg>]
14[B<-aes128>]
15[B<-aes192>]
16[B<-aes256>]
17[B<-aria128>]
18[B<-aria192>]
19[B<-aria256>]
20[B<-camellia128>]
21[B<-camellia192>]
22[B<-camellia256>]
23[B<-des>]
24[B<-des3>]
25[B<-idea>]
26[B<-F4>]
27[B<-f4>]
28[B<-3>]
29[B<-primes> I<num>]
30[B<-verbose>]
31[B<-traditional>]
32{- $OpenSSL::safe::opt_r_synopsis -}
33{- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -}
34[B<numbits>]
35
36=head1 DESCRIPTION
37
38This command has been deprecated.
39The L<openssl-genpkey(1)> command should be used instead.
40
41This command generates an RSA private key.
42
43=head1 OPTIONS
44
45=over 4
46
47=item B<-help>
48
49Print out a usage message.
50
51=item B<-out> I<filename>
52
53Output the key to the specified file. If this argument is not specified then
54standard output is used.
55
56=item B<-passout> I<arg>
57
58The output file password source. For more information about the format
59see L<openssl-passphrase-options(1)>.
60
61=item B<-aes128>, B<-aes192>, B<-aes256>, B<-aria128>, B<-aria192>, B<-aria256>, B<-camellia128>, B<-camellia192>, B<-camellia256>, B<-des>, B<-des3>, B<-idea>
62
63These options encrypt the private key with specified
64cipher before outputting it. If none of these options is
65specified no encryption is used. If encryption is used a pass phrase is prompted
66for if it is not supplied via the B<-passout> argument.
67
68=item B<-F4>, B<-f4>, B<-3>
69
70The public exponent to use, either 65537 or 3. The default is 65537.
71The B<-3> option has been deprecated.
72
73=item B<-primes> I<num>
74
75Specify the number of primes to use while generating the RSA key. The I<num>
76parameter must be a positive integer that is greater than 1 and less than 16.
77If I<num> is greater than 2, then the generated key is called a 'multi-prime'
78RSA key, which is defined in RFC 8017.
79
80=item B<-verbose>
81
82Print extra details about the operations being performed.
83
84=item B<-traditional>
85
86Write the key using the traditional PKCS#1 format instead of the PKCS#8 format.
87
88{- $OpenSSL::safe::opt_r_item -}
89
90{- $OpenSSL::safe::opt_engine_item -}
91
92{- $OpenSSL::safe::opt_provider_item -}
93
94=item B<numbits>
95
96The size of the private key to generate in bits. This must be the last option
97specified. The default is 2048 and values less than 512 are not allowed.
98
99=back
100
101=head1 NOTES
102
103RSA private key generation essentially involves the generation of two or more
104prime numbers. When generating a private key various symbols will be output to
105indicate the progress of the generation. A B<.> represents each number which
106has passed an initial sieve test, B<+> means a number has passed a single
107round of the Miller-Rabin primality test, B<*> means the current prime starts
108a regenerating progress due to some failed tests. A newline means that the number
109has passed all the prime tests (the actual number depends on the key size).
110
111Because key generation is a random process the time taken to generate a key
112may vary somewhat. But in general, more primes lead to less generation time
113of a key.
114
115=head1 SEE ALSO
116
117L<openssl(1)>,
118L<openssl-genpkey(1)>,
119L<openssl-gendsa(1)>
120
121=head1 HISTORY
122
123This command was deprecated in OpenSSL 3.0.
124
125=head1 COPYRIGHT
126
127Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
128
129Licensed under the Apache License 2.0 (the "License").  You may not use
130this file except in compliance with the License.  You can obtain a copy
131in the file LICENSE in the source distribution or at
132L<https://www.openssl.org/source/license.html>.
133
134=cut
135