Debian Codegraph @

upstream/debian-unstable/man1/openssl-dsa.1ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "OPENSSL-DSA 1SSL"
58 .TH OPENSSL-DSA 1SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 openssl\-dsa \- DSA key processing
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 \&\fBopenssl\fR \fBdsa\fR
68 [\fB\-help\fR]
69 [\fB\-inform\fR \fBDER\fR|\fBPEM\fR]
70 [\fB\-outform\fR \fBDER\fR|\fBPEM\fR]
71 [\fB\-in\fR \fIfilename\fR]
72 [\fB\-passin\fR \fIarg\fR]
73 [\fB\-out\fR \fIfilename\fR]
74 [\fB\-passout\fR \fIarg\fR]
75 [\fB\-aes128\fR]
76 [\fB\-aes192\fR]
77 [\fB\-aes256\fR]
78 [\fB\-aria128\fR]
79 [\fB\-aria192\fR]
80 [\fB\-aria256\fR]
81 [\fB\-camellia128\fR]
82 [\fB\-camellia192\fR]
83 [\fB\-camellia256\fR]
84 [\fB\-des\fR]
85 [\fB\-des3\fR]
86 [\fB\-idea\fR]
87 [\fB\-text\fR]
88 [\fB\-noout\fR]
89 [\fB\-modulus\fR]
90 [\fB\-pubin\fR]
91 [\fB\-pubout\fR]
92 [\fB\-pvk\-strong\fR]
93 [\fB\-pvk\-weak\fR]
94 [\fB\-pvk\-none\fR]
95 [\fB\-engine\fR \fIid\fR]
96 [\fB\-provider\fR \fIname\fR]
97 [\fB\-provider\-path\fR \fIpath\fR]
98 [\fB\-provparam\fR \fI[name:]key=value\fR]
99 [\fB\-propquery\fR \fIpropq\fR]
100 .SH DESCRIPTION
101 .IX Header "DESCRIPTION"
102 This command processes DSA keys. They can be converted between various
103 forms and their components printed out. \fBNote\fR This command uses the
104 traditional SSLeay compatible format for private key encryption: newer
105 applications should use the more secure PKCS#8 format using the \fBpkcs8\fR
106 .SH OPTIONS
107 .IX Header "OPTIONS"
108 .IP \fB\-help\fR 4
109 .IX Item "-help"
110 Print out a usage message.
111 .IP "\fB\-inform\fR \fBDER\fR|\fBPEM\fR" 4
112 .IX Item "-inform DER|PEM"
113 The key input format; unspecified by default.
114 See \fBopenssl\-format\-options\fR\|(1) for details.
115 .IP "\fB\-outform\fR \fBDER\fR|\fBPEM\fR" 4
116 .IX Item "-outform DER|PEM"
117 The key output format; the default is \fBPEM\fR.
118 See \fBopenssl\-format\-options\fR\|(1) for details.
119 .Sp
120 Private keys are a sequence of \fBASN.1 INTEGERS\fR: the version (zero), \fBp\fR,
121 \&\fBq\fR, \fBg\fR, and the public and private key components. Public keys
122 are a \fBSubjectPublicKeyInfo\fR structure with the \fBDSA\fR type.
123 .Sp
124 The \fBPEM\fR format also accepts PKCS#8 data.
125 .IP "\fB\-in\fR \fIfilename\fR" 4
126 .IX Item "-in filename"
127 This specifies the input filename to read a key from or standard input if this
128 option is not specified. If the key is encrypted a pass phrase will be
129 prompted for.
130 .IP "\fB\-out\fR \fIfilename\fR" 4
131 .IX Item "-out filename"
132 This specifies the output filename to write a key to or standard output by
133 is not specified. If any encryption options are set then a pass phrase will be
134 prompted for. The output filename should \fBnot\fR be the same as the input
135 filename.
136 .IP "\fB\-passin\fR \fIarg\fR, \fB\-passout\fR \fIarg\fR" 4
137 .IX Item "-passin arg, -passout arg"
138 The password source for the input and output file.
139 For more information about the format of \fBarg\fR
140 see \fBopenssl\-passphrase\-options\fR\|(1).
141 .IP "\fB\-aes128\fR, \fB\-aes192\fR, \fB\-aes256\fR, \fB\-aria128\fR, \fB\-aria192\fR, \fB\-aria256\fR, \fB\-camellia128\fR, \fB\-camellia192\fR, \fB\-camellia256\fR, \fB\-des\fR, \fB\-des3\fR, \fB\-idea\fR" 4
142 .IX Item "-aes128, -aes192, -aes256, -aria128, -aria192, -aria256, -camellia128, -camellia192, -camellia256, -des, -des3, -idea"
143 These options encrypt the private key with the specified
144 cipher before outputting it. A pass phrase is prompted for.
145 If none of these options is specified the key is written in plain text. This
146 means that this command can be used to remove the pass phrase from a key
147 by not giving any encryption option is given, or to add or change the pass
148 phrase by setting them.
149 These options can only be used with PEM format output files.
150 .IP \fB\-text\fR 4
151 .IX Item "-text"
152 Prints out the public, private key components and parameters.
153 .IP \fB\-noout\fR 4
154 .IX Item "-noout"
155 This option prevents output of the encoded version of the key.
156 .IP \fB\-modulus\fR 4
157 .IX Item "-modulus"
158 This option prints out the value of the public key component of the key.
159 .IP \fB\-pubin\fR 4
160 .IX Item "-pubin"
161 By default, a private key is read from the input.
162 With this option a public key is read instead.
163 If the input contains no public key but a private key, its public part is used.
164 .IP \fB\-pubout\fR 4
165 .IX Item "-pubout"
166 By default, a private key is output. With this option a public
167 key will be output instead. This option is automatically set if the input is
168 a public key.
169 .IP \fB\-pvk\-strong\fR 4
170 .IX Item "-pvk-strong"
171 Enable 'Strong' PVK encoding level (default).
172 .IP \fB\-pvk\-weak\fR 4
173 .IX Item "-pvk-weak"
174 Enable 'Weak' PVK encoding level.
175 .IP \fB\-pvk\-none\fR 4
176 .IX Item "-pvk-none"
177 Don't enforce PVK encoding.
178 .IP "\fB\-engine\fR \fIid\fR" 4
179 .IX Item "-engine id"
180 See "Engine Options" in \fBopenssl\fR\|(1).
181 This option is deprecated.
182 .IP "\fB\-provider\fR \fIname\fR" 4
183 .IX Item "-provider name"
184 .PD 0
185 .IP "\fB\-provider\-path\fR \fIpath\fR" 4
186 .IX Item "-provider-path path"
187 .IP "\fB\-provparam\fR \fI[name:]key=value\fR" 4
188 .IX Item "-provparam [name:]key=value"
189 .IP "\fB\-propquery\fR \fIpropq\fR" 4
190 .IX Item "-propquery propq"
191 .PD
192 See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
193 .PP
194 The \fBopenssl\-pkey\fR\|(1) command is capable of performing all the operations
195 this command can, as well as supporting other public key types.
196 .SH EXAMPLES
197 .IX Header "EXAMPLES"
198 The documentation for the \fBopenssl\-pkey\fR\|(1) command contains examples
199 equivalent to the ones listed here.
200 .PP
201 To remove the pass phrase on a DSA private key:
202 .PP
203 .Vb 1
204 \& openssl dsa \-in key.pem \-out keyout.pem
205 .Ve
206 .PP
207 To encrypt a private key using triple DES:
208 .PP
209 .Vb 1
210 \& openssl dsa \-in key.pem \-des3 \-out keyout.pem
211 .Ve
212 .PP
213 To convert a private key from PEM to DER format:
214 .PP
215 .Vb 1
216 \& openssl dsa \-in key.pem \-outform DER \-out keyout.der
217 .Ve
218 .PP
219 To print out the components of a private key to standard output:
220 .PP
221 .Vb 1
222 \& openssl dsa \-in key.pem \-text \-noout
223 .Ve
224 .PP
225 To just output the public part of a private key:
226 .PP
227 .Vb 1
228 \& openssl dsa \-in key.pem \-pubout \-out pubkey.pem
229 .Ve
230 .SH "SEE ALSO"
231 .IX Header "SEE ALSO"
232 \&\fBopenssl\fR\|(1),
233 \&\fBopenssl\-pkey\fR\|(1),
234 \&\fBopenssl\-dsaparam\fR\|(1),
235 \&\fBopenssl\-gendsa\fR\|(1),
236 \&\fBopenssl\-rsa\fR\|(1),
237 \&\fBopenssl\-genrsa\fR\|(1)
238 .SH HISTORY
239 .IX Header "HISTORY"
240 The \fB\-engine\fR option was deprecated in OpenSSL 3.0.
241 .SH COPYRIGHT
242 .IX Header "COPYRIGHT"
243 Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
244 .PP
245 Licensed under the Apache License 2.0 (the "License"). You may not use
246 this file except in compliance with the License. You can obtain a copy
247 in the file LICENSE in the source distribution or at
248 <https://www.openssl.org/source/license.html>.