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