171 lines
5.2 KiB
HTML
171 lines
5.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of GENRSA</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>GENRSA</H1>
|
|
Section: OpenSSL (1SSL)<BR>Updated: 2021-03-22<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
openssl-genrsa, genrsa - generate an RSA private key
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
<B>openssl</B> <B>genrsa</B>
|
|
[<B>-help</B>]
|
|
[<B>-out filename</B>]
|
|
[<B>-passout arg</B>]
|
|
[<B>-aes128</B>]
|
|
[<B>-aes192</B>]
|
|
[<B>-aes256</B>]
|
|
[<B>-aria128</B>]
|
|
[<B>-aria192</B>]
|
|
[<B>-aria256</B>]
|
|
[<B>-camellia128</B>]
|
|
[<B>-camellia192</B>]
|
|
[<B>-camellia256</B>]
|
|
[<B>-des</B>]
|
|
[<B>-des3</B>]
|
|
[<B>-idea</B>]
|
|
[<B>-f4</B>]
|
|
[<B>-3</B>]
|
|
[<B>-rand file...</B>]
|
|
[<B>-writerand file</B>]
|
|
[<B>-engine id</B>]
|
|
[<B>-primes num</B>]
|
|
[<B>numbits</B>]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
The <B>genrsa</B> command generates an <FONT SIZE="-1">RSA</FONT> private key.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-help</B><DD>
|
|
|
|
|
|
Print out a usage message.
|
|
<DT id="2"><B>-out filename</B><DD>
|
|
|
|
|
|
Output the key to the specified file. If this argument is not specified then
|
|
standard output is used.
|
|
<DT id="3"><B>-passout arg</B><DD>
|
|
|
|
|
|
The output file password source. For more information about the format
|
|
of <B>arg</B> see the <B></B><FONT SIZE="-1"><B>PASS PHRASE ARGUMENTS</B></FONT><B></B> section in <B><A HREF="/cgi-bin/man/man2html?1+openssl">openssl</A></B>(1).
|
|
<DT id="4"><B>-aes128</B>, <B>-aes192</B>, <B>-aes256</B>, <B>-aria128</B>, <B>-aria192</B>, <B>-aria256</B>, <B>-camellia128</B>, <B>-camellia192</B>, <B>-camellia256</B>, <B>-des</B>, <B>-des3</B>, <B>-idea</B><DD>
|
|
|
|
|
|
These options encrypt the private key with specified
|
|
cipher before outputting it. If none of these options is
|
|
specified no encryption is used. If encryption is used a pass phrase is prompted
|
|
for if it is not supplied via the <B>-passout</B> argument.
|
|
<DT id="5"><B>-F4|-3</B><DD>
|
|
|
|
|
|
The public exponent to use, either 65537 or 3. The default is 65537.
|
|
<DT id="6"><B>-rand file...</B><DD>
|
|
|
|
|
|
A file or files containing random data used to seed the random number
|
|
generator.
|
|
Multiple files can be specified separated by an OS-dependent character.
|
|
The separator is <B>;</B> for MS-Windows, <B>,</B> for OpenVMS, and <B>:</B> for
|
|
all others.
|
|
<DT id="7">[<B>-writerand file</B>]<DD>
|
|
|
|
|
|
Writes random data to the specified <I>file</I> upon exit.
|
|
This can be used with a subsequent <B>-rand</B> flag.
|
|
<DT id="8"><B>-engine id</B><DD>
|
|
|
|
|
|
Specifying an engine (by its unique <B>id</B> string) will cause <B>genrsa</B>
|
|
to attempt to obtain a functional reference to the specified engine,
|
|
thus initialising it if needed. The engine will then be set as the default
|
|
for all available algorithms.
|
|
<DT id="9"><B>-primes num</B><DD>
|
|
|
|
|
|
Specify the number of primes to use while generating the <FONT SIZE="-1">RSA</FONT> key. The <B>num</B>
|
|
parameter must be a positive integer that is greater than 1 and less than 16.
|
|
If <B>num</B> is greater than 2, then the generated key is called a 'multi-prime'
|
|
<FONT SIZE="-1">RSA</FONT> key, which is defined in <FONT SIZE="-1">RFC 8017.</FONT>
|
|
<DT id="10"><B>numbits</B><DD>
|
|
|
|
|
|
The size of the private key to generate in bits. This must be the last option
|
|
specified. The default is 2048 and values less than 512 are not allowed.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
|
|
|
|
<FONT SIZE="-1">RSA</FONT> private key generation essentially involves the generation of two or more
|
|
prime numbers. When generating a private key various symbols will be output to
|
|
indicate the progress of the generation. A <B>.</B> represents each number which
|
|
has passed an initial sieve test, <B>+</B> means a number has passed a single
|
|
round of the Miller-Rabin primality test, <B>*</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).
|
|
<P>
|
|
|
|
Because key generation is a random process the time taken to generate a key
|
|
may vary somewhat. But in general, more primes lead to less generation time
|
|
of a key.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+gendsa">gendsa</A></B>(1)
|
|
<A NAME="lbAH"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
|
|
<P>
|
|
|
|
Licensed under the OpenSSL license (the ``License''). You may not use
|
|
this file except in compliance with the License. You can obtain a copy
|
|
in the file <FONT SIZE="-1">LICENSE</FONT> in the source distribution or at
|
|
<<A HREF="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</A>>.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="11"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="12"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="13"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="14"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="15"><A HREF="#lbAF">NOTES</A><DD>
|
|
<DT id="16"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="17"><A HREF="#lbAH">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:13 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|