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] [-des] [-des3] [-idea]
11       [-text] [-noout] [-modulus] [-pubin] [-pubout] [-engine id]
12

DESCRIPTION

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

COMMAND OPTIONS

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

NOTES

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

EXAMPLES

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

SEE ALSO

123       dsaparam(1), gendsa(1), rsa(1), genrsa(1)
124
125
126
1270.9.8b                            2003-01-30                            DSA(1)
Impressum