Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sbin / md5 / md5.1
1 .\" $FreeBSD: src/sbin/md5/md5.1,v 1.10.2.7 2002/06/20 23:09:06 charnier Exp $
2 .Dd February 14, 1994
3 .Dt MD5 1
4 .Os
5 .Sh NAME
6 .Nm md5
7 .Nd calculate a message-digest fingerprint (checksum) for a file
8 .Sh SYNOPSIS
9 .Nm
10 .Op Fl pqrtx
11 .Op Fl s Ar string
12 .Op Ar
13 .Sh DESCRIPTION
14 The
15 .Nm
16 utility takes as input a message of arbitrary length and produces
17 as output a 128-bit
18 .Dq fingerprint
19 or
20 .Dq message digest
21 of the input.
22 It is conjectured that it is computationally infeasible to
23 produce two messages having the same message digest, or to produce any
24 message having a given prespecified target message digest.
25 The MD5 algorithm is intended for digital signature applications, where a
26 large file must be
27 .Dq compressed
28 in a secure manner before being encrypted with a private
29 (secret)
30 key under a public-key cryptosystem such as
31 .Em RSA .
32 .Pp
33 MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been
34 made that its security is in some doubt.
35 The attacks on MD5
36 are in the nature of finding
37 .Dq collisions
38 \(em that is, multiple
39 inputs which hash to the same value; it is still unlikely for an attacker
40 to be able to determine the exact original input given a hash value.
41 .Pp
42 The following options may be used in any combination and must
43 precede any files named on the command line.
44 The MD5
45 sum of each file listed on the command line is printed after the options
46 are processed.
47 .Bl -tag -width indent
48 .It Fl s Ar string
49 Print a checksum of the given
50 .Ar string .
51 .It Fl p
52 Echo stdin to stdout and appends the MD5 sum to stdout.
53 .It Fl q
54 Quiet mode - only the MD5 sum is printed out.
55 Overrides the
56 .Fl r
57 option.
58 .It Fl r
59 Reverses the format of the output.
60 This helps with visual diffs.
61 Does nothing
62 when combined with the
63 .Fl ptx
64 options.
65 .It Fl t
66 Run a built-in time trial.
67 .It Fl x
68 Run a built-in test script.
69 .El
70 .Sh SEE ALSO
71 .Xr cksum 1
72 .Rs
73 .%A R. Rivest
74 .%T The MD5 Message-Digest Algorithm
75 .%O RFC1321
76 .Re
77 .Sh ACKNOWLEDGMENTS
78 This program is placed in the public domain for free general use by
79 RSA Data Security.