1 .\" $FreeBSD: src/sbin/md5/md5.1,v 1.24 2005/03/10 09:56:39 cperciva Exp $
2 .\" $DragonFly: src/sbin/md5/md5.1,v 1.8 2008/01/16 14:18:57 matthias Exp $
11 .Nd calculate a message-digest fingerprint (checksum) for a file
44 utilities take as input a message of arbitrary length and produce as
50 It is conjectured that it is computationally infeasible to
51 produce two messages having the same message digest, or to produce any
52 message having a given prespecified target message digest.
54 .Tn MD5 , SHA-1, SHA-256
57 algorithms are intended for digital signature applications, where a
60 in a secure manner before being encrypted with a private
62 key under a public-key cryptosystem such as
66 has not yet (2001-09-03) been broken, but sufficient attacks have been
67 made that its security is in some doubt.
70 are in the nature of finding
72 \(em that is, multiple
73 inputs which hash to the same value; it is still unlikely for an attacker
74 to be able to determine the exact original input given a hash value.
76 The following options may be used in any combination and must
77 precede any files named on the command line.
78 The hexadecimal checksum of each file listed on the command line is printed
79 after the options are processed.
80 .Bl -tag -width indent
82 When processing file(s), use the specified begin and/or end (below) instead
83 of processing each file in its entirety. Either option can be omitted. Both
84 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. For example, to start at 512, you
87 can use -b 512 or -b 0.5K.
89 The use of offsets is implemented using
91 and will only work on regular files and mmap-able devices.
93 If the beginning offset is negative, its absolute value is substracted
94 from the file's size. Zero thus means the very beginning of each file,
95 which is also the default if the option is omitted entirely.
97 If the end-offset is not positive, its absolute value is substracted
98 from the file's size. Zero thus means the very end of each file,
99 which is also the default if the option is omitted entirely.
101 Print a checksum of the given
104 Echo stdin to stdout and append the checksum to stdout.
106 Quiet mode - only the checksum is printed out.
111 Reverses the format of the output.
112 This helps with visual diffs.
114 when combined with the
118 Run a built-in time trial.
120 Run a built-in test script.
129 utilities exit 0 on success,
130 and EX_NOINPUT (66) if at least one of the input files could not be read or
131 invalid offsets were specified. A mistake with command line arguments
132 results in EX_USAGE (64).
140 .%T The MD5 Message-Digest Algorithm
145 .%T The Secure Hash Standard
149 .%A D. Eastlake and P. Jones
150 .%T US Secure Hash Algorithm 1
154 RIPEMD-160 is part of the ISO draft standard
155 .Qq ISO/IEC DIS 10118-3
156 on dedicated hash functions.
158 Secure Hash Standard (SHS):
159 .Pa http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf .
162 .Pa http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html .
164 This program is placed in the public domain for free general use by
167 Support for SHA-1 and RIPEMD-160 has been added by
168 .An Oliver Eikemeier Aq eik@FreeBSD.org .