6 .Nm md5 , sha1 , sha256 , sha384 , sha512, sha512t256, rmd160
7 .Nd calculate a message-digest fingerprint (checksum) for a file
46 .Nm md5 , sha1 , sha256 , sha384 , sha512, sha512t256
49 utilities take as input a message of arbitrary length and produce as
55 It is conjectured that it is computationally infeasible to
56 produce two messages having the same message digest, or to produce any
57 message having a given prespecified target message digest.
59 .Tn MD5 , SHA-1 , SHA-256 , SHA-384 , SHA-512
62 algorithms are intended for digital signature applications, where a
65 in a secure manner before being encrypted with a private
67 key under a public-key cryptosystem such as
74 algorithms have been proven to be vulnerable to practical collision
75 attacks and should not be relied upon to produce unique outputs, nor
76 should they be used as part of a cryptographic signature scheme.
77 As of 2016-03-02, there is no publicly known method to
79 either algorithm, i.e. to find an input that produces a specific
85 truncated to only 256 bits.
86 On 64-bit hardware, this algorithm is approximately 50% faster than
88 but with the same level of security.
89 The hashes are not interchangeable.
91 It is recommended that all new applications use
95 instead of one of the other hash functions.
97 The following options may be used in any combination and must
98 precede any files named on the command line.
99 The hexadecimal checksum of each file listed on the command line is printed
100 after the options are processed.
101 .Bl -tag -width indent
103 Compare the digest of the file against this string.
104 .Pq Note that this option is not yet useful if multiple files are specified.
106 Print a checksum of the given
109 Echo stdin to stdout and append the checksum to stdout.
111 Quiet mode \(em only the checksum is printed out.
116 Reverses the format of the output.
117 This helps with visual diffs.
119 when combined with the
123 Run a built-in time trial.
125 Run a built-in test script.
129 .Nm md5 , sha1 , sha256 , sha512, sha512t256
132 utilities exit 0 on success,
133 1 if at least one of the input files could not be read,
134 and 2 if at least one file does not have the same hash as the
147 .%T The MD5 Message-Digest Algorithm
152 .%T The Secure Hash Standard
156 .%A D. Eastlake and P. Jones
157 .%T US Secure Hash Algorithm 1
161 RIPEMD-160 is part of the ISO draft standard
162 .Qq ISO/IEC DIS 10118-3
163 on dedicated hash functions.
165 Secure Hash Standard (SHS):
166 .Pa http://csrc.nist.gov/cryptval/shs.html .
169 .Pa http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html .
171 This program is placed in the public domain for free general use by
174 Support for SHA-1 and RIPEMD-160 has been added by
175 .An Oliver Eikemeier Aq Mt eik@FreeBSD.org .