xref: /dragonfly/sbin/md5/md5.1 (revision 1bf4b486)
1.\" $FreeBSD: src/sbin/md5/md5.1,v 1.23 2005/01/17 07:44:09 ru Exp $
2.\" $DragonFly: src/sbin/md5/md5.1,v 1.4 2005/04/21 17:09:06 asmodai Exp $
3.Dd June 6, 2004
4.Dt MD5 1
5.Os
6.Sh NAME
7.Nm md5 , sha1 , rmd160
8.Nd calculate a message-digest fingerprint (checksum) for a file
9.Sh SYNOPSIS
10.Nm md5
11.Op Fl pqrtx
12.Op Fl s Ar string
13.Op Ar
14.Nm sha1
15.Op Fl pqrtx
16.Op Fl s Ar string
17.Op Ar
18.Nm rmd160
19.Op Fl pqrtx
20.Op Fl s Ar string
21.Op Ar
22.Sh DESCRIPTION
23The
24.Nm md5 , sha1
25and
26.Nm rmd160
27utilities take as input a message of arbitrary length and produce as
28output a
29.Dq fingerprint
30or
31.Dq message digest
32of the input.
33It is conjectured that it is computationally infeasible to
34produce two messages having the same message digest, or to produce any
35message having a given prespecified target message digest.
36The
37.Tn MD5 , SHA-1
38and
39.Tn RIPEMD-160
40algorithms are intended for digital signature applications, where a
41large file must be
42.Dq compressed
43in a secure manner before being encrypted with a private
44(secret)
45key under a public-key cryptosystem such as
46.Tn RSA .
47.Pp
48.Tn MD5
49has not yet (2001-09-03) been broken, but sufficient attacks have been
50made that its security is in some doubt.
51The attacks on
52.Tn MD5
53are in the nature of finding
54.Dq collisions
55\(em that is, multiple
56inputs which hash to the same value; it is still unlikely for an attacker
57to be able to determine the exact original input given a hash value.
58.Pp
59The following options may be used in any combination and must
60precede any files named on the command line.
61The hexadecimal checksum of each file listed on the command line is printed
62after the options are processed.
63.Bl -tag -width indent
64.It Fl s Ar string
65Print a checksum of the given
66.Ar string .
67.It Fl p
68Echo stdin to stdout and append the checksum to stdout.
69.It Fl q
70Quiet mode - only the checksum is printed out.
71Overrides the
72.Fl r
73option.
74.It Fl r
75Reverses the format of the output.
76This helps with visual diffs.
77Does nothing
78when combined with the
79.Fl ptx
80options.
81.It Fl t
82Run a built-in time trial.
83.It Fl x
84Run a built-in test script.
85.El
86.Sh DIAGNOSTICS
87The
88.Nm md5 , sha1
89and
90.Nm rmd160
91utilities exit 0 on success,
92and 1 if at least one of the input files could not be read.
93.Sh SEE ALSO
94.Xr cksum 1 ,
95.Xr md5 3 ,
96.Xr ripemd 3 ,
97.Xr sha 3
98.Rs
99.%A R. Rivest
100.%T The MD5 Message-Digest Algorithm
101.%O RFC1321
102.Re
103.Rs
104.%A J. Burrows
105.%T The Secure Hash Standard
106.%O FIPS PUB 180-1
107.Re
108.Rs
109.%A D. Eastlake and P. Jones
110.%T US Secure Hash Algorithm 1
111.%O RFC 3174
112.Re
113.Pp
114RIPEMD-160 is part of the ISO draft standard
115.Qq ISO/IEC DIS 10118-3
116on dedicated hash functions.
117.Pp
118Secure Hash Standard (SHS):
119.Pa http://csrc.nist.gov/cryptval/shs.html .
120.Pp
121The RIPEMD-160 page:
122.Pa http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html .
123.Sh ACKNOWLEDGMENTS
124This program is placed in the public domain for free general use by
125RSA Data Security.
126.Pp
127Support for SHA-1 and RIPEMD-160 has been added by
128.An Oliver Eikemeier Aq eik@FreeBSD.org .
129