[BitTorrent] SHA-1 broken

Bill Cox bill at viasic.com
Wed Feb 16 09:50:01 EST 2005

> BitTorrent is a bit more secure about its overall use of SHA1 than
> just a basic hash since the hashed data has a known size. With that
> known size, the scope of data that can cause a colission is a LOT
> smaller.

Well... here's a dumb simple algorithm to hack a fedora core release
BitTorrent file, which uses the fixed size.

Find the file you wish to corrupt (there are VERY many that will do if
all you want is a back-door).

Find a file no one uses in the piece containing the file you want to
corrupt.  This should be easy, as pieces are 1M byte.

Modify the target file, introducing your hack.  Then run this simple

while(SHA1(piece) != publishedValue) {
	unusedData ^= randomString();

This should produce a valid signature in about 2^69 itterations.
Obviously, hardware acceleration is required to make this practical.
However, I don't see how fixed piece size helps the security.


Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

More information about the BitTorrent mailing list