1DSA(1)                              OpenSSL                             DSA(1)
2
3
4

NAME

6       dsa - DSA key processing
7

SYNOPSIS

9       openssl dsa [-inform PEM|DER] [-outform PEM|DER] [-in filename]
10       [-passin arg] [-out filename] [-passout arg] [-aes128] [-aes192]
11       [-aes256] [-camellia128] [-camellia192] [-camellia256] [-des] [-des3]
12       [-idea] [-text] [-noout] [-modulus] [-pubin] [-pubout] [-engine id]
13

DESCRIPTION

15       The dsa command processes DSA keys. They can be converted between
16       various forms and their components printed out. Note This command uses
17       the traditional SSLeay compatible format for private key encryption:
18       newer applications should use the more secure PKCS#8 format using the
19       pkcs8
20

COMMAND OPTIONS

22       -inform DER|PEM
23           This specifies the input format. The DER option with a private key
24           uses an ASN1 DER encoded form of an ASN.1 SEQUENCE consisting of
25           the values of version (currently zero), p, q, g, the public and
26           private key components respectively as ASN.1 INTEGERs. When used
27           with a public key it uses a SubjectPublicKeyInfo structure: it is
28           an error if the key is not DSA.
29
30           The PEM form is the default format: it consists of the DER format
31           base64 encoded with additional header and footer lines. In the case
32           of a private key PKCS#8 format is also accepted.
33
34       -outform DER|PEM
35           This specifies the output format, the options have the same meaning
36           as the -inform option.
37
38       -in filename
39           This specifies the input filename to read a key from or standard
40           input if this option is not specified. If the key is encrypted a
41           pass phrase will be prompted for.
42
43       -passin arg
44           the input file password source. For more information about the
45           format of arg see the PASS PHRASE ARGUMENTS section in openssl(1).
46
47       -out filename
48           This specifies the output filename to write a key to or standard
49           output by is not specified. If any encryption options are set then
50           a pass phrase will be prompted for. The output filename should not
51           be the same as the input filename.
52
53       -passout arg
54           the output file password source. For more information about the
55           format of arg see the PASS PHRASE ARGUMENTS section in openssl(1).
56
57       -aes128|-aes192|-aes256|-camellia128|-camellia192|-camellia256|-des|-des3|-idea
58           These options encrypt the private key with the specified cipher
59           before outputting it. A pass phrase is prompted for.  If none of
60           these options is specified the key is written in plain text. This
61           means that using the dsa utility to read in an encrypted key with
62           no encryption option can be used to remove the pass phrase from a
63           key, or by setting the encryption options it can be use to add or
64           change the pass phrase.  These options can only be used with PEM
65           format output files.
66
67       -text
68           prints out the public, private key components and parameters.
69
70       -noout
71           this option prevents output of the encoded version of the key.
72
73       -modulus
74           this option prints out the value of the public key component of the
75           key.
76
77       -pubin
78           by default a private key is read from the input file: with this
79           option a public key is read instead.
80
81       -pubout
82           by default a private key is output. With this option a public key
83           will be output instead. This option is automatically set if the
84           input is a public key.
85
86       -engine id
87           specifying an engine (by its unique id string) will cause dsa to
88           attempt to obtain a functional reference to the specified engine,
89           thus initialising it if needed. The engine will then be set as the
90           default for all available algorithms.
91

NOTES

93       The PEM private key format uses the header and footer lines:
94
95        -----BEGIN DSA PRIVATE KEY-----
96        -----END DSA PRIVATE KEY-----
97
98       The PEM public key format uses the header and footer lines:
99
100        -----BEGIN PUBLIC KEY-----
101        -----END PUBLIC KEY-----
102

EXAMPLES

104       To remove the pass phrase on a DSA private key:
105
106        openssl dsa -in key.pem -out keyout.pem
107
108       To encrypt a private key using triple DES:
109
110        openssl dsa -in key.pem -des3 -out keyout.pem
111
112       To convert a private key from PEM to DER format:
113
114        openssl dsa -in key.pem -outform DER -out keyout.der
115
116       To print out the components of a private key to standard output:
117
118        openssl dsa -in key.pem -text -noout
119
120       To just output the public part of a private key:
121
122        openssl dsa -in key.pem -pubout -out pubkey.pem
123

SEE ALSO

125       dsaparam(1), gendsa(1), rsa(1), genrsa(1)
126
127
128
1291.0.2k                            2017-01-26                            DSA(1)
Impressum