Blame doc/man1/dhparam.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
openssl-dhparam,
Packit c4476c
dhparam - DH parameter manipulation and generation
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
B<openssl dhparam>
Packit c4476c
[B<-help>]
Packit c4476c
[B<-inform DER|PEM>]
Packit c4476c
[B<-outform DER|PEM>]
Packit c4476c
[B<-in> I<filename>]
Packit c4476c
[B<-out> I<filename>]
Packit c4476c
[B<-dsaparam>]
Packit c4476c
[B<-check>]
Packit c4476c
[B<-noout>]
Packit c4476c
[B<-text>]
Packit c4476c
[B<-C>]
Packit c4476c
[B<-2>]
Packit c4476c
[B<-5>]
Packit c4476c
[B<-rand file...>]
Packit c4476c
[B<-writerand file>]
Packit c4476c
[B<-engine id>]
Packit c4476c
[I<numbits>]
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
This command is used to manipulate DH parameter files.
Packit c4476c
Packit c4476c
=head1 OPTIONS
Packit c4476c
Packit c4476c
=over 4
Packit c4476c
Packit c4476c
=item B<-help>
Packit c4476c
Packit c4476c
Print out a usage message.
Packit c4476c
Packit c4476c
=item B<-inform DER|PEM>
Packit c4476c
Packit c4476c
This specifies the input format. The B<DER> option uses an ASN1 DER encoded
Packit c4476c
form compatible with the PKCS#3 DHparameter structure. The PEM form is the
Packit c4476c
default format: it consists of the B<DER> format base64 encoded with
Packit c4476c
additional header and footer lines.
Packit c4476c
Packit c4476c
=item B<-outform DER|PEM>
Packit c4476c
Packit c4476c
This specifies the output format, the options have the same meaning and default
Packit c4476c
as the B<-inform> option.
Packit c4476c
Packit c4476c
=item B<-in> I<filename>
Packit c4476c
Packit c4476c
This specifies the input filename to read parameters from or standard input if
Packit c4476c
this option is not specified.
Packit c4476c
Packit c4476c
=item B<-out> I<filename>
Packit c4476c
Packit c4476c
This specifies the output filename parameters to. Standard output is used
Packit c4476c
if this option is not present. The output filename should B<not> be the same
Packit c4476c
as the input filename.
Packit c4476c
Packit c4476c
=item B<-dsaparam>
Packit c4476c
Packit c4476c
If this option is used, DSA rather than DH parameters are read or created;
Packit c4476c
they are converted to DH format.  Otherwise, "strong" primes (such
Packit c4476c
that (p-1)/2 is also prime) will be used for DH parameter generation.
Packit c4476c
Packit c4476c
DH parameter generation with the B<-dsaparam> option is much faster,
Packit c4476c
and the recommended exponent length is shorter, which makes DH key
Packit c4476c
exchange more efficient.  Beware that with such DSA-style DH
Packit c4476c
parameters, a fresh DH key should be created for each use to
Packit c4476c
avoid small-subgroup attacks that may be possible otherwise.
Packit c4476c
Packit c4476c
=item B<-check>
Packit c4476c
Packit c4476c
Performs numerous checks to see if the supplied parameters are valid and
Packit c4476c
displays a warning if not.
Packit c4476c
Packit c4476c
=item B<-2>, B<-5>
Packit c4476c
Packit c4476c
The generator to use, either 2 or 5. If present then the
Packit c4476c
input file is ignored and parameters are generated instead. If not
Packit c4476c
present but B<numbits> is present, parameters are generated with the
Packit c4476c
default generator 2.
Packit c4476c
Packit c4476c
=item B<-rand file...>
Packit c4476c
Packit c4476c
A file or files containing random data used to seed the random number
Packit c4476c
generator.
Packit c4476c
Multiple files can be specified separated by an OS-dependent character.
Packit c4476c
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
Packit c4476c
all others.
Packit c4476c
Packit c4476c
=item [B<-writerand file>]
Packit c4476c
Packit c4476c
Writes random data to the specified I<file> upon exit.
Packit c4476c
This can be used with a subsequent B<-rand> flag.
Packit c4476c
Packit c4476c
=item I<numbits>
Packit c4476c
Packit c4476c
This option specifies that a parameter set should be generated of size
Packit c4476c
I<numbits>. It must be the last option. If this option is present then
Packit c4476c
the input file is ignored and parameters are generated instead. If
Packit c4476c
this option is not present but a generator (B<-2> or B<-5>) is
Packit c4476c
present, parameters are generated with a default length of 2048 bits.
Packit c4476c
Packit c4476c
=item B<-noout>
Packit c4476c
Packit c4476c
This option inhibits the output of the encoded version of the parameters.
Packit c4476c
Packit c4476c
=item B<-text>
Packit c4476c
Packit c4476c
This option prints out the DH parameters in human readable form.
Packit c4476c
Packit c4476c
=item B<-C>
Packit c4476c
Packit c4476c
This option converts the parameters into C code. The parameters can then
Packit c4476c
be loaded by calling the get_dhNNNN() function.
Packit c4476c
Packit c4476c
=item B<-engine id>
Packit c4476c
Packit c4476c
Specifying an engine (by its unique B<id> string) will cause B<dhparam>
Packit c4476c
to attempt to obtain a functional reference to the specified engine,
Packit c4476c
thus initialising it if needed. The engine will then be set as the default
Packit c4476c
for all available algorithms.
Packit c4476c
Packit c4476c
=back
Packit c4476c
Packit c4476c
=head1 WARNINGS
Packit c4476c
Packit c4476c
The program B<dhparam> combines the functionality of the programs B<dh> and
Packit c4476c
B<gendh> in previous versions of OpenSSL. The B<dh> and B<gendh>
Packit c4476c
programs are retained for now but may have different purposes in future
Packit c4476c
versions of OpenSSL.
Packit c4476c
Packit c4476c
=head1 NOTES
Packit c4476c
Packit c4476c
PEM format DH parameters use the header and footer lines:
Packit c4476c
Packit c4476c
 -----BEGIN DH PARAMETERS-----
Packit c4476c
 -----END DH PARAMETERS-----
Packit c4476c
Packit c4476c
OpenSSL currently only supports the older PKCS#3 DH, not the newer X9.42
Packit c4476c
DH.
Packit c4476c
Packit c4476c
This program manipulates DH parameters not keys.
Packit c4476c
Packit c4476c
=head1 BUGS
Packit c4476c
Packit c4476c
There should be a way to generate and manipulate DH keys.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<dsaparam(1)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut