Live data from Hacker News

I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

github.com

71–80 of 126 posts

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#71
post #22

Seriously? Who is still using md5? There are strong hashing libraries for like every language. Anyone reading this uses md5? Can we find these people and just let them know?

37signals used to store passwords in plaintext.

http://blog.jgc.org/2009/05/can-you-trust-37signals-with-you...

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#72
post #22

Seriously? Who is still using md5? There are strong hashing libraries for like every language. Anyone reading this uses md5? Can we find these people and just let them know?

37signals used to store passwords in plaintext.

http://blog.jgc.org/2009/05/can-you-trust-37signals-with-you...

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#73
post #27

Obligatory http://codahale.com/how-to-safely-store-a-password/ link which taught me a ton.

This is the HN discussion and comments about this article (How To Safely Store A Password): http://news.ycombinator.com/item?id=2004833

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#74
post #68
post #27

Obligatory http://codahale.com/how-to-safely-store-a-password/ link which taught me a ton.

I see that link referenced a lot and don't think that's a good thing. He's right, but he doesn't explain why we should use bcrypt (or any other adaptive password hashing function). Picking bcrypt without knowing why is just as bad as picking MD5 without knowing why.

No, it's really not, as long as you follow current guidance on counts for iteration. There are people smarter than random person and sometimes (often with crypto) it's better to follow their advice. Anyone can make a system that they themselves cannot break. Don't be that person.

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#75
post #10

Earlier quoted context omitted.

If using MD5 is all you do, you'd still be susceptible to brute force attacks . MD5 is a really fast hash to compute, salting or not. The solution is to pick a better algorithm and learn how to use it securely. That probably won't happen unless all the ridiculous PHP 'security' tutorials are erased from the history of the internet and only correct methods are shown.

If using MD5 is all you do, you'd still be susceptible to brute force attacks. Only if you know the algorithm and salt used (i.e. your source code is also compromised, not just your database). Otherwise, demonstrate to me how you can find the passwords that relate to these hashes (all of them use the same salt): 23C206503ABD36FCB575FC8F12791CF0 D82BDB4160F60B657D6F994B553D2E63 0DA0572E042F822F91772F14269548E6 CB8BF6C…

A standard assumption in cryptography, known as Kerckhoff's principle (http://en.wikipedia.org/wiki/Kerckhoffs%27_principle), is: "A cryptosystem should be secure even if everything about the system, except the key, is public knowledge." or "Don't rely on security by obscurity.".

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#76
post #22

Seriously? Who is still using md5? There are strong hashing libraries for like every language. Anyone reading this uses md5? Can we find these people and just let them know?

Take a look at the PHP code in this question and weep:

http://stackoverflow.com/questions/1581610/how-can-i-store-m...

I think we need more code examples of how to do things right, because that code is very, very wrong.

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#77

Earlier quoted context omitted.

Ah, you are technically incorrect in saying there are an infinite number of "nicetry"+i hashes. There are an infinite number of "nicetry"+i passwords, but eventually there will be collisions as the hash set stays a constant size and the password set grows without bound. "Infinite" isn't a term to throw around too lightly.

There are 2^128 possible MD5 hashes. When it becomes impossible to increment a counter to a number, that's as good as infinite.

The point is that it's unnecessary to find the plaintext; all you need is some plaintext that produces the same hash value. It doesn't matter if your actual password is "zipobibrok5x10^8" when "fordprefect" also gets you into the system. (That, of course, only applies to a single system -- or to a cluster of systems all using something like an unsalted MD5. It would matter if you're trying to leverage a password found on a cat fanciers' site to empty someone's bank account.)

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#78
post #62
post #61

Earlier quoted context omitted.

Hate to be pedantic, and I'm sure you already know this, but you do realize that PBKDF2 uses SHA in HMAC mode right? There's nothing inherently slow about that, it's the repeated iterations of hashing. You could slap MD5 into PBKDF2 with a high iteration count and achieve comparable security. The problem is that devs often use a hash function a single time.

I'm drawing a line between "cryptographic hash functions" and "password hash constructions". One is a "function", the other a "construction". Password hash constructions do more than simply run the hash function multiple times. We are, obviously, saying much the same thing. Again: the key point here is, don't DIY this part of your application.

Fair enough, I suppose I didn't read your original comment closely enough. I appreciate your essays on the topic, but I fear that too many people have, without a full understanding, drawn the conclusion from them that SHA = bad, bcrypt/pbkdf2 = good, without fully realizing that SHA is an integral part of pbkdf2.

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#79
post #78
post #62

Earlier quoted context omitted.

I'm drawing a line between "cryptographic hash functions" and "password hash constructions". One is a "function", the other a "construction". Password hash constructions do more than simply run the hash function multiple times. We are, obviously, saying much the same thing. Again: the key point here is, don't DIY this part of your application.

Fair enough, I suppose I didn't read your original comment closely enough. I appreciate your essays on the topic, but I fear that too many people have, without a full understanding, drawn the conclusion from them that SHA = bad, bcrypt/pbkdf2 = good, without fully realizing that SHA is an integral part of pbkdf2.

Man I'd be thrilled if everyone just thought "SHA=bad, bcrypt=good".

Re: I wrote BozoCrack to show why plain MD5 is a horrible way to hash passwords.

#80
post #79
post #78

Earlier quoted context omitted.

Fair enough, I suppose I didn't read your original comment closely enough. I appreciate your essays on the topic, but I fear that too many people have, without a full understanding, drawn the conclusion from them that SHA = bad, bcrypt/pbkdf2 = good, without fully realizing that SHA is an integral part of pbkdf2.

Man I'd be thrilled if everyone just thought "SHA=bad, bcrypt=good".

Really? How would you pay your bills then? :)
Post reply on HN