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