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