1DGST(1) OpenSSL DGST(1)
2
3
4
6 dgst, md5, md4, md2, sha1, sha, mdc2, ripemd160 - message digests
7
9 openssl dgst [-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1] [-c]
10 [-d] [-hex] [-binary] [-out filename] [-sign filename] [-keyform arg]
11 [-passin arg] [-verify filename] [-prverify filename] [-signature
12 filename] [-hmac key] [file...]
13
14 [md5|md4|md2|sha1|sha|mdc2|ripemd160] [-c] [-d] [file...]
15
17 The digest functions output the message digest of a supplied file or
18 files in hexadecimal form. They can also be used for digital signing
19 and verification.
20
22 -c print out the digest in two digit groups separated by colons, only
23 relevant if hex format output is used.
24
25 -d print out BIO debugging information.
26
27 -hex
28 digest is to be output as a hex dump. This is the default case for
29 a "normal" digest as opposed to a digital signature.
30
31 -binary
32 output the digest or signature in binary form.
33
34 -out filename
35 filename to output to, or standard output by default.
36
37 -sign filename
38 digitally sign the digest using the private key in "filename".
39
40 -keyform arg
41 Specifies the key format to sign digest with. Only PEM and ENGINE
42 formats are supported by the dgst command.
43
44 -engine id
45 Use engine id for operations (including private key storage). This
46 engine is not used as source for digest algorithms, unless it is
47 also specified in the configuration file.
48
49 -sigopt nm:v
50 Pass options to the signature algorithm during sign or verify
51 operations. Names and values of these options are algorithm-
52 specific.
53
54 -passin arg
55 the private key password source. For more information about the
56 format of arg see the PASS PHRASE ARGUMENTS section in openssl(1).
57
58 -verify filename
59 verify the signature using the the public key in "filename". The
60 output is either "Verification OK" or "Verification Failure".
61
62 -prverify filename
63 verify the signature using the the private key in "filename".
64
65 -signature filename
66 the actual signature to verify.
67
68 -hmac key
69 create a hashed MAC using "key".
70
71 -mac alg
72 create MAC (keyed Message Authentication Code). The most popular
73 MAC algorithm is HMAC (hash-based MAC), but there are other MAC
74 algorithms which are not based on hash, for instance gost-mac
75 algorithm, supported by ccgost engine. MAC keys and other options
76 should be set via -macopt parameter.
77
78 -macopt nm:v
79 Passes options to MAC algorithm, specified by -mac key. Following
80 options are supported by both by HMAC and gost-mac:
81
82 key:string
83 Specifies MAC key as alphnumeric string (use if key contain
84 printable characters only). String length must conform to
85 any restrictions of the MAC algorithm for example exactly
86 32 chars for gost-mac.
87
88 hexkey:string
89 Specifies MAC key in hexadecimal form (two hex digits per
90 byte). Key length must conform to any restrictions of the
91 MAC algorithm for example exactly 32 chars for gost-mac.
92
93 -rand file(s)
94 a file or files containing random data used to seed the random
95 number generator, or an EGD socket (see RAND_egd(3)). Multiple
96 files can be specified separated by a OS-dependent character. The
97 separator is ; for MS-Windows, , for OpenVMS, and : for all others.
98
99 file...
100 file or files to digest. If no files are specified then standard
101 input is used.
102
104 The digest of choice for all new applications is SHA1. Other digests
105 are however still widely used.
106
107 If you wish to sign or verify data using the DSA algorithm then the
108 dss1 digest must be used.
109
110 A source of random numbers is required for certain signing algorithms,
111 in particular DSA.
112
113 The signing and verify options should only be used if a single file is
114 being signed or verified.
115
116
117
1181.0.1e 2013-02-11 DGST(1)