MD5 bug

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
mortendb
Junior Member
Junior Member
Posts: 5
Joined: 2003-12-30, 14:43 UTC

MD5 bug

Post by *mortendb »

I have found a bug in the SFV: MD5 creator

I added sfv/md5 checksum for the following 2 files

20040303.bak & 20040301

It gives me:
--
29131245B6FD99A319A7B4838544E579 20040303.bak
7BEE99DA42A52EB49DC5F75EDC7C47D4 20040301
--

When checking the MD5 sum it fails on the file 20040301
to get the check to work i have to add a "." to the filename 20040301
--
29131245B6FD99A319A7B4838544E579 20040303.bak
7BEE99DA42A52EB49DC5F75EDC7C47D4 20040301.
--
--
Morten Birkelund
IGL
Member
Member
Posts: 179
Joined: 2004-02-26, 10:47 UTC
Location: Poland

Post by *IGL »

I confirm that - it looks like this problem exists for only some filenames being 8 chars long (?with numbers or repeated characters?), eg if filename is a2004030, a2014030, 2043abcd, aaaaabcd.

But NOT for filename: abcdefgh nor aaaaabc (7chars).
Weird
:-)
Seikatsu
Junior Member
Junior Member
Posts: 8
Joined: 2004-02-28, 23:16 UTC

Post by *Seikatsu »

I think I *might* know what the problem is. The internal Total Commander md5 checksum generator has an asterisk missing in the .md5 file. I really don't know anything about how it is checked, but I have seen an asterisk before the filename but after the checksum in all the other programs I have used to generate md5 checksums.

An example would be:
D41D8CD98F00B204E9800998ECF8427E a56c7777 (This one fails.)
D41D8CD98F00B204E9800998ECF8427E *a56c7777 (This one has the asterisk and checks out fine and it is like this in all the other programs.)

Maybe the TC author forgot to add that asterisk???
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

With archives...

Post by *Clo »

2Seikatsu
:)  Hello!
• Excep my mistake, *.SFV / *.md5 are checksum-files to control archives especially.
• I tested a md5 for this:

Code: Select all

1EBD72145F539E6E09C9185E0B8191ED  icones.rar
• That works just fine at home...
:?:

:mrgreen:  Kind regards,
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
mortendb
Junior Member
Junior Member
Posts: 5
Joined: 2003-12-30, 14:43 UTC

Post by *mortendb »

Try to rename the file to 20040301 and make an MD5 sum again.

Please read the posts before responding to them :)

The md5 generator seems to have some flaws with 8 letters with one repeating and a missing "."
--
Morten Birkelund
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

extension ?

Post by *Clo »

2mortendb
Hi,
• I have read this post for a while.
- renaming the same archive 12345678.rar works
- the same still, without extension 12345678 isn't found.
• Is it what you mean ?
:mrgreen: K R
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
mortendb
Junior Member
Junior Member
Posts: 5
Joined: 2003-12-30, 14:43 UTC

Post by *mortendb »

Yes, that is the problem, some files are without extension, and if it is 8 chars with a repeating char the MD5 generator forgets the last .

[:)][:)][:)]
--
Morten Birkelund
IGL
Member
Member
Posts: 179
Joined: 2004-02-26, 10:47 UTC
Location: Poland

Post by *IGL »

It looks like files beginning with number or containing at the end three or more the same characters. At least that is what I found out for now.
If I add * before the name - it is OK! But it may not be the best solution.
eg. Some FTP sites provide files and MD5 signature file. It may contain no "*" char - expecting that MD5 veryfying program will read it correctly.

These files cause error:
12345678 87654321 aaaaaaaa abcccccc abcddddd abcdeeee abcdefff

And these do not (they are verified correctly): aaaaaaag aaaaaafg aaaaaefg aaaadefg aaacdefg aabcdefg abbbbbbb abcdefgg abcdefgh z7654321 zaaaaaaz zb654321 zbc54321 zbcd4321 zbcde321 zbcdef21 zbcdefg1
:-)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50505
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The 8 digits number of that file name looks like a CRC checksum so TC assumes that the long number is the file name and the short number is its CRC32...
Author of Total Commander
https://www.ghisler.com
Post Reply