openssl-dhparam.html 6.3 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>openssl-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="#NOTES">NOTES</a></li>
  16. <li><a href="#SEE-ALSO">SEE ALSO</a></li>
  17. <li><a href="#HISTORY">HISTORY</a></li>
  18. <li><a href="#COPYRIGHT">COPYRIGHT</a></li>
  19. </ul>
  20. <h1 id="NAME">NAME</h1>
  21. <p>openssl-dhparam - DH parameter manipulation and generation</p>
  22. <h1 id="SYNOPSIS">SYNOPSIS</h1>
  23. <p><b>openssl dhparam</b> [<b>-help</b>] [<b>-inform</b> <b>DER</b>|<b>PEM</b>] [<b>-outform</b> <b>DER</b>|<b>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>-verbose</b>] [<b>-quiet</b>] [<b>-2</b>] [<b>-3</b>] [<b>-5</b>] [<b>-engine</b> <i>id</i>] [<b>-rand</b> <i>files</i>] [<b>-writerand</b> <i>file</i>] [<b>-provider</b> <i>name</i>] [<b>-provider-path</b> <i>path</i>] [<b>-propquery</b> <i>propq</i>] [<i>numbits</i>]</p>
  24. <h1 id="DESCRIPTION">DESCRIPTION</h1>
  25. <p>This command is used to manipulate DH parameter files.</p>
  26. <p>See <a href="../man1/openssl-genpkey.html">&quot;EXAMPLES&quot; in openssl-genpkey(1)</a> for examples on how to generate a key using a named safe prime group without generating intermediate parameters.</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--outform-DER-PEM"><b>-inform</b> <b>DER</b>|<b>PEM</b>, <b>-outform</b> <b>DER</b>|<b>PEM</b></dt>
  34. <dd>
  35. <p>The input format and output format; the default is <b>PEM</b>. The object is compatible with the PKCS#3 <b>DHparameter</b> structure. See <a href="../man1/openssl-format-options.html">openssl-format-options(1)</a> for details.</p>
  36. </dd>
  37. <dt id="in-filename"><b>-in</b> <i>filename</i></dt>
  38. <dd>
  39. <p>This specifies the input filename to read parameters from or standard input if this option is not specified.</p>
  40. </dd>
  41. <dt id="out-filename"><b>-out</b> <i>filename</i></dt>
  42. <dd>
  43. <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>
  44. </dd>
  45. <dt id="dsaparam"><b>-dsaparam</b></dt>
  46. <dd>
  47. <p>If this option is used, DSA rather than DH parameters are read or created; they are converted to DH format. Otherwise, safe primes (such that (p-1)/2 is also prime) will be used for DH parameter generation.</p>
  48. <p>DH parameter generation with the <b>-dsaparam</b> option is much faster. 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>
  49. </dd>
  50. <dt id="check"><b>-check</b></dt>
  51. <dd>
  52. <p>Performs numerous checks to see if the supplied parameters are valid and displays a warning if not.</p>
  53. </dd>
  54. <dt id="pod-2--3--5"><b>-2</b>, <b>-3</b>, <b>-5</b></dt>
  55. <dd>
  56. <p>The generator to use, either 2, 3 or 5. If present then the input file is ignored and parameters are generated instead. If not present but <i>numbits</i> is present, parameters are generated with the default generator 2.</p>
  57. </dd>
  58. <dt id="numbits"><i>numbits</i></dt>
  59. <dd>
  60. <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>, <b>-3</b> or <b>-5</b>) is present, parameters are generated with a default length of 2048 bits. The minimum length is 512 bits. The maximum length is 10000 bits.</p>
  61. </dd>
  62. <dt id="noout"><b>-noout</b></dt>
  63. <dd>
  64. <p>This option inhibits the output of the encoded version of the parameters.</p>
  65. </dd>
  66. <dt id="text"><b>-text</b></dt>
  67. <dd>
  68. <p>This option prints out the DH parameters in human readable form.</p>
  69. </dd>
  70. <dt id="engine-id"><b>-engine</b> <i>id</i></dt>
  71. <dd>
  72. <p>See <a href="../man1/openssl.html">&quot;Engine Options&quot; in openssl(1)</a>. This option is deprecated.</p>
  73. </dd>
  74. <dt id="rand-files--writerand-file"><b>-rand</b> <i>files</i>, <b>-writerand</b> <i>file</i></dt>
  75. <dd>
  76. <p>See <a href="../man1/openssl.html">&quot;Random State Options&quot; in openssl(1)</a> for details.</p>
  77. </dd>
  78. <dt id="provider-name"><b>-provider</b> <i>name</i></dt>
  79. <dd>
  80. </dd>
  81. <dt id="provider-path-path"><b>-provider-path</b> <i>path</i></dt>
  82. <dd>
  83. </dd>
  84. <dt id="propquery-propq"><b>-propquery</b> <i>propq</i></dt>
  85. <dd>
  86. <p>See <a href="../man1/openssl.html">&quot;Provider Options&quot; in openssl(1)</a>, <a href="../man7/provider.html">provider(7)</a>, and <a href="../man7/property.html">property(7)</a>.</p>
  87. </dd>
  88. <dt id="verbose"><b>-verbose</b></dt>
  89. <dd>
  90. <p>This option enables the output of progress messages, which is handy when running commands interactively that may take a long time to execute.</p>
  91. </dd>
  92. <dt id="quiet"><b>-quiet</b></dt>
  93. <dd>
  94. <p>This option suppresses the output of progress messages, which may be undesirable in batch scripts or pipelines.</p>
  95. </dd>
  96. </dl>
  97. <h1 id="NOTES">NOTES</h1>
  98. <p>This command replaces the <b>dh</b> and <b>gendh</b> commands of previous releases.</p>
  99. <h1 id="SEE-ALSO">SEE ALSO</h1>
  100. <p><a href="../man1/openssl.html">openssl(1)</a>, <a href="../man1/openssl-pkeyparam.html">openssl-pkeyparam(1)</a>, <a href="../man1/openssl-dsaparam.html">openssl-dsaparam(1)</a>, <a href="../man1/openssl-genpkey.html">openssl-genpkey(1)</a>.</p>
  101. <h1 id="HISTORY">HISTORY</h1>
  102. <p>The <b>-engine</b> option was deprecated in OpenSSL 3.0.</p>
  103. <p>The <b>-C</b> option was removed in OpenSSL 3.0.</p>
  104. <h1 id="COPYRIGHT">COPYRIGHT</h1>
  105. <p>Copyright 2000-2023 The OpenSSL Project Authors. All Rights Reserved.</p>
  106. <p>Licensed under the Apache License 2.0 (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>
  107. </body>
  108. </html>