You are not logged in.

#1 2008-08-30 00:11:16

techprophet
Member
Registered: 2008-05-13
Posts: 209

MD5/SHA1 SUM errors?

Is it possible for a file checked with an MD5 or SHA1 sum to have errors if the checksum is correct? Even down to the bit level?

Offline

#2 2008-08-30 00:56:40

Megamixman
Member
Registered: 2008-05-04
Posts: 73

Re: MD5/SHA1 SUM errors?

Yes it is possible, but highly unlikely. MD5 and SHA1 sum rely on the fact that for two binaries to produce the same sums, the differences would have to be unique enough that such comparisons wouldn't even be needed in the first place. In essence you could easily tell that your 100kb file A is not the same as your 2GB file B and would not need a MD5 or SHA1.

Otherwise, both are hashes and thus they have a much larger domain (uncountably infinite in fact) then range and therefore can not be one-to-one.

Offline

#3 2008-08-30 01:06:59

techprophet
Member
Registered: 2008-05-13
Posts: 209

Re: MD5/SHA1 SUM errors?

You lost me in the last part of your second paragraph. You mean that I can't compare MD5 to SHA1 (I don't think you ment that) or you mean that they don't compare individual bits/bytes (which I already guessed at because otherwise checking a 2GB file would take forever)?

Offline

#4 2008-08-30 01:14:01

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,498
Website

Re: MD5/SHA1 SUM errors?

The key point is that if the files are the same size and their checksums match then it is very, very, very unlikely that they are different files.  Especially if both md5 and sha1 sums match.

His second paragraph means that there are "only" 32^16 possible md5sum's so it is possible that different files get the same md5sum.

Online

#5 2008-08-30 01:31:43

techprophet
Member
Registered: 2008-05-13
Posts: 209

Re: MD5/SHA1 SUM errors?

OK. Thanks.

Offline

Board footer

Powered by FluxBB