954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Md5 - Wtf?

:( I've been looking at the text written by professor Rivest, and I REALLY do not understand the MD5 algorithm.

It produces a 32 bit encryption.. so its 32 characters, no matter what. But you can hash a string with an unlimited amount of characters... But if you do the math, only 9,472,710,129,612,967,086,019,848,437,700,000,000 possible combinations of alphanumeric characters in a 32 bit (character) hash is possible. So how can it account for the rest of the combinations of letters and numbers that you can encrypt?

Math Equation for possible strings produced by MD5: 32! * 36That being "(32 x 31 x 30 x 29 x 28 x 27 x 26 x 25 x 24 x 23 x 22 x 21 x 20 x 19 x 18 x 17 x 16 x 15 x 14 x 13 x 12 x 11 x 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1) * (26 + 10)". 26 letters (A-Z) and 10 numbers (0-9) producable by MD5.

WTF? :(

rixius
Posting Whiz in Training
233 posts since Nov 2003
Reputation Points: 12
Solved Threads: 3
 

You forgot to include (a-z) for a total of 52 letters.

TheOgre
Posting Whiz
393 posts since Aug 2003
Reputation Points: 128
Solved Threads: 9
 

Well.. I just used a-z generically, I didn't know they could be cap'd or not. I thought it just produced them in lowercase.

rixius
Posting Whiz in Training
233 posts since Nov 2003
Reputation Points: 12
Solved Threads: 3
 

It only produces letters in lowercase, but it uses uppercase letters as part of the algorithm.

TheOgre
Posting Whiz
393 posts since Aug 2003
Reputation Points: 128
Solved Threads: 9
 

It's NOT encryption. It's a hash. That means that it's not mathematically possible to decrypt an md5() encoded string. MD5() is designed to be a secure way of storting data for authentication, not for encryption. So, yes, a few times the same hash will come up for more than one string. But it's highly unlikely that you'll find more than one, and they would have to be so drastically different that they'd never be used in the same context anyway.

Roberdin
Supreme Evil Overlord
Team Colleague
282 posts since Feb 2003
Reputation Points: 63
Solved Threads: 6
 

Ahh okay. I'm new to this sort of thing, :P Thanks for making it more clear to me.

rixius
Posting Whiz in Training
233 posts since Nov 2003
Reputation Points: 12
Solved Threads: 3
 

I made a program that implemented the MD5 hash for files if you would like to view it?

BountyX
Posting Whiz in Training
230 posts since Mar 2004
Reputation Points: 28
Solved Threads: 9
 
only 9,472,710,129,612,967,086,019,848,437,700,000,000 possible combinations...

lmao.

Might I just bring this down to earth a bit and ask if you don't think that many bafrickingzillion possible distinct hashes will be ENOUGH??

Nuez_Jr
Newbie Poster
18 posts since Oct 2004
Reputation Points: 10
Solved Threads: 1
 

lmao.

Might I just bring this down to earth a bit and ask if you don't think that many bafrickingzillion possible distinct hashes will be ENOUGH??


and I'd like to see him store that number in an integer:mrgreen:

Ancient Dragon
Retired & Loving It
Team Colleague
30,046 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
 
and I'd like to see him store that number in an integer:mrgreen:


You'd need a plugin module like BigfrickinNum from CodefrackingSpace.foo

WaltP
Posting Sage w/ dash of thyme
Moderator
10,492 posts since May 2006
Reputation Points: 3,348
Solved Threads: 943
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You