]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man1/openssl-genrsa.pod
Command docs: remove ellipses for '-rand'
[thirdparty/openssl.git] / doc / man1 / openssl-genrsa.pod
CommitLineData
aba3e65f
DSH
1=pod
2
3=head1 NAME
4
b6b66573 5openssl-genrsa - generate an RSA private key
aba3e65f 6
aba3e65f
DSH
7=head1 SYNOPSIS
8
9B<openssl> B<genrsa>
169394d4 10[B<-help>]
e8769719
RS
11[B<-out> I<filename>]
12[B<-passout> I<arg>]
fc1d88f0 13[B<-aes128>]
fc1d88f0
RS
14[B<-aes192>]
15[B<-aes256>]
d42d0a4d
P
16[B<-aria128>]
17[B<-aria192>]
18[B<-aria256>]
fc1d88f0
RS
19[B<-camellia128>]
20[B<-camellia192>]
21[B<-camellia256>]
aba3e65f
DSH
22[B<-des>]
23[B<-des3>]
24[B<-idea>]
25[B<-f4>]
26[B<-3>]
fed8bd90 27[B<-rand> I<files>]
e8769719
RS
28[B<-writerand> I<file>]
29[B<-engine> I<id>]
30[B<-primes> I<num>]
c43fa566 31[B<-verbose>]
aba3e65f
DSH
32[B<numbits>]
33
1738c0ce
RS
34=for comment ifdef engine
35
aba3e65f
DSH
36=head1 DESCRIPTION
37
38The B<genrsa> command generates an RSA private key.
39
40=head1 OPTIONS
41
42=over 4
43
169394d4
MR
44=item B<-help>
45
46Print out a usage message.
47
e8769719 48=item B<-out> I<filename>
f07fb9b2 49
169394d4
MR
50Output the key to the specified file. If this argument is not specified then
51standard output is used.
f07fb9b2 52
e8769719 53=item B<-passout> I<arg>
f07fb9b2 54
c4de074e 55The output file password source. For more information about the format
e8769719 56see L<openssl(1)/Pass phrase options>.
f07fb9b2 57
dfee8626 58=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>
aba3e65f 59
fc1d88f0
RS
60These options encrypt the private key with specified
61cipher before outputting it. If none of these options is
f07fb9b2 62specified no encryption is used. If encryption is used a pass phrase is prompted
a3fe382e 63for if it is not supplied via the B<-passout> argument.
aba3e65f 64
e8769719 65=item B<-F4>|B<-3>
aba3e65f 66
c4de074e 67The public exponent to use, either 65537 or 3. The default is 65537.
aba3e65f 68
fed8bd90 69=item B<-rand> I<files>
aba3e65f 70
fed8bd90 71The files containing random data used to seed the random number generator.
35ed393e 72Multiple files can be specified separated by an OS-dependent character.
b87ef946 73The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
a4cfd178 74all others.
bfa35550 75
e8769719 76=item B<-writerand> I<file>
3ee1eac2
RS
77
78Writes random data to the specified I<file> upon exit.
79This can be used with a subsequent B<-rand> flag.
80
e8769719 81=item B<-engine> I<id>
bfa35550 82
c4de074e 83Specifying an engine (by its unique B<id> string) will cause B<genrsa>
bfa35550
RL
84to attempt to obtain a functional reference to the specified engine,
85thus initialising it if needed. The engine will then be set as the default
86for all available algorithms.
aba3e65f 87
e8769719 88=item B<-primes> I<num>
665d899f
PY
89
90Specify the number of primes to use while generating the RSA key. The B<num>
91parameter must be a positive integer that is greater than 1 and less than 16.
92If B<num> is greater than 2, then the generated key is called a 'multi-prime'
93RSA key, which is defined in RFC 8017.
94
c43fa566
PP
95=item B<-verbose>
96
97Print extra details about the operations being performed.
98
aba3e65f
DSH
99=item B<numbits>
100
c4de074e 101The size of the private key to generate in bits. This must be the last option
cac19d19 102specified. The default is 2048 and values less than 512 are not allowed.
aba3e65f
DSH
103
104=back
105
106=head1 NOTES
107
665d899f
PY
108RSA private key generation essentially involves the generation of two or more
109prime numbers. When generating a private key various symbols will be output to
a3fe382e
DSH
110indicate the progress of the generation. A B<.> represents each number which
111has passed an initial sieve test, B<+> means a number has passed a single
665d899f
PY
112round of the Miller-Rabin primality test, B<*> means the current prime starts
113a regenerating progress due to some failed tests. A newline means that the number
114has passed all the prime tests (the actual number depends on the key size).
aba3e65f
DSH
115
116Because key generation is a random process the time taken to generate a key
665d899f
PY
117may vary somewhat. But in general, more primes lead to less generation time
118of a key.
aba3e65f 119
aba3e65f
DSH
120=head1 SEE ALSO
121
b6b66573
DMSP
122L<openssl(1)>,
123L<openssl-gendsa(1)>
369782ac 124
e2f92610
RS
125=head1 COPYRIGHT
126
b6b66573 127Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 128
449040b4 129Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
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