5 dgst, md5, md4, md2, sha1, sha, mdc2, ripemd160 - message digests
10 [B<-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1>]
20 [B<-prverify filename>]
21 [B<-signature filename>]
25 [B<md5|md4|md2|sha1|sha|mdc2|ripemd160>]
32 The digest functions output the message digest of a supplied file or files
33 in hexadecimal form. They can also be used for digital signing and verification.
41 print out the digest in two digit groups separated by colons, only relevant if
42 B<hex> format output is used.
46 print out BIO debugging information.
50 digest is to be output as a hex dump. This is the default case for a "normal"
51 digest as opposed to a digital signature.
55 output the digest or signature in binary form.
57 =item B<-out filename>
59 filename to output to, or standard output by default.
61 =item B<-sign filename>
63 digitally sign the digest using the private key in "filename".
67 Specifies the key format to sign digest with. Only PEM and ENGINE
68 formats are supported by the B<dgst> command.
72 Use engine B<id> for operations (including private key storage).
73 This engine is not used as source for digest algorithms, unless it is
74 also specified in the configuration file.
78 Pass options to the signature algorithm during sign or verify operations.
79 Names and values of these options are algorithm-specific.
84 the private key password source. For more information about the format of B<arg>
85 see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)|openssl(1)>.
87 =item B<-verify filename>
89 verify the signature using the the public key in "filename".
90 The output is either "Verification OK" or "Verification Failure".
92 =item B<-prverify filename>
94 verify the signature using the the private key in "filename".
96 =item B<-signature filename>
98 the actual signature to verify.
102 create a hashed MAC using "key".
106 create MAC (keyed Message Authentication Code). The most popular MAC
107 algorithm is HMAC (hash-based MAC), but there are other MAC algorithms
108 which are not based on hash, for instance B<gost-mac> algorithm,
109 supported by B<ccgost> engine. MAC keys and other options should be set
110 via B<-macopt> parameter.
112 =item B<-macopt nm:v>
114 Passes options to MAC algorithm, specified by B<-mac> key.
115 Following options are supported by both by B<HMAC> and B<gost-mac>:
121 Specifies MAC key as alphnumeric string (use if key contain printable
122 characters only). String length must conform to any restrictions of
123 the MAC algorithm for example exactly 32 chars for gost-mac.
125 =item B<hexkey:string>
127 Specifies MAC key in hexadecimal form (two hex digits per byte).
128 Key length must conform to any restrictions of the MAC algorithm
129 for example exactly 32 chars for gost-mac.
133 =item B<-rand file(s)>
135 a file or files containing random data used to seed the random number
136 generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>).
137 Multiple files can be specified separated by a OS-dependent character.
138 The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
143 file or files to digest. If no files are specified then standard input is
150 The digest of choice for all new applications is SHA1. Other digests are
151 however still widely used.
153 If you wish to sign or verify data using the DSA algorithm then the dss1
156 A source of random numbers is required for certain signing algorithms, in
159 The signing and verify options should only be used if a single file is
160 being signed or verified.