2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
6 openssl-genrsa - generate an RSA private key
31 {- $OpenSSL::safe::opt_r_synopsis -}
32 {- $OpenSSL::safe::opt_engine_synopsis -}
35 =for openssl ifdef engine
39 This command generates an RSA private key.
47 Print out a usage message.
49 =item B<-out> I<filename>
51 Output the key to the specified file. If this argument is not specified then
52 standard output is used.
54 =item B<-passout> I<arg>
56 The output file password source. For more information about the format
57 see L<openssl(1)/Pass Phrase Options>.
59 =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>
61 These options encrypt the private key with specified
62 cipher before outputting it. If none of these options is
63 specified no encryption is used. If encryption is used a pass phrase is prompted
64 for if it is not supplied via the B<-passout> argument.
66 =item B<-F4>, B<-f4>, B<-3>
68 The public exponent to use, either 65537 or 3. The default is 65537.
70 =item B<-primes> I<num>
72 Specify the number of primes to use while generating the RSA key. The I<num>
73 parameter must be a positive integer that is greater than 1 and less than 16.
74 If I<num> is greater than 2, then the generated key is called a 'multi-prime'
75 RSA key, which is defined in RFC 8017.
79 Print extra details about the operations being performed.
81 {- $OpenSSL::safe::opt_r_item -}
83 {- $OpenSSL::safe::opt_engine_item -}
87 The size of the private key to generate in bits. This must be the last option
88 specified. The default is 2048 and values less than 512 are not allowed.
94 RSA private key generation essentially involves the generation of two or more
95 prime numbers. When generating a private key various symbols will be output to
96 indicate the progress of the generation. A B<.> represents each number which
97 has passed an initial sieve test, B<+> means a number has passed a single
98 round of the Miller-Rabin primality test, B<*> means the current prime starts
99 a regenerating progress due to some failed tests. A newline means that the number
100 has passed all the prime tests (the actual number depends on the key size).
102 Because key generation is a random process the time taken to generate a key
103 may vary somewhat. But in general, more primes lead to less generation time
113 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
115 Licensed under the Apache License 2.0 (the "License"). You may not use
116 this file except in compliance with the License. You can obtain a copy
117 in the file LICENSE in the source distribution or at
118 L<https://www.openssl.org/source/license.html>.