Very preliminary POD format documentation for some
[openssl.git] / doc / man / dsa.pod
1 =pod
2
3 =head1 NAME
4
5 dsa - DSA key processing
6
7 =head1 SYNOPSIS
8
9 B<openssl> B<dsa>
10 [B<-inform PEM|DER>]
11 [B<-outform PEM|DER>]
12 [B<-in filename>]
13 [B<-out filename>]
14 [B<-des>]
15 [B<-des3>]
16 [B<-idea>]
17 [B<-text>]
18 [B<-noout>]
19 [B<-modulus>]
20 [B<-pubin>]
21 [B<-pubout>]
22
23 =head1 DESCRIPTION
24
25 The B<dsa> command processes DSA keys. They can be converted between various
26 forms and their components printed out. B<Note> This command uses the
27 traditional SSLeay compatible format for private key encryption: newer
28 applications should use the more secure PKCS#8 format using the B<pkcs8>
29
30 =head1 COMMAND OPTIONS
31
32 =over 4
33
34 =item B<-inform DER|PEM>
35
36 This specifies the input format. The B<DER> option with a private key uses
37 an ASN1 DER encoded form of an ASN.1 SEQUENCE consisting of the values of
38 version (currently zero), p, q, g, the public and private key components
39 respectively as ASN.1 INTEGERs. When used with a public key it outputs a
40 SEQUENCE of the public key component, p, q and g respectively.
41
42 The B<PEM> form is the default format: it consists of the B<DER> format base64
43 encoded with additional header and footer lines.
44
45 =item B<-outform DER|PEM>
46
47 This specifies the output format, the options have the same meaning as the 
48 B<-inform> option.
49
50 =item B<-in filename>
51
52 This specifies the input filename to read a key from or standard input if this
53 option is not specified. If the key is encrypted a pass phrase will be
54 prompted for.
55
56 =item B<-out filename>
57
58 This specifies the output filename to write a key to or standard output by
59 is not specified. If any encryption options are set then a pass phrase will be
60 prompted for. The output filename should B<not> be the same as the input
61 filename.
62
63 =item B<-des|-des3|-idea>
64
65 These options encrypt the private key with the DES, triple DES, or the 
66 IDEA ciphers respectively before outputting it. A pass phrase is prompted for.
67 If none of these options is specified the key is written in plain text. This
68 means that using the B<rsa> utility to read in an encrypted key with no
69 encryption option can be used to remove the pass phrase from a key, or by
70 setting the encryption options it can be use to add or change the pass phrase.
71 These options can only be used with PEM format output files.
72
73 =item B<-text>
74
75 prints out the public, private key components and parameters.
76
77 =item B<-noout>
78
79 this option prevents output of the encoded version of the key.
80
81 =item B<-modulus>
82
83 this option prints out the value of the public key component of the key.
84
85 =item B<-pubin>
86
87 by default a private key is input file with this option a public key is input
88 instead.
89
90 =item B<-pubout>
91
92 by default a private key is output. With this option a public
93 key will be output instead. This option is automatically set if the input is
94 a public key.
95
96 =back
97
98 =head1 EXAMPLES
99
100 To remove the pass phrase on a DSA private key:
101
102 C<openssl dsa -in key.pem -out keyout.pem>
103
104 To encrypt a private key using triple DES:
105
106 C<openssl dsa -in key.pem -des3 -out keyout.pem>
107
108 To convert a private key from PEM to DER format: 
109
110 C<openssl dsa -in key.pem -outform DER -out keyout.der>
111
112 To print out the components of a private key to standard output:
113
114 C<openssl dsa -in key.pem -text -noout>
115
116 To just output the public part of a private key:
117
118 C<openssl dsa -in key.pem -pubout -out pubkey.pem>
119
120 =head1 SEE ALSO
121
122 dsaparam(1), gendsa(1), rsa(1), genrsa(1)
123
124 =cut