Debian Codegraph @

upstream/debian-unstable/man1/openssl-genrsa.1ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "OPENSSL-GENRSA 1SSL"
58 .TH OPENSSL-GENRSA 1SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 openssl\-genrsa \- generate an RSA private key
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 \&\fBopenssl\fR \fBgenrsa\fR
68 [\fB\-help\fR]
69 [\fB\-out\fR \fIfilename\fR]
70 [\fB\-passout\fR \fIarg\fR]
71 [\fB\-aes128\fR]
72 [\fB\-aes192\fR]
73 [\fB\-aes256\fR]
74 [\fB\-aria128\fR]
75 [\fB\-aria192\fR]
76 [\fB\-aria256\fR]
77 [\fB\-camellia128\fR]
78 [\fB\-camellia192\fR]
79 [\fB\-camellia256\fR]
80 [\fB\-des\fR]
81 [\fB\-des3\fR]
82 [\fB\-idea\fR]
83 [\fB\-F4\fR]
84 [\fB\-f4\fR]
85 [\fB\-3\fR]
86 [\fB\-primes\fR \fInum\fR]
87 [\fB\-verbose\fR]
88 [\fB\-quiet\fR]
89 [\fB\-traditional\fR]
90 [\fB\-rand\fR \fIfiles\fR]
91 [\fB\-writerand\fR \fIfile\fR]
92 [\fB\-engine\fR \fIid\fR]
93 [\fB\-provider\fR \fIname\fR]
94 [\fB\-provider\-path\fR \fIpath\fR]
95 [\fB\-provparam\fR \fI[name:]key=value\fR]
96 [\fB\-propquery\fR \fIpropq\fR]
97 [\fBnumbits\fR]
98 .SH DESCRIPTION
99 .IX Header "DESCRIPTION"
100 This command generates an RSA private key.
101 .SH OPTIONS
102 .IX Header "OPTIONS"
103 .IP \fB\-help\fR 4
104 .IX Item "-help"
105 Print out a usage message.
106 .IP "\fB\-out\fR \fIfilename\fR" 4
107 .IX Item "-out filename"
108 Output the key to the specified file. If this argument is not specified then
109 standard output is used.
110 .IP "\fB\-passout\fR \fIarg\fR" 4
111 .IX Item "-passout arg"
112 The output file password source. For more information about the format
113 see \fBopenssl\-passphrase\-options\fR\|(1).
114 .IP "\fB\-aes128\fR, \fB\-aes192\fR, \fB\-aes256\fR, \fB\-aria128\fR, \fB\-aria192\fR, \fB\-aria256\fR, \fB\-camellia128\fR, \fB\-camellia192\fR, \fB\-camellia256\fR, \fB\-des\fR, \fB\-des3\fR, \fB\-idea\fR" 4
115 .IX Item "-aes128, -aes192, -aes256, -aria128, -aria192, -aria256, -camellia128, -camellia192, -camellia256, -des, -des3, -idea"
116 These options encrypt the private key with specified
117 cipher before outputting it. If none of these options is
118 specified no encryption is used. If encryption is used a pass phrase is prompted
119 for if it is not supplied via the \fB\-passout\fR argument.
120 .IP "\fB\-F4\fR, \fB\-f4\fR, \fB\-3\fR" 4
121 .IX Item "-F4, -f4, -3"
122 The public exponent to use, either 65537 or 3. The default is 65537.
123 The \fB\-3\fR option has been deprecated.
124 .IP "\fB\-primes\fR \fInum\fR" 4
125 .IX Item "-primes num"
126 Specify the number of primes to use while generating the RSA key. The \fInum\fR
127 parameter must be a positive integer that is greater than 1 and less than 16.
128 If \fInum\fR is greater than 2, then the generated key is called a 'multi\-prime'
129 RSA key, which is defined in RFC 8017.
130 .IP \fB\-verbose\fR 4
131 .IX Item "-verbose"
132 Print extra details about the operations being performed.
133 .IP \fB\-quiet\fR 4
134 .IX Item "-quiet"
135 Print fewer details about the operations being performed, which may
136 be handy during batch scripts and pipelines.
137 .IP \fB\-traditional\fR 4
138 .IX Item "-traditional"
139 Write the key using the traditional PKCS#1 format instead of the PKCS#8 format.
140 .IP "\fB\-rand\fR \fIfiles\fR, \fB\-writerand\fR \fIfile\fR" 4
141 .IX Item "-rand files, -writerand file"
142 See "Random State Options" in \fBopenssl\fR\|(1) for details.
143 .IP "\fB\-engine\fR \fIid\fR" 4
144 .IX Item "-engine id"
145 See "Engine Options" in \fBopenssl\fR\|(1).
146 This option is deprecated.
147 .IP "\fB\-provider\fR \fIname\fR" 4
148 .IX Item "-provider name"
149 .PD 0
150 .IP "\fB\-provider\-path\fR \fIpath\fR" 4
151 .IX Item "-provider-path path"
152 .IP "\fB\-provparam\fR \fI[name:]key=value\fR" 4
153 .IX Item "-provparam [name:]key=value"
154 .IP "\fB\-propquery\fR \fIpropq\fR" 4
155 .IX Item "-propquery propq"
156 .PD
157 See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
158 .IP \fBnumbits\fR 4
159 .IX Item "numbits"
160 The size of the private key to generate in bits. This must be the last option
161 specified. The default is 2048 and values less than 512 are not allowed.
162 .SH NOTES
163 .IX Header "NOTES"
164 RSA private key generation essentially involves the generation of two or more
165 prime numbers. When generating a private key various symbols will be output to
166 indicate the progress of the generation. A \fB.\fR represents each number which
167 has passed an initial sieve test, \fB+\fR means a number has passed a single
168 round of the Miller-Rabin primality test, \fB*\fR means the current prime starts
169 a regenerating progress due to some failed tests. A newline means that the number
170 has passed all the prime tests (the actual number depends on the key size).
171 .PP
172 Because key generation is a random process the time taken to generate a key
173 may vary somewhat. But in general, more primes lead to less generation time
174 of a key.
175 .SH "SEE ALSO"
176 .IX Header "SEE ALSO"
177 \&\fBopenssl\fR\|(1),
178 \&\fBopenssl\-genpkey\fR\|(1),
179 \&\fBopenssl\-gendsa\fR\|(1)
180 .SH COPYRIGHT
181 .IX Header "COPYRIGHT"
182 Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
183 .PP
184 Licensed under the Apache License 2.0 (the "License"). You may not use
185 this file except in compliance with the License. You can obtain a copy
186 in the file LICENSE in the source distribution or at
187 <https://www.openssl.org/source/license.html>.