md5 twice or more?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

md5 twice or more?

Post by Dale »

This is more of a question, than a query. But is it possible for an word (eg; lamb) to be MD5'ed twice or maybe even three times to offer more security?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Nope, this is a common misconception
This is just a thought regarding security and the benefits of the K.I.S.S. principle (K.I.S.S. means "Keep It Simple, Stupid", and is one of the favorite expressions of English-speaking engineering colleges across the planet):

Ever shuffle a deck of cards so many times that it came out less random than you expected? Combining multiple hashes through concatenation of hash-of-a-hash techniques may result in a /greater/ probability of a collision when you're hoping for /lesser/ probability of one.

The fact is going to remain that short passwords will /always/ be insecure for the fact that they're short. Long passwords, especially with many kinds of characters, will always be more secure because they're less likely to collide in hashing algorithms (any kind) and they're harder to guess.
Post Reply