genrsa.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>genrsa</title>
  6. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  7. <link rev="made" href="mailto:root@localhost" />
  8. </head>
  9. <body>
  10. <ul id="index">
  11. <li><a href="#NAME">NAME</a></li>
  12. <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
  13. <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
  14. <li><a href="#OPTIONS">OPTIONS</a></li>
  15. <li><a href="#NOTES">NOTES</a></li>
  16. <li><a href="#SEE-ALSO">SEE ALSO</a></li>
  17. <li><a href="#COPYRIGHT">COPYRIGHT</a></li>
  18. </ul>
  19. <h1 id="NAME">NAME</h1>
  20. <p>openssl-genrsa, genrsa - generate an RSA private key</p>
  21. <h1 id="SYNOPSIS">SYNOPSIS</h1>
  22. <p><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>]</p>
  23. <h1 id="DESCRIPTION">DESCRIPTION</h1>
  24. <p>The <b>genrsa</b> command generates an RSA private key.</p>
  25. <h1 id="OPTIONS">OPTIONS</h1>
  26. <dl>
  27. <dt id="help"><b>-help</b></dt>
  28. <dd>
  29. <p>Print out a usage message.</p>
  30. </dd>
  31. <dt id="out-filename"><b>-out filename</b></dt>
  32. <dd>
  33. <p>Output the key to the specified file. If this argument is not specified then standard output is used.</p>
  34. </dd>
  35. <dt id="passout-arg"><b>-passout arg</b></dt>
  36. <dd>
  37. <p>The output file password source. For more information about the format of <b>arg</b> see <a href="../man1/openssl.html">&quot;Pass Phrase Options&quot; in openssl(1)</a>.</p>
  38. </dd>
  39. <dt id="aes128--aes192--aes256--aria128--aria192--aria256--camellia128--camellia192--camellia256--des--des3--idea"><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></dt>
  40. <dd>
  41. <p>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.</p>
  42. </dd>
  43. <dt id="F4--3"><b>-F4|-3</b></dt>
  44. <dd>
  45. <p>The public exponent to use, either 65537 or 3. The default is 65537.</p>
  46. </dd>
  47. <dt id="rand-file"><b>-rand file...</b></dt>
  48. <dd>
  49. <p>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.</p>
  50. </dd>
  51. <dt id="writerand-file">[<b>-writerand file</b>]</dt>
  52. <dd>
  53. <p>Writes random data to the specified <i>file</i> upon exit. This can be used with a subsequent <b>-rand</b> flag.</p>
  54. </dd>
  55. <dt id="engine-id"><b>-engine id</b></dt>
  56. <dd>
  57. <p>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.</p>
  58. </dd>
  59. <dt id="primes-num"><b>-primes num</b></dt>
  60. <dd>
  61. <p>Specify the number of primes to use while generating the RSA 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 &#39;multi-prime&#39; RSA key, which is defined in RFC 8017.</p>
  62. </dd>
  63. <dt id="numbits"><b>numbits</b></dt>
  64. <dd>
  65. <p>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.</p>
  66. </dd>
  67. </dl>
  68. <h1 id="NOTES">NOTES</h1>
  69. <p>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 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>
  70. <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.</p>
  71. <h1 id="SEE-ALSO">SEE ALSO</h1>
  72. <p><a href="../man1/gendsa.html">gendsa(1)</a></p>
  73. <h1 id="COPYRIGHT">COPYRIGHT</h1>
  74. <p>Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.</p>
  75. <p>Licensed under the OpenSSL license (the &quot;License&quot;). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
  76. </body>
  77. </html>