Hamumu Forum

Hamumu Forum (http://hamumu.com/forum/index.php)
-   General Blabber (http://hamumu.com/forum/forumdisplay.php?f=36)
-   -   MD5 Stuffs (http://hamumu.com/forum/showthread.php?t=17766)

Julian 10-30-2008 05:24 PM

MD5 Stuffs
 
I was thinking... If every file in the world has a unique md5 checksum, then why not be able to create a program that takes an MD5 sum and make a file?

*********

fourwind 10-30-2008 05:25 PM

Re: MD5 Stuffs
 
WOW. That would be cool. Make a random generator of these, AND THEN CONVERT EM! you could make programs that do absoloutly NOTHING useful. Or you could make awesome programs. Like, wow. this is cool. it makes squares on the screen. ;3

Jamul 10-30-2008 06:25 PM

Re: MD5 Stuffs
 
Because they're not completely unique. Any time you take X amount of information and scrunch it into Y (smaller) amount, there clearly has to be some overlap! MD5 is just a very big number, so it's outrageously unlikely for any 2 files to share a number.

Think of it like this: If a file has 100 bytes in it, that file could contain any 256^100 (each byte can be any of 256 different values) different combinations of values. MD5 is... 32 bytes? I don't recall. It can only be 256^32 different values. So there will be ones that share an MD5, even among files that are just 100 bytes. Stick it in a calculator though, and you find that the numbers involved are unbelievably large, and the odds of getting two files with the same code are just about inconceivable. But it still can happen.

Julian 10-30-2008 07:12 PM

Re: MD5 Stuffs
 
Well then, make a format that isn't (as) compact and generates as much as is needed to make a number completely unique! So, for smaller files, the hash would be smaller, and for bigger ones, it would be much bigger. But it would all be worth it.

Jamul 10-30-2008 08:35 PM

Re: MD5 Stuffs
 
Logic dictates that the number that would be exactly unique for any given arrangement is... exactly the size of the arrangement!

Julian 10-30-2008 08:56 PM

Re: MD5 Stuffs
 
Although, if you used a whole lot of characters to make the arrangement, rather than hex, than it would end up being shorter, correct? There are 10 numerical digits and 26x2 letters, so if you came up with a format that used that, then you'd have a better format that was more compact than the file itself.

SpaceManiac 10-31-2008 05:37 AM

Re: MD5 Stuffs
 
And how would you store it? Just in a text file, like

12ada331ADDW

? This wouldn't work - each character in a normal text file takes up a whole byte.

Mr.Onion 10-31-2008 06:43 AM

Re: MD5 Stuffs
 
Quote:

Originally Posted by Julian (Post 215206)
Although, if you used a whole lot of characters to make the arrangement, rather than hex, than it would end up being shorter, correct? There are 10 numerical digits and 26x2 letters, so if you came up with a format that used that, then you'd have a better format that was more compact than the file itself.

This is called ASCII. :p

Also, it is not possible to get a file from an MD5 for another reason: The MD5 algorith is designed in such a way that it's very nearly impossible to do this, and the only way is to brute-force it. (MD5 strings are 256 characters long, so this takes you a couple of decades at the minimum.)

Quote:

Originally Posted by Jamul (Post 215197)
Logic dictates that the number that would be exactly unique for any given arrangement is... exactly the size of the arrangement!

Although, if you're doing a hash for whatever reason, SHA-1 doesn't produce a collision, as far as anyone can figure out.


All times are GMT -7. The time now is 07:08 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.