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