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