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