xref: /dragonfly/sbin/md5/md5.1 (revision 984263bc)
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
14The
15.Nm
16utility takes as input a message of arbitrary length and produces
17as output a 128-bit
18.Dq fingerprint
19or
20.Dq message digest
21of the input.
22It is conjectured that it is computationally infeasible to
23produce two messages having the same message digest, or to produce any
24message having a given prespecified target message digest.
25The MD5 algorithm is intended for digital signature applications, where a
26large file must be
27.Dq compressed
28in a secure manner before being encrypted with a private
29(secret)
30key under a public-key cryptosystem such as
31.Em RSA .
32.Pp
33MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been
34made that its security is in some doubt.
35The attacks on MD5
36are in the nature of finding
37.Dq collisions
38\(em that is, multiple
39inputs which hash to the same value; it is still unlikely for an attacker
40to be able to determine the exact original input given a hash value.
41.Pp
42The following options may be used in any combination and must
43precede any files named on the command line.
44The MD5
45sum of each file listed on the command line is printed after the options
46are processed.
47.Bl -tag -width indent
48.It Fl s Ar string
49Print a checksum of the given
50.Ar string .
51.It Fl p
52Echo stdin to stdout and appends the MD5 sum to stdout.
53.It Fl q
54Quiet mode - only the MD5 sum is printed out.
55Overrides the
56.Fl r
57option.
58.It Fl r
59Reverses the format of the output.
60This helps with visual diffs.
61Does nothing
62when combined with the
63.Fl ptx
64options.
65.It Fl t
66Run a built-in time trial.
67.It Fl x
68Run 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
78This program is placed in the public domain for free general use by
79RSA Data Security.
80