dhparam.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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>dhparam</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="#WARNINGS">WARNINGS</a></li>
  16. <li><a href="#NOTES">NOTES</a></li>
  17. <li><a href="#BUGS">BUGS</a></li>
  18. <li><a href="#SEE-ALSO">SEE ALSO</a></li>
  19. <li><a href="#COPYRIGHT">COPYRIGHT</a></li>
  20. </ul>
  21. <h1 id="NAME">NAME</h1>
  22. <p>openssl-dhparam, dhparam - DH parameter manipulation and generation</p>
  23. <h1 id="SYNOPSIS">SYNOPSIS</h1>
  24. <p><b>openssl dhparam</b> [<b>-help</b>] [<b>-inform DER|PEM</b>] [<b>-outform DER|PEM</b>] [<b>-in</b> <i>filename</i>] [<b>-out</b> <i>filename</i>] [<b>-dsaparam</b>] [<b>-check</b>] [<b>-noout</b>] [<b>-text</b>] [<b>-C</b>] [<b>-2</b>] [<b>-5</b>] [<b>-rand file...</b>] [<b>-writerand file</b>] [<b>-engine id</b>] [<i>numbits</i>]</p>
  25. <h1 id="DESCRIPTION">DESCRIPTION</h1>
  26. <p>This command is used to manipulate DH parameter files.</p>
  27. <h1 id="OPTIONS">OPTIONS</h1>
  28. <dl>
  29. <dt id="help"><b>-help</b></dt>
  30. <dd>
  31. <p>Print out a usage message.</p>
  32. </dd>
  33. <dt id="inform-DER-PEM"><b>-inform DER|PEM</b></dt>
  34. <dd>
  35. <p>This specifies the input format. The <b>DER</b> option uses an ASN1 DER encoded form compatible with the PKCS#3 DHparameter structure. The PEM form is the default format: it consists of the <b>DER</b> format base64 encoded with additional header and footer lines.</p>
  36. </dd>
  37. <dt id="outform-DER-PEM"><b>-outform DER|PEM</b></dt>
  38. <dd>
  39. <p>This specifies the output format, the options have the same meaning and default as the <b>-inform</b> option.</p>
  40. </dd>
  41. <dt id="in-filename"><b>-in</b> <i>filename</i></dt>
  42. <dd>
  43. <p>This specifies the input filename to read parameters from or standard input if this option is not specified.</p>
  44. </dd>
  45. <dt id="out-filename"><b>-out</b> <i>filename</i></dt>
  46. <dd>
  47. <p>This specifies the output filename parameters to. Standard output is used if this option is not present. The output filename should <b>not</b> be the same as the input filename.</p>
  48. </dd>
  49. <dt id="dsaparam"><b>-dsaparam</b></dt>
  50. <dd>
  51. <p>If this option is used, DSA rather than DH parameters are read or created; they are converted to DH format. Otherwise, &quot;strong&quot; primes (such that (p-1)/2 is also prime) will be used for DH parameter generation.</p>
  52. <p>DH parameter generation with the <b>-dsaparam</b> option is much faster, and the recommended exponent length is shorter, which makes DH key exchange more efficient. Beware that with such DSA-style DH parameters, a fresh DH key should be created for each use to avoid small-subgroup attacks that may be possible otherwise.</p>
  53. </dd>
  54. <dt id="check"><b>-check</b></dt>
  55. <dd>
  56. <p>Performs numerous checks to see if the supplied parameters are valid and displays a warning if not.</p>
  57. </dd>
  58. <dt id="pod-2--5"><b>-2</b>, <b>-5</b></dt>
  59. <dd>
  60. <p>The generator to use, either 2 or 5. If present then the input file is ignored and parameters are generated instead. If not present but <b>numbits</b> is present, parameters are generated with the default generator 2.</p>
  61. </dd>
  62. <dt id="rand-file"><b>-rand file...</b></dt>
  63. <dd>
  64. <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>
  65. </dd>
  66. <dt id="writerand-file">[<b>-writerand file</b>]</dt>
  67. <dd>
  68. <p>Writes random data to the specified <i>file</i> upon exit. This can be used with a subsequent <b>-rand</b> flag.</p>
  69. </dd>
  70. <dt id="numbits"><i>numbits</i></dt>
  71. <dd>
  72. <p>This option specifies that a parameter set should be generated of size <i>numbits</i>. It must be the last option. If this option is present then the input file is ignored and parameters are generated instead. If this option is not present but a generator (<b>-2</b> or <b>-5</b>) is present, parameters are generated with a default length of 2048 bits.</p>
  73. </dd>
  74. <dt id="noout"><b>-noout</b></dt>
  75. <dd>
  76. <p>This option inhibits the output of the encoded version of the parameters.</p>
  77. </dd>
  78. <dt id="text"><b>-text</b></dt>
  79. <dd>
  80. <p>This option prints out the DH parameters in human readable form.</p>
  81. </dd>
  82. <dt id="C"><b>-C</b></dt>
  83. <dd>
  84. <p>This option converts the parameters into C code. The parameters can then be loaded by calling the get_dhNNNN() function.</p>
  85. </dd>
  86. <dt id="engine-id"><b>-engine id</b></dt>
  87. <dd>
  88. <p>Specifying an engine (by its unique <b>id</b> string) will cause <b>dhparam</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>
  89. </dd>
  90. </dl>
  91. <h1 id="WARNINGS">WARNINGS</h1>
  92. <p>The program <b>dhparam</b> combines the functionality of the programs <b>dh</b> and <b>gendh</b> in previous versions of OpenSSL. The <b>dh</b> and <b>gendh</b> programs are retained for now but may have different purposes in future versions of OpenSSL.</p>
  93. <h1 id="NOTES">NOTES</h1>
  94. <p>PEM format DH parameters use the header and footer lines:</p>
  95. <pre><code> -----BEGIN DH PARAMETERS-----
  96. -----END DH PARAMETERS-----</code></pre>
  97. <p>OpenSSL currently only supports the older PKCS#3 DH, not the newer X9.42 DH.</p>
  98. <p>This program manipulates DH parameters not keys.</p>
  99. <h1 id="BUGS">BUGS</h1>
  100. <p>There should be a way to generate and manipulate DH keys.</p>
  101. <h1 id="SEE-ALSO">SEE ALSO</h1>
  102. <p><a href="../man1/dsaparam.html">dsaparam(1)</a></p>
  103. <h1 id="COPYRIGHT">COPYRIGHT</h1>
  104. <p>Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.</p>
  105. <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>
  106. </body>
  107. </html>