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