1OPENSSL-GENRSA(1ossl) OpenSSL OPENSSL-GENRSA(1ossl)
2
3
4
6 openssl-genrsa - generate an RSA private key
7
9 openssl genrsa [-help] [-out filename] [-passout arg] [-aes128]
10 [-aes192] [-aes256] [-aria128] [-aria192] [-aria256] [-camellia128]
11 [-camellia192] [-camellia256] [-des] [-des3] [-idea] [-F4] [-f4] [-3]
12 [-primes num] [-verbose] [-traditional] [-rand files] [-writerand file]
13 [-engine id] [-provider name] [-provider-path path] [-propquery propq]
14 [numbits]
15
17 This command has been deprecated. The openssl-genpkey(1) command
18 should be used instead.
19
20 This command generates an RSA private key.
21
23 -help
24 Print out a usage message.
25
26 -out filename
27 Output the key to the specified file. If this argument is not
28 specified then standard output is used.
29
30 -passout arg
31 The output file password source. For more information about the
32 format see openssl-passphrase-options(1).
33
34 -aes128, -aes192, -aes256, -aria128, -aria192, -aria256, -camellia128,
35 -camellia192, -camellia256, -des, -des3, -idea
36 These options encrypt the private key with specified cipher before
37 outputting it. If none of these options is specified no encryption
38 is used. If encryption is used a pass phrase is prompted for if it
39 is not supplied via the -passout argument.
40
41 -F4, -f4, -3
42 The public exponent to use, either 65537 or 3. The default is
43 65537. The -3 option has been deprecated.
44
45 -primes num
46 Specify the number of primes to use while generating the RSA key.
47 The num parameter must be a positive integer that is greater than 1
48 and less than 16. If num is greater than 2, then the generated key
49 is called a 'multi-prime' RSA key, which is defined in RFC 8017.
50
51 -verbose
52 Print extra details about the operations being performed.
53
54 -traditional
55 Write the key using the traditional PKCS#1 format instead of the
56 PKCS#8 format.
57
58 -rand files, -writerand file
59 See "Random State Options" in openssl(1) for details.
60
61 -engine id
62 See "Engine Options" in openssl(1). This option is deprecated.
63
64 -provider name
65 -provider-path path
66 -propquery propq
67 See "Provider Options" in openssl(1), provider(7), and property(7).
68
69 numbits
70 The size of the private key to generate in bits. This must be the
71 last option specified. The default is 2048 and values less than 512
72 are not allowed.
73
75 RSA private key generation essentially involves the generation of two
76 or more prime numbers. When generating a private key various symbols
77 will be output to indicate the progress of the generation. A .
78 represents each number which has passed an initial sieve test, + means
79 a number has passed a single round of the Miller-Rabin primality test,
80 * means the current prime starts a regenerating progress due to some
81 failed tests. A newline means that the number has passed all the prime
82 tests (the actual number depends on the key size).
83
84 Because key generation is a random process the time taken to generate a
85 key may vary somewhat. But in general, more primes lead to less
86 generation time of a key.
87
89 openssl(1), openssl-genpkey(1), openssl-gendsa(1)
90
92 This command was deprecated in OpenSSL 3.0.
93
95 Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
96
97 Licensed under the Apache License 2.0 (the "License"). You may not use
98 this file except in compliance with the License. You can obtain a copy
99 in the file LICENSE in the source distribution or at
100 <https://www.openssl.org/source/license.html>.
101
102
103
1043.1.1 2023-08-31 OPENSSL-GENRSA(1ossl)