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