]> git.sur5r.net Git - bacula/docs/blob - docs/manual-fr/md5.tex
Initial revision
[bacula/docs] / docs / manual-fr / md5.tex
1 %%
2 %%
3
4 \section*{\includegraphics{./md5.eps}}
5 \label{_ChapterStart}
6 \addcontentsline{toc}{section}{}
7
8 \subsection*{Command Line Message Digest Utility }
9 \index{Utility!Command Line Message Digest }
10 \index{Command Line Message Digest Utility }
11 \addcontentsline{toc}{subsection}{Command Line Message Digest Utility}
12
13
14 This page describes {\bf md5}, a command line utility usable on either Unix or
15 MS-DOS/Windows, which generates and verifies message digests (digital
16 signatures) using the MD5 algorithm. This program can be useful when
17 developing shell scripts or Perl programs for software installation, file
18 comparison, and detection of file corruption and tampering. 
19
20 \subsubsection*{NAME}
21 \index{NAME }
22 \addcontentsline{toc}{subsubsection}{NAME}
23
24 {\bf md5} - generate / check MD5 message digest 
25
26 \subsubsection*{SYNOPSIS}
27 \index{SYNOPSIS }
28 \addcontentsline{toc}{subsubsection}{SYNOPSIS}
29
30 {\bf md5} [ {\bf -c}{\it signature} ] [ {\bf -u} ] [ {\bf -d}{\it input\_text}
31 | {\it infile} ] [ {\it outfile} ] 
32
33 \subsubsection*{DESCRIPTION}
34 \index{DESCRIPTION }
35 \addcontentsline{toc}{subsubsection}{DESCRIPTION}
36
37 A {\it message digest} is a compact digital signature for an arbitrarily long
38 stream of binary data. An ideal message digest algorithm would never generate
39 the same signature for two different sets of input, but achieving such
40 theoretical perfection would require a message digest as long as the input
41 file. Practical message digest algorithms compromise in favour of a digital
42 signature of modest size created with an algorithm designed to make
43 preparation of input text with a given signature computationally infeasible.
44 Message digest algorithms have much in common with techniques used in
45 encryption, but to a different end; verification that data have not been
46 altered since the signature was published. 
47
48 Many older programs requiring digital signatures employed 16 or 32 bit {\it
49 cyclical redundancy codes} (CRC) originally developed to verify correct
50 transmission in data communication protocols, but these short codes, while
51 adequate to detect the kind of transmission errors for which they were
52 intended, are insufficiently secure for applications such as electronic
53 commerce and verification of security related software distributions. 
54
55 The most commonly used present-day message digest algorithm is the 128 bit MD5
56 algorithm, developed by Ron Rivest of the 
57 \elink{MIT}{http://web.mit.edu/} 
58 \elink{Laboratory for Computer Science}{http://www.lcs.mit.edu/} and 
59 \elink{RSA Data Security, Inc.}{http://www.rsa.com/} The algorithm, with a
60 reference implementation, was published as Internet 
61 \elink{RFC 1321}{http://www.fourmilab.ch/md5/rfc1321.html} in April 1992, and
62 was placed into the public domain at that time. Message digest algorithms such
63 as MD5 are not deemed ``encryption technology'' and are not subject to the
64 export controls some governments impose on other data security products.
65 (Obviously, the responsibility for obeying the laws in the jurisdiction in
66 which you reside is entirely your own, but many common Web and Mail utilities
67 use MD5, and I am unaware of any restrictions on their distribution and use.) 
68
69 The MD5 algorithm has been implemented in numerous computer languages
70 including C, 
71 \elink{Perl}{http://www.perl.org/}, and 
72 \elink{Java}{http://www.javasoft.com/}; if you're writing a program in such a
73 language, track down a suitable subroutine and incorporate it into your
74 program. The program described on this page is a {\it command line}
75 implementation of MD5, intended for use in shell scripts and Perl programs (it
76 is much faster than computing an MD5 signature directly in Perl). This {\bf
77 md5} program was originally developed as part of a suite of tools intended to
78 monitor large collections of files (for example, the contents of a Web site)
79 to detect corruption of files and inadvertent (or perhaps malicious) changes.
80 That task is now best accomplished with more comprehensive packages such as 
81 \elink{Tripwire}{ftp://coast.cs.purdue.edu/pub/COAST/Tripwire/}, but the
82 command line {\bf md5} component continues to prove useful for verifying
83 correct delivery and installation of software packages, comparing the contents
84 of two different systems, and checking for changes in specific files. 
85
86 \subsubsection*{OPTIONS}
87 \index{OPTIONS }
88 \addcontentsline{toc}{subsubsection}{OPTIONS}
89
90 \begin{description}
91
92 \item [{\bf -c}{\it signature}  ]
93    \index{-csignature }
94    Computes the signature of the specified {\it infile} or the string  supplied
95 by the {\bf -d} option and compares it against the specified  {\it signature}.
96 If the two signatures match, the exit status will be zero,  otherwise the exit
97 status will be 1. No signature is written to  {\it outfile} or standard
98 output; only the exit status is set. The  signature to be checked must be
99 specified as 32 hexadecimal digits.  
100
101 \item [{\bf -d}{\it input\_text}  ]
102    \index{-dinput\_text }
103    A signature is computed for the given {\it input\_text} (which must be  quoted
104 if it contains white space characters) instead of input from  {\it infile} or
105 standard input. If input is specified with the {\bf -d}  option, no {\it
106 infile} should be specified.  
107
108 \item [{\bf -u}  ]
109    Print how-to-call information. 
110    \end{description}
111
112 \subsubsection*{FILES}
113 \index{FILES }
114 \addcontentsline{toc}{subsubsection}{FILES}
115
116 If no {\it infile} or {\bf -d} option is specified or {\it infile} is a single
117 ``-'', {\bf md5} reads from standard input; if no {\it outfile} is given, or
118 {\it outfile} is a single ``-'', output is sent to standard output. Input and
119 output are processed strictly serially; consequently {\bf md5} may be used in
120 pipelines. 
121
122 \subsubsection*{BUGS}
123 \index{BUGS }
124 \addcontentsline{toc}{subsubsection}{BUGS}
125
126 The mechanism used to set standard input to binary mode may be specific to
127 Microsoft C; if you rebuild the DOS/Windows version of the program from source
128 using another compiler, be sure to verify binary files work properly when read
129 via redirection or a pipe. 
130
131 This program has not been tested on a machine on which {\tt int} and/or {\tt
132 long} are longer than 32 bits. 
133
134 \subsection*{
135 \elink{Download md5.zip}{http://www.fourmilab.ch/md5/md5.zip} (Zipped
136 archive)}
137 \index{Archive!Download md5.zip Zipped }
138 \index{Download md5.zip (Zipped archive) }
139 \addcontentsline{toc}{subsection}{Download md5.zip (Zipped archive)}
140
141 The program is provided as 
142 \elink{md5.zip}{http://www.fourmilab.ch/md5/md5.zip}, a 
143 \elink{Zipped}{http://www.pkware.com/} archive containing an ready-to-run
144 Win32 command-line executable program, {\tt md5.exe} (compiled using Microsoft
145 Visual C++ 5.0), and in source code form along with a {\tt Makefile} to build
146 the program under Unix. 
147
148 \subsubsection*{SEE ALSO}
149 \index{ALSO!SEE }
150 \index{SEE ALSO }
151 \addcontentsline{toc}{subsubsection}{SEE ALSO}
152
153 {\bf sum}(1) 
154
155 \subsubsection*{EXIT STATUS}
156 \index{STATUS!EXIT }
157 \index{EXIT STATUS }
158 \addcontentsline{toc}{subsubsection}{EXIT STATUS}
159
160 {\bf md5} returns status 0 if processing was completed without errors, 1 if
161 the {\bf -c} option was specified and the given signature does not match that
162 of the input, and 2 if processing could not be performed at all due, for
163 example, to a nonexistent input file. 
164
165 \subsubsection*{COPYING}
166 \index{COPYING }
167 \addcontentsline{toc}{subsubsection}{COPYING}
168
169 \begin{quote}
170 This software is in the public domain. Permission to use, copy,  modify, and
171 distribute this software and its documentation for any purpose and  without
172 fee is hereby granted, without any conditions or restrictions. This  software
173 is provided ``as is'' without express or implied warranty. 
174 \end{quote}
175
176 \subsubsection*{ACKNOWLEDGEMENTS}
177 \index{ACKNOWLEDGEMENTS }
178 \addcontentsline{toc}{subsubsection}{ACKNOWLEDGEMENTS}
179
180 The MD5 algorithm was developed by Ron Rivest. The public domain C language
181 implementation used in this program was written by Colin Plumb in 1993. 
182 {\it 
183 \elink{by John Walker}{http://www.fourmilab.ch/}
184 January 6th, MIM }