| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 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 1SSL" |
| 58 |
.TH OPENSSL-DHPARAM 1SSL 2026-04-07 3.6.2 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\-provparam\fR \fI[name:]key=value\fR] |
| 88 |
[\fB\-propquery\fR \fIpropq\fR] |
| 89 |
[\fInumbits\fR] |
| 90 |
.SH DESCRIPTION |
| 91 |
.IX Header "DESCRIPTION" |
| 92 |
This command is used to manipulate DH parameter files. |
| 93 |
.PP |
| 94 |
See "EXAMPLES" in \fBopenssl\-genpkey\fR\|(1) for examples on how to generate |
| 95 |
a key using a named safe prime group without generating intermediate |
| 96 |
parameters. |
| 97 |
.SH OPTIONS |
| 98 |
.IX Header "OPTIONS" |
| 99 |
.IP \fB\-help\fR 4 |
| 100 |
.IX Item "-help" |
| 101 |
Print out a usage message. |
| 102 |
.IP "\fB\-inform\fR \fBDER\fR|\fBPEM\fR, \fB\-outform\fR \fBDER\fR|\fBPEM\fR" 4 |
| 103 |
.IX Item "-inform DER|PEM, -outform DER|PEM" |
| 104 |
The input format and output format; the default is \fBPEM\fR. |
| 105 |
The object is compatible with the PKCS#3 \fBDHparameter\fR structure. |
| 106 |
See \fBopenssl\-format\-options\fR\|(1) for details. |
| 107 |
.IP "\fB\-in\fR \fIfilename\fR" 4 |
| 108 |
.IX Item "-in filename" |
| 109 |
This specifies the input file to read parameters from or standard input if |
| 110 |
this option is not specified. |
| 111 |
.IP "\fB\-out\fR \fIfilename\fR" 4 |
| 112 |
.IX Item "-out filename" |
| 113 |
This specifies the output file to write parameters to. |
| 114 |
Standard output is used if this option is not present. |
| 115 |
The output filename can be the same as the input filename, |
| 116 |
which leads to replacing the file contents. |
| 117 |
Note that file I/O is not atomic. The output file is truncated and then written. |
| 118 |
.IP \fB\-dsaparam\fR 4 |
| 119 |
.IX Item "-dsaparam" |
| 120 |
If this option is used, DSA rather than DH parameters are read or created; |
| 121 |
they are converted to DH format. Otherwise, safe primes (such |
| 122 |
that (p\-1)/2 is also prime) will be used for DH parameter generation. |
| 123 |
.Sp |
| 124 |
DH parameter generation with the \fB\-dsaparam\fR option is much faster. |
| 125 |
Beware that with such DSA-style DH parameters, a fresh DH key should be |
| 126 |
created for each use to avoid small-subgroup attacks that may be possible |
| 127 |
otherwise. |
| 128 |
.IP \fB\-check\fR 4 |
| 129 |
.IX Item "-check" |
| 130 |
Performs numerous checks to see if the supplied parameters are valid and |
| 131 |
displays a warning if not. |
| 132 |
.IP "\fB\-2\fR, \fB\-3\fR, \fB\-5\fR" 4 |
| 133 |
.IX Item "-2, -3, -5" |
| 134 |
The generator to use, either 2, 3 or 5. If present then the |
| 135 |
input file is ignored and parameters are generated instead. If not |
| 136 |
present but \fInumbits\fR is present, parameters are generated with the |
| 137 |
default generator 2. |
| 138 |
.IP \fInumbits\fR 4 |
| 139 |
.IX Item "numbits" |
| 140 |
This option specifies that a parameter set should be generated of size |
| 141 |
\&\fInumbits\fR. It must be the last option. If this option is present then |
| 142 |
the input file is ignored and parameters are generated instead. If |
| 143 |
this option is not present but a generator (\fB\-2\fR, \fB\-3\fR or \fB\-5\fR) is |
| 144 |
present, parameters are generated with a default length of 2048 bits. |
| 145 |
The minimum length is 512 bits. The maximum length is 10000 bits. |
| 146 |
.IP \fB\-noout\fR 4 |
| 147 |
.IX Item "-noout" |
| 148 |
This option inhibits the output of the encoded version of the parameters. |
| 149 |
.IP \fB\-text\fR 4 |
| 150 |
.IX Item "-text" |
| 151 |
This option prints out the DH parameters in human readable form. |
| 152 |
.IP "\fB\-engine\fR \fIid\fR" 4 |
| 153 |
.IX Item "-engine id" |
| 154 |
See "Engine Options" in \fBopenssl\fR\|(1). |
| 155 |
This option is deprecated. |
| 156 |
.IP "\fB\-rand\fR \fIfiles\fR, \fB\-writerand\fR \fIfile\fR" 4 |
| 157 |
.IX Item "-rand files, -writerand file" |
| 158 |
See "Random State Options" in \fBopenssl\fR\|(1) for details. |
| 159 |
.IP "\fB\-provider\fR \fIname\fR" 4 |
| 160 |
.IX Item "-provider name" |
| 161 |
.PD 0 |
| 162 |
.IP "\fB\-provider\-path\fR \fIpath\fR" 4 |
| 163 |
.IX Item "-provider-path path" |
| 164 |
.IP "\fB\-provparam\fR \fI[name:]key=value\fR" 4 |
| 165 |
.IX Item "-provparam [name:]key=value" |
| 166 |
.IP "\fB\-propquery\fR \fIpropq\fR" 4 |
| 167 |
.IX Item "-propquery propq" |
| 168 |
.PD |
| 169 |
See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7). |
| 170 |
.IP \fB\-verbose\fR 4 |
| 171 |
.IX Item "-verbose" |
| 172 |
This option enables the output of progress messages, which is handy when |
| 173 |
running commands interactively that may take a long time to execute. |
| 174 |
.IP \fB\-quiet\fR 4 |
| 175 |
.IX Item "-quiet" |
| 176 |
This option suppresses the output of progress messages, which may be |
| 177 |
undesirable in batch scripts or pipelines. |
| 178 |
.SH NOTES |
| 179 |
.IX Header "NOTES" |
| 180 |
This command replaces the \fBdh\fR and \fBgendh\fR commands of previous |
| 181 |
releases. |
| 182 |
.SH "SEE ALSO" |
| 183 |
.IX Header "SEE ALSO" |
| 184 |
\&\fBopenssl\fR\|(1), |
| 185 |
\&\fBopenssl\-pkeyparam\fR\|(1), |
| 186 |
\&\fBopenssl\-dsaparam\fR\|(1), |
| 187 |
\&\fBopenssl\-genpkey\fR\|(1). |
| 188 |
.SH HISTORY |
| 189 |
.IX Header "HISTORY" |
| 190 |
The \fB\-engine\fR option was deprecated in OpenSSL 3.0. |
| 191 |
.PP |
| 192 |
The \fB\-C\fR option was removed in OpenSSL 3.0. |
| 193 |
.SH COPYRIGHT |
| 194 |
.IX Header "COPYRIGHT" |
| 195 |
Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved. |
| 196 |
.PP |
| 197 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 198 |
this file except in compliance with the License. You can obtain a copy |
| 199 |
in the file LICENSE in the source distribution or at |
| 200 |
<https://www.openssl.org/source/license.html>. |