Current location: Hot Scripts Forums » Programming Languages » PHP » md5 decode/encode

md5 decode/encode

Reply
  #11 (permalink)  
Old 02-17-09, 02:16 PM
Psybadek Psybadek is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Florida
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
wow way to bring up a near 2 year old topic...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #12 (permalink)  
Old 10-29-09, 12:36 PM
greg1996 greg1996 is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
There has to be a way

If there is a way of encoding AND every different text that is encoded has a different result there has to be a way of decoding
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #13 (permalink)  
Old 10-29-09, 01:14 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 7,572
Thanks: 5
Thanked 27 Times in 24 Posts
Quote:
Originally Posted by greg1996 View Post
AND every different text that is encoded has a different result
This is precisely where your mistake is.

All strings, containing all types of characters, and independent of their lengths (I repeat that, independent of their lengths), are being converted into a 32 character long, hexadecimal string, when they're encoded to MD5. You could encode the bible into MD5 and it would turn into 32 characters (characters from a to f and 0 to 9... only). And you can take a single character, and would turn into 32 characters too.

That means, every MD5 string, has an infinite amount of possible "decoding" options, and thus, making proper decoding impossible.


Why would be still using ZIPs and RARs if everything could be compressed into 32 bytes? ;p

Last edited by Nico; 10-29-09 at 01:19 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #14 (permalink)  
Old 11-05-09, 06:41 AM
greg1996 greg1996 is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ok I get it now but I calculated that there are about
340282367000000000000000000000000000000 possibilities in md5;
I found it on the net that there are about 4970000 characters in the bible.
So If you encode the bible and change 1 character the md5 code will change too

I created a code that tests all the possibilities but it only works with up to 4 characters of text and at 4 it takes about 5minutes to try the possibilities. you can try it here.
(characters it tests :'' ,'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'é', 'á', 'ű', 'ő', 'ú', 'ö', 'ü', 'ó', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '§', "'", '"', '~', 'ˇ', '+', '^', '!', '˘', '%', '°', '/', '˛', '=', '`', '˙', '(', ')', '´', '˝', '¨', '¸', '|', 'Ä', '€', '÷', 'Í', '×', 'ä', 'đ', 'Đ', '[', ']', 'í', 'ł', 'Ł', '$', 'ß', '¤', '<', '>', '#', '&', '@', '{', '}', ';', '?', ':', '.', '-', '_', ' ')
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #15 (permalink)  
Old 11-05-09, 07:35 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,029
Thanks: 14
Thanked 34 Times in 33 Posts
Quote:
Originally Posted by greg1996 View Post
So If you encode the bible and change 1 character the md5 code will change too
Yes, this is one of the characteristics of MD5. Any change in the input produces a change in the output.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data (scroll down)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #16 (permalink)  
Old 11-20-09, 02:31 AM
greg1996 greg1996 is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ok, but what happens if we try to encode a string that contains more than 340282367000000000000000000000000000000 characters?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #17 (permalink)  
Old 11-20-09, 07:04 AM
wirehopper's Avatar
wirehopper wirehopper is offline
Community Liaison
 
Join Date: Feb 2006
Posts: 2,336
Thanks: 17
Thanked 92 Times in 90 Posts
Any string that large should be handled as a file, or broken into segments.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #18 (permalink)  
Old 11-20-09, 12:17 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,029
Thanks: 14
Thanked 34 Times in 33 Posts
Lol, any string that large should be stored off-planet.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data (scroll down)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #19 (permalink)  
Old 11-20-09, 04:00 PM
therocket954's Avatar
therocket954 therocket954 is offline
Community Liaison
 
Join Date: Jul 2007
Location: Michigan, USA
Posts: 335
Thanks: 2
Thanked 8 Times in 8 Posts
Quote:
Originally Posted by greg1996 View Post
ok, but what happens if we try to encode a string that contains more than 340282367000000000000000000000000000000 characters?
That's 340.3 undecillion by the way... I just had nothing better to do finishing up the Friday workday, I had to look it up. hah!
__________________
--Eric Allison
Twitter: http://www.twitter.com/Eric_Allison
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #20 (permalink)  
Old 11-20-09, 09:04 PM
Jcbones Jcbones is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: North Carolina, USA
Posts: 414
Thanks: 4
Thanked 27 Times in 26 Posts
Quote:
Originally Posted by therocket954 View Post
That's 340.3 undecillion by the way... I just had nothing better to do finishing up the Friday workday, I had to look it up. hah!
Just 2 points off of my IQ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MD5 and importing data into new DB ELV1I2 Database 2 06-14-07 02:12 PM
MD5 password for registered users zoliky PHP 7 11-04-06 09:06 AM
Forgot Password MD5 adubb PHP 7 07-14-06 06:54 PM
md5 issue tophat PHP 8 06-30-06 09:08 AM
Mysql and MD5 nicpon PHP 4 04-23-04 08:58 PM


All times are GMT -5. The time now is 01:03 AM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.