openssl-dhparam.1ossl 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  3. .\"
  4. .\" Standard preamble:
  5. .\" ========================================================================
  6. .de Sp \" Vertical space (when we can't use .PP)
  7. .if t .sp .5v
  8. .if n .sp
  9. ..
  10. .de Vb \" Begin verbatim text
  11. .ft CW
  12. .nf
  13. .ne \\$1
  14. ..
  15. .de Ve \" End verbatim text
  16. .ft R
  17. .fi
  18. ..
  19. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
  20. .ie n \{\
  21. . ds C` ""
  22. . ds C' ""
  23. 'br\}
  24. .el\{\
  25. . ds C`
  26. . ds C'
  27. 'br\}
  28. .\"
  29. .\" Escape single quotes in literal strings from groff's Unicode transform.
  30. .ie \n(.g .ds Aq \(aq
  31. .el .ds Aq '
  32. .\"
  33. .\" If the F register is >0, we'll generate index entries on stderr for
  34. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  35. .\" entries marked with X<> in POD. Of course, you'll have to process the
  36. .\" output yourself in some meaningful fashion.
  37. .\"
  38. .\" Avoid warning from groff about undefined register 'F'.
  39. .de IX
  40. ..
  41. .nr rF 0
  42. .if \n(.g .if rF .nr rF 1
  43. .if (\n(rF:(\n(.g==0)) \{\
  44. . if \nF \{\
  45. . de IX
  46. . tm Index:\\$1\t\\n%\t"\\$2"
  47. ..
  48. . if !\nF==2 \{\
  49. . nr % 0
  50. . nr F 2
  51. . \}
  52. . \}
  53. .\}
  54. .rr rF
  55. .\" ========================================================================
  56. .\"
  57. .IX Title "OPENSSL-DHPARAM 1ossl"
  58. .TH OPENSSL-DHPARAM 1ossl 2025-01-17 3.4.0 OpenSSL
  59. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  60. .\" way too many mistakes in technical documents.
  61. .if n .ad l
  62. .nh
  63. .SH NAME
  64. openssl\-dhparam \- DH parameter manipulation and generation
  65. .SH SYNOPSIS
  66. .IX Header "SYNOPSIS"
  67. \&\fBopenssl dhparam\fR
  68. [\fB\-help\fR]
  69. [\fB\-inform\fR \fBDER\fR|\fBPEM\fR]
  70. [\fB\-outform\fR \fBDER\fR|\fBPEM\fR]
  71. [\fB\-in\fR \fIfilename\fR]
  72. [\fB\-out\fR \fIfilename\fR]
  73. [\fB\-dsaparam\fR]
  74. [\fB\-check\fR]
  75. [\fB\-noout\fR]
  76. [\fB\-text\fR]
  77. [\fB\-verbose\fR]
  78. [\fB\-quiet\fR]
  79. [\fB\-2\fR]
  80. [\fB\-3\fR]
  81. [\fB\-5\fR]
  82. [\fB\-engine\fR \fIid\fR]
  83. [\fB\-rand\fR \fIfiles\fR]
  84. [\fB\-writerand\fR \fIfile\fR]
  85. [\fB\-provider\fR \fIname\fR]
  86. [\fB\-provider\-path\fR \fIpath\fR]
  87. [\fB\-propquery\fR \fIpropq\fR]
  88. [\fInumbits\fR]
  89. .SH DESCRIPTION
  90. .IX Header "DESCRIPTION"
  91. This command is used to manipulate DH parameter files.
  92. .PP
  93. See "EXAMPLES" in \fBopenssl\-genpkey\fR\|(1) for examples on how to generate
  94. a key using a named safe prime group without generating intermediate
  95. parameters.
  96. .SH OPTIONS
  97. .IX Header "OPTIONS"
  98. .IP \fB\-help\fR 4
  99. .IX Item "-help"
  100. Print out a usage message.
  101. .IP "\fB\-inform\fR \fBDER\fR|\fBPEM\fR, \fB\-outform\fR \fBDER\fR|\fBPEM\fR" 4
  102. .IX Item "-inform DER|PEM, -outform DER|PEM"
  103. The input format and output format; the default is \fBPEM\fR.
  104. The object is compatible with the PKCS#3 \fBDHparameter\fR structure.
  105. See \fBopenssl\-format\-options\fR\|(1) for details.
  106. .IP "\fB\-in\fR \fIfilename\fR" 4
  107. .IX Item "-in filename"
  108. This specifies the input filename to read parameters from or standard input if
  109. this option is not specified.
  110. .IP "\fB\-out\fR \fIfilename\fR" 4
  111. .IX Item "-out filename"
  112. This specifies the output filename parameters to. Standard output is used
  113. if this option is not present. The output filename should \fBnot\fR be the same
  114. as the input filename.
  115. .IP \fB\-dsaparam\fR 4
  116. .IX Item "-dsaparam"
  117. If this option is used, DSA rather than DH parameters are read or created;
  118. they are converted to DH format. Otherwise, safe primes (such
  119. that (p\-1)/2 is also prime) will be used for DH parameter generation.
  120. .Sp
  121. DH parameter generation with the \fB\-dsaparam\fR option is much faster.
  122. Beware that with such DSA-style DH parameters, a fresh DH key should be
  123. created for each use to avoid small-subgroup attacks that may be possible
  124. otherwise.
  125. .IP \fB\-check\fR 4
  126. .IX Item "-check"
  127. Performs numerous checks to see if the supplied parameters are valid and
  128. displays a warning if not.
  129. .IP "\fB\-2\fR, \fB\-3\fR, \fB\-5\fR" 4
  130. .IX Item "-2, -3, -5"
  131. The generator to use, either 2, 3 or 5. If present then the
  132. input file is ignored and parameters are generated instead. If not
  133. present but \fInumbits\fR is present, parameters are generated with the
  134. default generator 2.
  135. .IP \fInumbits\fR 4
  136. .IX Item "numbits"
  137. This option specifies that a parameter set should be generated of size
  138. \&\fInumbits\fR. It must be the last option. If this option is present then
  139. the input file is ignored and parameters are generated instead. If
  140. this option is not present but a generator (\fB\-2\fR, \fB\-3\fR or \fB\-5\fR) is
  141. present, parameters are generated with a default length of 2048 bits.
  142. The minimum length is 512 bits. The maximum length is 10000 bits.
  143. .IP \fB\-noout\fR 4
  144. .IX Item "-noout"
  145. This option inhibits the output of the encoded version of the parameters.
  146. .IP \fB\-text\fR 4
  147. .IX Item "-text"
  148. This option prints out the DH parameters in human readable form.
  149. .IP "\fB\-engine\fR \fIid\fR" 4
  150. .IX Item "-engine id"
  151. See "Engine Options" in \fBopenssl\fR\|(1).
  152. This option is deprecated.
  153. .IP "\fB\-rand\fR \fIfiles\fR, \fB\-writerand\fR \fIfile\fR" 4
  154. .IX Item "-rand files, -writerand file"
  155. See "Random State Options" in \fBopenssl\fR\|(1) for details.
  156. .IP "\fB\-provider\fR \fIname\fR" 4
  157. .IX Item "-provider name"
  158. .PD 0
  159. .IP "\fB\-provider\-path\fR \fIpath\fR" 4
  160. .IX Item "-provider-path path"
  161. .IP "\fB\-propquery\fR \fIpropq\fR" 4
  162. .IX Item "-propquery propq"
  163. .PD
  164. See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
  165. .IP \fB\-verbose\fR 4
  166. .IX Item "-verbose"
  167. This option enables the output of progress messages, which is handy when
  168. running commands interactively that may take a long time to execute.
  169. .IP \fB\-quiet\fR 4
  170. .IX Item "-quiet"
  171. This option suppresses the output of progress messages, which may be
  172. undesirable in batch scripts or pipelines.
  173. .SH NOTES
  174. .IX Header "NOTES"
  175. This command replaces the \fBdh\fR and \fBgendh\fR commands of previous
  176. releases.
  177. .SH "SEE ALSO"
  178. .IX Header "SEE ALSO"
  179. \&\fBopenssl\fR\|(1),
  180. \&\fBopenssl\-pkeyparam\fR\|(1),
  181. \&\fBopenssl\-dsaparam\fR\|(1),
  182. \&\fBopenssl\-genpkey\fR\|(1).
  183. .SH HISTORY
  184. .IX Header "HISTORY"
  185. The \fB\-engine\fR option was deprecated in OpenSSL 3.0.
  186. .PP
  187. The \fB\-C\fR option was removed in OpenSSL 3.0.
  188. .SH COPYRIGHT
  189. .IX Header "COPYRIGHT"
  190. Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
  191. .PP
  192. Licensed under the Apache License 2.0 (the "License"). You may not use
  193. this file except in compliance with the License. You can obtain a copy
  194. in the file LICENSE in the source distribution or at
  195. <https://www.openssl.org/source/license.html>.