1OPENSSL-DHPARAM(1ossl)              OpenSSL             OPENSSL-DHPARAM(1ossl)
2
3
4

NAME

6       openssl-dhparam - DH parameter manipulation and generation
7

SYNOPSIS

9       openssl dhparam [-help] [-inform DER|PEM] [-outform DER|PEM] [-in
10       filename] [-out filename] [-dsaparam] [-check] [-noout] [-text] [-2]
11       [-3] [-5] [-engine id] [-rand files] [-writerand file] [-provider name]
12       [-provider-path path] [-propquery propq] [numbits]
13

DESCRIPTION

15       This command is used to manipulate DH parameter files.
16
17       See "EXAMPLES" in openssl-genpkey(1) for examples on how to generate a
18       key using a named safe prime group without generating intermediate
19       parameters.
20

OPTIONS

22       -help
23           Print out a usage message.
24
25       -inform DER|PEM, -outform DER|PEM
26           The input format and output format; the default is PEM.  The object
27           is compatible with the PKCS#3 DHparameter structure.  See
28           openssl-format-options(1) for details.
29
30       -in filename
31           This specifies the input filename to read parameters from or
32           standard input if this option is not specified.
33
34       -out filename
35           This specifies the output filename parameters to. Standard output
36           is used if this option is not present. The output filename should
37           not be the same as the input filename.
38
39       -dsaparam
40           If this option is used, DSA rather than DH parameters are read or
41           created; they are converted to DH format.  Otherwise, safe primes
42           (such that (p-1)/2 is also prime) will be used for DH parameter
43           generation.
44
45           DH parameter generation with the -dsaparam option is much faster.
46           Beware that with such DSA-style DH parameters, a fresh DH key
47           should be created for each use to avoid small-subgroup attacks that
48           may be possible otherwise.
49
50       -check
51           Performs numerous checks to see if the supplied parameters are
52           valid and displays a warning if not.
53
54       -2, -3, -5
55           The generator to use, either 2, 3 or 5. If present then the input
56           file is ignored and parameters are generated instead. If not
57           present but numbits is present, parameters are generated with the
58           default generator 2.
59
60       numbits
61           This option specifies that a parameter set should be generated of
62           size numbits. It must be the last option. If this option is present
63           then the input file is ignored and parameters are generated
64           instead. If this option is not present but a generator (-2, -3 or
65           -5) is present, parameters are generated with a default length of
66           2048 bits.  The minimim length is 512 bits. The maximum length is
67           10000 bits.
68
69       -noout
70           This option inhibits the output of the encoded version of the
71           parameters.
72
73       -text
74           This option prints out the DH parameters in human readable form.
75
76       -engine id
77           See "Engine Options" in openssl(1).  This option is deprecated.
78
79       -rand files, -writerand file
80           See "Random State Options" in openssl(1) for details.
81
82       -provider name
83       -provider-path path
84       -propquery propq
85           See "Provider Options" in openssl(1), provider(7), and property(7).
86

NOTES

88       This command replaces the dh and gendh commands of previous releases.
89

SEE ALSO

91       openssl(1), openssl-pkeyparam(1), openssl-dsaparam(1),
92       openssl-genpkey(1).
93

HISTORY

95       The -engine option was deprecated in OpenSSL 3.0.
96
97       The -C option was removed in OpenSSL 3.0.
98
100       Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
101
102       Licensed under the Apache License 2.0 (the "License").  You may not use
103       this file except in compliance with the License.  You can obtain a copy
104       in the file LICENSE in the source distribution or at
105       <https://www.openssl.org/source/license.html>.
106
107
108
1093.1.1                             2023-08-31            OPENSSL-DHPARAM(1ossl)
Impressum