1 .\" $FreeBSD: src/sbin/md5/md5.1,v 1.24 2005/03/10 09:56:39 cperciva Exp $
10 .Nd calculate a message-digest fingerprint (checksum) for a file
43 utilities take as input a message of arbitrary length and produce as
49 It is conjectured that it is computationally infeasible to
50 produce two messages having the same message digest, or to produce any
51 message having a given prespecified target message digest.
53 .Tn MD5 , SHA-1, SHA-256
56 algorithms are intended for digital signature applications, where a
59 in a secure manner before being encrypted with a private
61 key under a public-key cryptosystem such as
65 has not yet (2001-09-03) been broken, but sufficient attacks have been
66 made that its security is in some doubt.
69 are in the nature of finding
71 \(em that is, multiple
72 inputs which hash to the same value; it is still unlikely for an attacker
73 to be able to determine the exact original input given a hash value.
75 The following options may be used in any combination and must
76 precede any files named on the command line.
77 The hexadecimal checksum of each file listed on the command line is printed
78 after the options are processed.
79 .Bl -tag -width indent
81 When processing file(s), use the specified begin and/or end (below) instead
82 of processing each file in its entirety.
83 Either option can be omitted.
84 Both begin- and end-offsets can be specified as just a number (of bytes) or
85 be followed by K, M, or G to mean that the number is to be multiplied by
86 1024 once, twice, or thrice respectively.
87 For example, to start at 512, you can use
92 The use of offsets is implemented using
94 and will only work on regular files and mmap-able devices.
96 If the beginning offset is negative, its absolute value is subtracted
98 Zero thus means the very beginning of each file,
99 which is also the default if the option is omitted entirely.
101 If the end-offset is not positive, its absolute value is subtracted
102 from the file's size.
103 Zero thus means the very end of each file,
104 which is also the default if the option is omitted entirely.
106 Print a checksum of the given
109 Echo stdin to stdout and append the checksum to stdout.
111 Quiet mode - 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.
134 utilities exit 0 on success, and
136 if at least one of the input files could not be read or
137 invalid offsets were specified.
138 A mistake with command line arguments results in
148 .%T The MD5 Message-Digest Algorithm
153 .%T The Secure Hash Standard
157 .%A D. Eastlake and P. Jones
158 .%T US Secure Hash Algorithm 1
162 RIPEMD-160 is part of the ISO draft standard
163 .Qq ISO/IEC DIS 10118-3
164 on dedicated hash functions.
166 Secure Hash Standard (SHS):
167 .Pa http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf .
170 .Pa http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html .
172 This program is placed in the public domain for free general use by
175 Support for SHA-1 and RIPEMD-160 has been added by
176 .An Oliver Eikemeier Aq Mt eik@FreeBSD.org .