Mitch Davis writes:
> 
> Larry Jones wrote:
> > 
> > The problem is the severity of being wrong.  If CVS thinks the file has
> > changed when it really hasn't, the worst thing that can happen is you
> > waste some time sending the file to the server when you don't really
> > need to.  If CVS thinks that the file hasn't changed when it really
> > has, the worst thing that can happen is that you lose changes.
> 
> And the 128-bit MD5 digest algorithm wouldn't catch BOTH of these?

No.  Any checksum algorithm can think that the file hasn't changed when
it really has.  (Timestamps can do the same thing, but only if someone
has deliberately set the timestamp backwards [or the filesystem is
broken]).

> >From the MD5 RFC:
> 
>   http://www.csl.sony.co.jp/cgi-bin/hyperrfc?rfc1321.txt
> 
> % It is conjectured that it is computationally infeasible to produce
> % two messages having the same message digest, or to produce any
> % message having a given prespecified target message digest.

How often have you heard (or even said), "I couldn't have done that if
I'd tried; not even in a million years!"?  What the RFC is saying is
that it's extremely difficult to craft a message that has a specific
checksum, or two messages that have the same checksum.  That doesn't
mean that it won't happen through random chance.

> Using timestamps relies on the assumption that file modification
> is always associated with a timestamp change, and vice versa.
> As we know, it's possible to have one without the other in both
> cases.  That's what I'm trying to catch.

No, using timestamps relies on the assumption that the timestamp always
changes when the file is modified -- it does *not* assume the latter
(although it does assume that the consequences of thinking that the file
has been modified when it hasn't are not severe).  You seem to think
that wasting time is a more serious consequence than missing changes; I
don't agree.

In fact, I haven't heard anyone agree except for people who are using
broken systems where the timestamps suddenly change for no apparent
reason.

-Larry Jones

Rats.  I can't tell my gum from my Silly Putty. -- Calvin

Reply via email to