]> git.cameronkatri.com Git - apple_cmds.git/blob - text_cmds/md5/md5.1
shell_cmds: Fix locate install
[apple_cmds.git] / text_cmds / md5 / md5.1
1 .\" $FreeBSD: src/sbin/md5/md5.1,v 1.24 2005/03/10 09:56:39 cperciva Exp $
2 .Dd June 6, 2004
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 md5
10 .Op Fl pqrtx
11 .Op Fl s Ar string
12 .Op Ar
13 .Sh DESCRIPTION
14 The
15 .Nm
16 utility takes as input a message of arbitrary length and produces as
17 output a
18 .Dq fingerprint
19 or
20 .Dq message digest
21 of the input.
22 It is conjectured that it is computationally infeasible to
23 produce two messages having the same message digest, or to produce any
24 message having a given prespecified target message digest.
25 The
26 .Tn MD5
27 algorithm is intended for digital signature applications, where a
28 large file must be
29 .Dq compressed
30 in a secure manner before being encrypted with a private
31 (secret)
32 key under a public-key cryptosystem such as
33 .Tn RSA .
34 .Pp
35 .Tn MD5's
36 designer Ron Rivest has stated "md5 and sha1 are both clearly broken (in terms
37 of collision-resistance)".
38 So
39 .Tn MD5
40 should be avoided when creating new protocols, or implementing protocols with better options.
41 .Tn SHA256
42 and
43 .Tn SHA512
44 are better options as they have been more resilient to attacks (as of 2009).
45 .Pp
46 The following options may be used in any combination and must
47 precede any files named on the command line.
48 The hexadecimal checksum of each file listed on the command line is printed
49 after the options are processed.
50 .Bl -tag -width indent
51 .It Fl s Ar string
52 Print a checksum of the given
53 .Ar string .
54 .It Fl p
55 Echo stdin to stdout and append the checksum to stdout.
56 .It Fl q
57 Quiet mode - only the checksum is printed out.
58 Overrides the
59 .Fl r
60 option.
61 .It Fl r
62 Reverses the format of the output.
63 This helps with visual diffs.
64 Does nothing
65 when combined with the
66 .Fl ptx
67 options.
68 .It Fl t
69 Run a built-in time trial.
70 .It Fl x
71 Run a built-in test script.
72 .El
73 .Sh EXIT STATUS
74 The
75 .Nm
76 utility exits 0 on success,
77 and 1 if at least one of the input files could not be read.
78 .Sh SEE ALSO
79 .Xr cksum 1 ,
80 .Xr md5 3 ,
81 .Xr ripemd 3 ,
82 .Xr sha 3 ,
83 .Xr CC_SHA256_Init 3
84 .Rs
85 .%A R. Rivest
86 .%T The MD5 Message-Digest Algorithm
87 .%O RFC1321
88 .Rs
89 .%A Vlastimil Klima
90 .%T Finding MD5 Collisions - a Toy For a Notebook
91 .%O Cryptology ePrint Archive: Report 2005/075
92 .Re
93 .Sh ACKNOWLEDGMENTS
94 This program is placed in the public domain for free general use by
95 RSA Data Security.