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

NAME

6       openssl-dsa - DSA key processing
7

SYNOPSIS

9       openssl dsa [-help] [-inform DER|PEM] [-outform DER|PEM] [-in filename]
10       [-passin arg] [-out filename] [-passout arg] [-aes128] [-aes192]
11       [-aes256] [-aria128] [-aria192] [-aria256] [-camellia128]
12       [-camellia192] [-camellia256] [-des] [-des3] [-idea] [-text] [-noout]
13       [-modulus] [-pubin] [-pubout] [-pvk-strong] [-pvk-weak] [-pvk-none]
14       [-engine id] [-provider name] [-provider-path path] [-propquery propq]
15

DESCRIPTION

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

OPTIONS

23       -help
24           Print out a usage message.
25
26       -inform DER|PEM
27           The key input format; unspecified by default.  See
28           openssl-format-options(1) for details.
29
30       -outform DER|PEM
31           The key output format; the default is PEM.  See
32           openssl-format-options(1) for details.
33
34           Private keys are a sequence of ASN.1 INTEGERS: the version (zero),
35           p, q, g, and the public and private key components.  Public keys
36           are a SubjectPublicKeyInfo structure with the DSA type.
37
38           The PEM format also accepts PKCS#8 data.
39
40       -in filename
41           This specifies the input filename to read a key from or standard
42           input if this option is not specified. If the key is encrypted a
43           pass phrase will be prompted for.
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       -passin arg, -passout arg
52           The password source for the input and output file.  For more
53           information about the format of arg see
54           openssl-passphrase-options(1).
55
56       -aes128, -aes192, -aes256, -aria128, -aria192, -aria256, -camellia128,
57       -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 this command can be used to remove the pass phrase from
62           a key by not giving any encryption option is given, or to add or
63           change the pass phrase by setting them.  These options can only be
64           used with PEM format output files.
65
66       -text
67           Prints out the public, private key components and parameters.
68
69       -noout
70           This option prevents output of the encoded version of the key.
71
72       -modulus
73           This option prints out the value of the public key component of the
74           key.
75
76       -pubin
77           By default, a private key is read from the input file. With this
78           option a public key is read instead.
79
80       -pubout
81           By default, a private key is output. With this option a public key
82           will be output instead. This option is automatically set if the
83           input is a public key.
84
85       -pvk-strong
86           Enable 'Strong' PVK encoding level (default).
87
88       -pvk-weak
89           Enable 'Weak' PVK encoding level.
90
91       -pvk-none
92           Don't enforce PVK encoding.
93
94       -engine id
95           See "Engine Options" in openssl(1).  This option is deprecated.
96
97       -provider name
98       -provider-path path
99       -propquery propq
100           See "Provider Options" in openssl(1), provider(7), and property(7).
101
102       The openssl-pkey(1) command is capable of performing all the operations
103       this command can, as well as supporting other public key types.
104

EXAMPLES

106       The documentation for the openssl-pkey(1) command contains examples
107       equivalent to the ones listed here.
108
109       To remove the pass phrase on a DSA private key:
110
111        openssl dsa -in key.pem -out keyout.pem
112
113       To encrypt a private key using triple DES:
114
115        openssl dsa -in key.pem -des3 -out keyout.pem
116
117       To convert a private key from PEM to DER format:
118
119        openssl dsa -in key.pem -outform DER -out keyout.der
120
121       To print out the components of a private key to standard output:
122
123        openssl dsa -in key.pem -text -noout
124
125       To just output the public part of a private key:
126
127        openssl dsa -in key.pem -pubout -out pubkey.pem
128

SEE ALSO

130       openssl(1), openssl-pkey(1), openssl-dsaparam(1), openssl-gendsa(1),
131       openssl-rsa(1), openssl-genrsa(1)
132

HISTORY

134       The -engine option was deprecated in OpenSSL 3.0.
135
137       Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
138
139       Licensed under the Apache License 2.0 (the "License").  You may not use
140       this file except in compliance with the License.  You can obtain a copy
141       in the file LICENSE in the source distribution or at
142       <https://www.openssl.org/source/license.html>.
143
144
145
1463.1.1                             2023-08-31                OPENSSL-DSA(1ossl)
Impressum