summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/doc/apps/dsa.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/doc/apps/dsa.pod')
-rw-r--r--src/lib/libssl/src/doc/apps/dsa.pod150
1 files changed, 150 insertions, 0 deletions
diff --git a/src/lib/libssl/src/doc/apps/dsa.pod b/src/lib/libssl/src/doc/apps/dsa.pod
new file mode 100644
index 0000000000..28e534bb95
--- /dev/null
+++ b/src/lib/libssl/src/doc/apps/dsa.pod
@@ -0,0 +1,150 @@
1=pod
2
3=head1 NAME
4
5dsa - DSA key processing
6
7=head1 SYNOPSIS
8
9B<openssl> B<dsa>
10[B<-inform PEM|DER>]
11[B<-outform PEM|DER>]
12[B<-in filename>]
13[B<-passin arg>]
14[B<-out filename>]
15[B<-passout arg>]
16[B<-des>]
17[B<-des3>]
18[B<-idea>]
19[B<-text>]
20[B<-noout>]
21[B<-modulus>]
22[B<-pubin>]
23[B<-pubout>]
24
25=head1 DESCRIPTION
26
27The B<dsa> command processes DSA keys. They can be converted between various
28forms and their components printed out. B<Note> This command uses the
29traditional SSLeay compatible format for private key encryption: newer
30applications should use the more secure PKCS#8 format using the B<pkcs8>
31
32=head1 COMMAND OPTIONS
33
34=over 4
35
36=item B<-inform DER|PEM>
37
38This specifies the input format. The B<DER> option with a private key uses
39an ASN1 DER encoded form of an ASN.1 SEQUENCE consisting of the values of
40version (currently zero), p, q, g, the public and private key components
41respectively as ASN.1 INTEGERs. When used with a public key it uses a
42SubjectPublicKeyInfo structure: it is an error if the key is not DSA.
43
44The B<PEM> form is the default format: it consists of the B<DER> format base64
45encoded with additional header and footer lines. In the case of a private key
46PKCS#8 format is also accepted.
47
48=item B<-outform DER|PEM>
49
50This specifies the output format, the options have the same meaning as the
51B<-inform> option.
52
53=item B<-in filename>
54
55This specifies the input filename to read a key from or standard input if this
56option is not specified. If the key is encrypted a pass phrase will be
57prompted for.
58
59=item B<-passin arg>
60
61the input file password source. For more information about the format of B<arg>
62see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>.
63
64=item B<-out filename>
65
66This specifies the output filename to write a key to or standard output by
67is not specified. If any encryption options are set then a pass phrase will be
68prompted for. The output filename should B<not> be the same as the input
69filename.
70
71=item B<-passout arg>
72
73the output file password source. For more information about the format of B<arg>
74see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>.
75
76=item B<-des|-des3|-idea>
77
78These options encrypt the private key with the DES, triple DES, or the
79IDEA ciphers respectively before outputting it. A pass phrase is prompted for.
80If none of these options is specified the key is written in plain text. This
81means that using the B<dsa> utility to read in an encrypted key with no
82encryption option can be used to remove the pass phrase from a key, or by
83setting the encryption options it can be use to add or change the pass phrase.
84These options can only be used with PEM format output files.
85
86=item B<-text>
87
88prints out the public, private key components and parameters.
89
90=item B<-noout>
91
92this option prevents output of the encoded version of the key.
93
94=item B<-modulus>
95
96this option prints out the value of the public key component of the key.
97
98=item B<-pubin>
99
100by default a private key is read from the input file: with this option a
101public key is read instead.
102
103=item B<-pubout>
104
105by default a private key is output. With this option a public
106key will be output instead. This option is automatically set if the input is
107a public key.
108
109=back
110
111=head1 NOTES
112
113The PEM private key format uses the header and footer lines:
114
115 -----BEGIN DSA PRIVATE KEY-----
116 -----END DSA PRIVATE KEY-----
117
118The PEM public key format uses the header and footer lines:
119
120 -----BEGIN PUBLIC KEY-----
121 -----END PUBLIC KEY-----
122
123=head1 EXAMPLES
124
125To remove the pass phrase on a DSA private key:
126
127 openssl dsa -in key.pem -out keyout.pem
128
129To encrypt a private key using triple DES:
130
131 openssl dsa -in key.pem -des3 -out keyout.pem
132
133To convert a private key from PEM to DER format:
134
135 openssl dsa -in key.pem -outform DER -out keyout.der
136
137To print out the components of a private key to standard output:
138
139 openssl dsa -in key.pem -text -noout
140
141To just output the public part of a private key:
142
143 openssl dsa -in key.pem -pubout -out pubkey.pem
144
145=head1 SEE ALSO
146
147L<dsaparam(1)|dsaparam(1)>, L<gendsa(1)|gendsa(1)>, L<rsa(1)|rsa(1)>,
148L<genrsa(1)|genrsa(1)>
149
150=cut