This commit was manufactured by cvs2svn to create branch
[openssl.git] / doc / apps / dgst.pod
1 =pod
2
3 =head1 NAME
4
5 dgst, md5, md4, md2, sha1, sha, mdc2, ripemd160 - message digests
6
7 =head1 SYNOPSIS
8
9 B<openssl> B<dgst> 
10 [B<-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1>]
11 [B<-c>]
12 [B<-d>]
13 [B<-hex>]
14 [B<-binary>]
15 [B<-out filename>]
16 [B<-sign filename>]
17 [B<-passin arg>]
18 [B<-verify filename>]
19 [B<-prverify filename>]
20 [B<-signature filename>]
21 [B<-hmac key>]
22 [B<file...>]
23
24 [B<md5|md4|md2|sha1|sha|mdc2|ripemd160>]
25 [B<-c>]
26 [B<-d>]
27 [B<file...>]
28
29 =head1 DESCRIPTION
30
31 The digest functions output the message digest of a supplied file or files
32 in hexadecimal form. They can also be used for digital signing and verification.
33
34 =head1 OPTIONS
35
36 =over 4
37
38 =item B<-c>
39
40 print out the digest in two digit groups separated by colons, only relevant if
41 B<hex> format output is used.
42
43 =item B<-d>
44
45 print out BIO debugging information.
46
47 =item B<-hex>
48
49 digest is to be output as a hex dump. This is the default case for a "normal"
50 digest as opposed to a digital signature.
51
52 =item B<-binary>
53
54 output the digest or signature in binary form.
55
56 =item B<-out filename>
57
58 filename to output to, or standard output by default.
59
60 =item B<-sign filename>
61
62 digitally sign the digest using the private key in "filename".
63
64 =item B<-passin arg>
65
66 the private key password source. For more information about the format of B<arg>
67 see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>.
68
69 =item B<-verify filename>
70
71 verify the signature using the the public key in "filename".
72 The output is either "Verification OK" or "Verification Failure".
73
74 =item B<-prverify filename>
75
76 verify the signature using the  the private key in "filename".
77
78 =item B<-signature filename>
79
80 the actual signature to verify.
81
82 =item B<-hmac key>
83
84 create a hashed MAC using "key".
85
86 =item B<-rand file(s)>
87
88 a file or files containing random data used to seed the random number
89 generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>).
90 Multiple files can be specified separated by a OS-dependent character.
91 The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
92 all others. 
93
94 =item B<file...>
95
96 file or files to digest. If no files are specified then standard input is
97 used.
98
99 =back
100
101 =head1 NOTES
102
103 The digest of choice for all new applications is SHA1. Other digests are
104 however still widely used.
105
106 If you wish to sign or verify data using the DSA algorithm then the dss1
107 digest must be used.
108
109 A source of random numbers is required for certain signing algorithms, in
110 particular DSA.
111
112 The signing and verify options should only be used if a single file is
113 being signed or verified.
114
115 =cut