Re: MD5sums of nightly ISOs

Seth David Schoen <[email protected]> Sun, 23 May 2004 10:02:34 -0700
Newsgroups gmane.linux.bbc.general
Message-ID <[email protected]>
Nick Moffitt writes:

> begin  Niall O Broin  quotation:
> > I haven't downloaded an ISO in a long time but my build environment is
> > an an undeterminate state :-) so getting an ISO was the handiest thing
> > for me. Having downloaded the file I of course ran md5sum on it when I
> > noticed the cute md5sum. What are you doing to produce that?
> 
> The build of the entire BBC is usually measured in hours or
> half-hours.  Seth David Schoen realized that brute-forcing the first
> three bytes of the MD5sum was roughly three minutes.  Since it was
> sort of a drop in the bucket, we added his code in.

You can find it in meta/lnx-bbc; it's called hash_search.  There was
also originally a version that would hack the SHA-1 hash the same way
(but it's time-prohibitive to do both at once for 3 bytes; we could do
a byte and a nibble of each if we wanted, or perhaps 3 bytes of one
and a byte and a nibble of the other, which I think would take on the
order of a week on our current hardware.

I should try to make this into a distributed computing application
so that everyone can help us find a really impressive partial hash
collision.  For example, assuming two Moore's Law cycles since
gargoyle was built, I think we would just need about 1024 machines to
get a 6-byte partial hash collision on the order of a week (so we
could start with "bbcbbcbbcbbc" or MD5 and SHA-1 each with "bbcbbc").
I don't know where we would find 1024 machines, but it's a nice
thought anyway.

> Basically it just writes random integers on the end of the ISO file,
> past the filesystem portion.  It has no effect on the ISO and really
> only increases the size by 32 bits.  That, and you can spot
> transmission errors pretty quickly.

It does probably reduce the usefulness of the hash as a way of detecting
malicious changes (because it increases the chance that someone will
not actually verify the entire checksum and thus fall victim to an
attack) but probably increases the ease with which accidental errors
can be detected.

If people do verify the entire hash (like with md5sum -c), I don't
believe it reduces security at all.

-- 
Seth David Schoen <[email protected]> | Very frankly, I am opposed to people
     http://www.loyalty.org/~schoen/   | being programmed by others.
     http://vitanuova.loyalty.org/     |     -- Fred Rogers (1928-2003),
                                       |        464 U.S. 417, 445 (1984)