1999-11-10 10:52:17 +08:00
|
|
|
=pod
|
2019-10-31 11:35:08 +08:00
|
|
|
{- OpenSSL::safe::output_do_not_edit_headers(); -}
|
2019-10-13 05:45:56 +08:00
|
|
|
|
1999-11-10 10:52:17 +08:00
|
|
|
=head1 NAME
|
|
|
|
|
2019-08-22 07:04:41 +08:00
|
|
|
openssl-genrsa - generate an RSA private key
|
1999-11-10 10:52:17 +08:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
B<openssl> B<genrsa>
|
2016-02-06 00:58:45 +08:00
|
|
|
[B<-help>]
|
2019-09-26 03:20:11 +08:00
|
|
|
[B<-out> I<filename>]
|
|
|
|
[B<-passout> I<arg>]
|
2014-07-03 10:42:40 +08:00
|
|
|
[B<-aes128>]
|
|
|
|
[B<-aes192>]
|
|
|
|
[B<-aes256>]
|
2017-02-01 08:10:13 +08:00
|
|
|
[B<-aria128>]
|
|
|
|
[B<-aria192>]
|
|
|
|
[B<-aria256>]
|
2014-07-03 10:42:40 +08:00
|
|
|
[B<-camellia128>]
|
|
|
|
[B<-camellia192>]
|
|
|
|
[B<-camellia256>]
|
1999-11-10 10:52:17 +08:00
|
|
|
[B<-des>]
|
|
|
|
[B<-des3>]
|
|
|
|
[B<-idea>]
|
Document most missing options
Add cmd-nits make target.
Listing options should stop when it hits the "parameters" separator.
Add missing .pod.in files to doc/man1/build.info
Tweak find-doc-nits to try openssl-XXX before XXX for POD files and
change an error messavge to be more useful.
Fix the following pages: ca, cms, crl, dgst, enc,
engine, errstr, gendsa, genrsa, list, ocsp, passwd, pkcs7, pkcs12, rand,
rehash, req, rsautil, s_server, speed, s_time,
sess_id, smime, srp, ts, x509.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10873)
2020-01-17 02:40:52 +08:00
|
|
|
[B<-F4>]
|
|
|
|
[B<-f4>]
|
|
|
|
[B<-3>]
|
2019-09-26 03:20:11 +08:00
|
|
|
[B<-primes> I<num>]
|
2018-08-09 01:51:23 +08:00
|
|
|
[B<-verbose>]
|
2021-12-22 11:44:07 +08:00
|
|
|
[B<-quiet>]
|
2019-04-13 21:52:47 +08:00
|
|
|
[B<-traditional>]
|
2019-10-13 05:45:56 +08:00
|
|
|
{- $OpenSSL::safe::opt_r_synopsis -}
|
2020-09-21 17:56:01 +08:00
|
|
|
{- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -}
|
1999-11-10 10:52:17 +08:00
|
|
|
[B<numbits>]
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2020-02-12 13:49:16 +08:00
|
|
|
This command has been deprecated.
|
|
|
|
The L<openssl-genpkey(1)> command should be used instead.
|
|
|
|
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-02 01:43:36 +08:00
|
|
|
This command generates an RSA private key.
|
1999-11-10 10:52:17 +08:00
|
|
|
|
|
|
|
=head1 OPTIONS
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
2016-02-06 00:58:45 +08:00
|
|
|
=item B<-help>
|
|
|
|
|
|
|
|
Print out a usage message.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-out> I<filename>
|
2000-02-08 09:34:59 +08:00
|
|
|
|
2016-02-06 00:58:45 +08:00
|
|
|
Output the key to the specified file. If this argument is not specified then
|
|
|
|
standard output is used.
|
2000-02-08 09:34:59 +08:00
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-passout> I<arg>
|
2000-02-08 09:34:59 +08:00
|
|
|
|
2017-03-30 05:38:30 +08:00
|
|
|
The output file password source. For more information about the format
|
2020-12-10 04:56:51 +08:00
|
|
|
see L<openssl-passphrase-options(1)>.
|
2000-02-08 09:34:59 +08:00
|
|
|
|
2018-07-04 00:45:14 +08:00
|
|
|
=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>
|
1999-11-10 10:52:17 +08:00
|
|
|
|
2014-07-03 10:42:40 +08:00
|
|
|
These options encrypt the private key with specified
|
|
|
|
cipher before outputting it. If none of these options is
|
2000-02-08 09:34:59 +08:00
|
|
|
specified no encryption is used. If encryption is used a pass phrase is prompted
|
2000-02-17 07:16:01 +08:00
|
|
|
for if it is not supplied via the B<-passout> argument.
|
1999-11-10 10:52:17 +08:00
|
|
|
|
Document most missing options
Add cmd-nits make target.
Listing options should stop when it hits the "parameters" separator.
Add missing .pod.in files to doc/man1/build.info
Tweak find-doc-nits to try openssl-XXX before XXX for POD files and
change an error messavge to be more useful.
Fix the following pages: ca, cms, crl, dgst, enc,
engine, errstr, gendsa, genrsa, list, ocsp, passwd, pkcs7, pkcs12, rand,
rehash, req, rsautil, s_server, speed, s_time,
sess_id, smime, srp, ts, x509.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10873)
2020-01-17 02:40:52 +08:00
|
|
|
=item B<-F4>, B<-f4>, B<-3>
|
1999-11-10 10:52:17 +08:00
|
|
|
|
2017-03-30 05:38:30 +08:00
|
|
|
The public exponent to use, either 65537 or 3. The default is 65537.
|
2020-06-10 06:59:56 +08:00
|
|
|
The B<-3> option has been deprecated.
|
1999-11-10 10:52:17 +08:00
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-primes> I<num>
|
2017-08-02 02:19:43 +08:00
|
|
|
|
2019-10-02 00:16:29 +08:00
|
|
|
Specify the number of primes to use while generating the RSA key. The I<num>
|
2017-08-02 02:19:43 +08:00
|
|
|
parameter must be a positive integer that is greater than 1 and less than 16.
|
2019-10-02 00:16:29 +08:00
|
|
|
If I<num> is greater than 2, then the generated key is called a 'multi-prime'
|
2017-08-02 02:19:43 +08:00
|
|
|
RSA key, which is defined in RFC 8017.
|
|
|
|
|
2018-08-09 01:51:23 +08:00
|
|
|
=item B<-verbose>
|
|
|
|
|
|
|
|
Print extra details about the operations being performed.
|
|
|
|
|
2021-12-22 11:44:07 +08:00
|
|
|
=item B<-quiet>
|
|
|
|
|
|
|
|
Print fewer details about the operations being performed, which may
|
|
|
|
be handy during batch scripts and pipelines.
|
|
|
|
|
2019-04-13 21:52:47 +08:00
|
|
|
=item B<-traditional>
|
|
|
|
|
|
|
|
Write the key using the traditional PKCS#1 format instead of the PKCS#8 format.
|
|
|
|
|
2019-10-13 05:45:56 +08:00
|
|
|
{- $OpenSSL::safe::opt_r_item -}
|
|
|
|
|
2019-10-13 05:45:56 +08:00
|
|
|
{- $OpenSSL::safe::opt_engine_item -}
|
|
|
|
|
2020-02-25 12:29:30 +08:00
|
|
|
{- $OpenSSL::safe::opt_provider_item -}
|
|
|
|
|
1999-11-10 10:52:17 +08:00
|
|
|
=item B<numbits>
|
|
|
|
|
2017-03-30 05:38:30 +08:00
|
|
|
The size of the private key to generate in bits. This must be the last option
|
2017-10-18 19:30:23 +08:00
|
|
|
specified. The default is 2048 and values less than 512 are not allowed.
|
1999-11-10 10:52:17 +08:00
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 NOTES
|
|
|
|
|
2017-08-02 02:19:43 +08:00
|
|
|
RSA private key generation essentially involves the generation of two or more
|
|
|
|
prime numbers. When generating a private key various symbols will be output to
|
2000-02-17 07:16:01 +08:00
|
|
|
indicate the progress of the generation. A B<.> represents each number which
|
|
|
|
has passed an initial sieve test, B<+> means a number has passed a single
|
2017-08-02 02:19:43 +08:00
|
|
|
round of the Miller-Rabin primality test, B<*> means the current prime starts
|
|
|
|
a regenerating progress due to some failed tests. A newline means that the number
|
|
|
|
has passed all the prime tests (the actual number depends on the key size).
|
1999-11-10 10:52:17 +08:00
|
|
|
|
|
|
|
Because key generation is a random process the time taken to generate a key
|
2017-08-02 02:19:43 +08:00
|
|
|
may vary somewhat. But in general, more primes lead to less generation time
|
|
|
|
of a key.
|
1999-11-10 10:52:17 +08:00
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2019-08-22 07:04:41 +08:00
|
|
|
L<openssl(1)>,
|
2020-02-12 13:49:16 +08:00
|
|
|
L<openssl-genpkey(1)>,
|
2019-08-22 07:04:41 +08:00
|
|
|
L<openssl-gendsa(1)>
|
2000-03-19 06:00:26 +08:00
|
|
|
|
2020-02-12 13:49:16 +08:00
|
|
|
=head1 HISTORY
|
|
|
|
|
|
|
|
This command was deprecated in OpenSSL 3.0.
|
|
|
|
|
2016-05-18 23:44:05 +08:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2022-05-03 18:52:38 +08:00
|
|
|
Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
|
2016-05-18 23:44:05 +08:00
|
|
|
|
2018-12-06 21:04:11 +08:00
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 23:44:05 +08:00
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|