Blame doc/man1/dsa.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
openssl-dsa,
Packit c4476c
dsa - DSA key processing
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
B<openssl> B<dsa>
Packit c4476c
[B<-help>]
Packit c4476c
[B<-inform PEM|DER>]
Packit c4476c
[B<-outform PEM|DER>]
Packit c4476c
[B<-in filename>]
Packit c4476c
[B<-passin arg>]
Packit c4476c
[B<-out filename>]
Packit c4476c
[B<-passout arg>]
Packit c4476c
[B<-aes128>]
Packit c4476c
[B<-aes192>]
Packit c4476c
[B<-aes256>]
Packit c4476c
[B<-aria128>]
Packit c4476c
[B<-aria192>]
Packit c4476c
[B<-aria256>]
Packit c4476c
[B<-camellia128>]
Packit c4476c
[B<-camellia192>]
Packit c4476c
[B<-camellia256>]
Packit c4476c
[B<-des>]
Packit c4476c
[B<-des3>]
Packit c4476c
[B<-idea>]
Packit c4476c
[B<-text>]
Packit c4476c
[B<-noout>]
Packit c4476c
[B<-modulus>]
Packit c4476c
[B<-pubin>]
Packit c4476c
[B<-pubout>]
Packit c4476c
[B<-engine id>]
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
The B<dsa> command processes DSA keys. They can be converted between various
Packit c4476c
forms and their components printed out. B<Note> This command uses the
Packit c4476c
traditional SSLeay compatible format for private key encryption: newer
Packit c4476c
applications should use the more secure PKCS#8 format using the B<pkcs8>
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 with a private key uses
Packit c4476c
an ASN1 DER encoded form of an ASN.1 SEQUENCE consisting of the values of
Packit c4476c
version (currently zero), p, q, g, the public and private key components
Packit c4476c
respectively as ASN.1 INTEGERs. When used with a public key it uses a
Packit c4476c
SubjectPublicKeyInfo structure: it is an error if the key is not DSA.
Packit c4476c
Packit c4476c
The B<PEM> form is the default format: it consists of the B<DER> format base64
Packit c4476c
encoded with additional header and footer lines. In the case of a private key
Packit c4476c
PKCS#8 format is also accepted.
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 filename>
Packit c4476c
Packit c4476c
This specifies the input filename to read a key from or standard input if this
Packit c4476c
option is not specified. If the key is encrypted a pass phrase will be
Packit c4476c
prompted for.
Packit c4476c
Packit c4476c
=item B<-passin arg>
Packit c4476c
Packit c4476c
The input file password source. For more information about the format of B<arg>
Packit c4476c
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
Packit c4476c
Packit c4476c
=item B<-out filename>
Packit c4476c
Packit c4476c
This specifies the output filename to write a key to or standard output by
Packit c4476c
is not specified. If any encryption options are set then a pass phrase will be
Packit c4476c
prompted for. The output filename should B<not> be the same as the input
Packit c4476c
filename.
Packit c4476c
Packit c4476c
=item B<-passout arg>
Packit c4476c
Packit c4476c
The output file password source. For more information about the format of B<arg>
Packit c4476c
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
Packit c4476c
Packit c4476c
=item B<-aes128>, B<-aes192>, B<-aes256>, B<-aria128>, B<-aria192>, B<-aria256>, B<-camellia128>, B<-camellia192>, B<-camellia256>, B<-des>, B<-des3>, B<-idea>
Packit c4476c
Packit c4476c
These options encrypt the private key with the specified
Packit c4476c
cipher before outputting it. A pass phrase is prompted for.
Packit c4476c
If none of these options is specified the key is written in plain text. This
Packit c4476c
means that using the B<dsa> utility to read in an encrypted key with no
Packit c4476c
encryption option can be used to remove the pass phrase from a key, or by
Packit c4476c
setting the encryption options it can be use to add or change the pass phrase.
Packit c4476c
These options can only be used with PEM format output files.
Packit c4476c
Packit c4476c
=item B<-text>
Packit c4476c
Packit c4476c
Prints out the public, private key components and parameters.
Packit c4476c
Packit c4476c
=item B<-noout>
Packit c4476c
Packit c4476c
This option prevents output of the encoded version of the key.
Packit c4476c
Packit c4476c
=item B<-modulus>
Packit c4476c
Packit c4476c
This option prints out the value of the public key component of the key.
Packit c4476c
Packit c4476c
=item B<-pubin>
Packit c4476c
Packit c4476c
By default, a private key is read from the input file. With this option a
Packit c4476c
public key is read instead.
Packit c4476c
Packit c4476c
=item B<-pubout>
Packit c4476c
Packit c4476c
By default, a private key is output. With this option a public
Packit c4476c
key will be output instead. This option is automatically set if the input is
Packit c4476c
a public key.
Packit c4476c
Packit c4476c
=item B<-engine id>
Packit c4476c
Packit c4476c
Specifying an engine (by its unique B<id> string) will cause B<dsa>
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 NOTES
Packit c4476c
Packit c4476c
The PEM private key format uses the header and footer lines:
Packit c4476c
Packit c4476c
 -----BEGIN DSA PRIVATE KEY-----
Packit c4476c
 -----END DSA PRIVATE KEY-----
Packit c4476c
Packit c4476c
The PEM public key format uses the header and footer lines:
Packit c4476c
Packit c4476c
 -----BEGIN PUBLIC KEY-----
Packit c4476c
 -----END PUBLIC KEY-----
Packit c4476c
Packit c4476c
=head1 EXAMPLES
Packit c4476c
Packit c4476c
To remove the pass phrase on a DSA private key:
Packit c4476c
Packit c4476c
 openssl dsa -in key.pem -out keyout.pem
Packit c4476c
Packit c4476c
To encrypt a private key using triple DES:
Packit c4476c
Packit c4476c
 openssl dsa -in key.pem -des3 -out keyout.pem
Packit c4476c
Packit c4476c
To convert a private key from PEM to DER format:
Packit c4476c
Packit c4476c
 openssl dsa -in key.pem -outform DER -out keyout.der
Packit c4476c
Packit c4476c
To print out the components of a private key to standard output:
Packit c4476c
Packit c4476c
 openssl dsa -in key.pem -text -noout
Packit c4476c
Packit c4476c
To just output the public part of a private key:
Packit c4476c
Packit c4476c
 openssl dsa -in key.pem -pubout -out pubkey.pem
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<dsaparam(1)>, L<gendsa(1)>, L<rsa(1)>,
Packit c4476c
L<genrsa(1)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2000-2018 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