Live data from Hacker News

How To Safely Store A Password

codahale.com

81–90 of 110 posts

Re: How To Safely Store A Password

#81

Earlier quoted context omitted.

Folk wisdom of PHP developers? I think the creators of crypt() are probably smarter than this. Password hashes are part of a way to mitigate a particular situation: deciphering a login credential when the password database has been exposed. Shadow files are locked down to root-only because you should never trust people with your password hashes. If somebody has the hash, it's just a matter of time. I don't assume tim…

You're asking about the relative merit of two hash functions, one of which allows your attacker to test a candidate password in 1 millisecond , the other of which allows the same in less than 1 nanosecond . Using the latter provides your attacker with a 1,000,000x productivity boost. Personally, I'm not that generous. As far as CPU exhaustion, there are some huge sites which use bcrypt (like, in the top 10)[1]. It is…

[deleted]

Re: How To Safely Store A Password

#82
How? Basically, it’s slow as hell.

Is that it? bcrypt is good only because it is slow? In that case, why don't we use whatever we like (MD5, SHA1, SHA256, SHA512, SHA-3, etc) and add a sleep(500); just before the call? It is guaranteed to keep up with Moore's law as well!

Re: How To Safely Store A Password

#83

How? Basically, it’s slow as hell. Is that it? bcrypt is good only because it is slow? In that case, why don't we use whatever we like (MD5, SHA1, SHA256, SHA512, SHA-3, etc) and add a sleep(500); just before the call? It is guaranteed to keep up with Moore's law as well!

Did you read the article? The problem is that someone trying to bruteforce your MD5 hash won't add that sleep(500). Bcrypt is slow by design.

Re: How To Safely Store A Password

#85

How? Basically, it’s slow as hell. Is that it? bcrypt is good only because it is slow? In that case, why don't we use whatever we like (MD5, SHA1, SHA256, SHA512, SHA-3, etc) and add a sleep(500); just before the call? It is guaranteed to keep up with Moore's law as well!

I hope you're being sarcastic, but if not, it is because an attacker could take out the call to sleep(500) again.

Re: How To Safely Store A Password

#87
post #86

[deleted]

They're two completely different things. AES is an encryption algorithm. bcrypt is a special-purpose hash algorithm.

If you're confused, I'd highly recommend Practical Cryptography by Niels Furguson and Bruce Schneier: http://www.schneier.com/book-practical.html

It will give you much better advice than the internet will.

Re: How To Safely Store A Password

#88
post #86

[deleted]

They're two completely different things. AES is an encryption algorithm. bcrypt is a special-purpose hash algorithm. If you're confused, I'd highly recommend Practical Cryptography by Niels Furguson and Bruce Schneier: http://www.schneier.com/book-practical.html It will give you much better advice than the internet will.

[deleted]

Re: How To Safely Store A Password

#90
post #81

Earlier quoted context omitted.

You're asking about the relative merit of two hash functions, one of which allows your attacker to test a candidate password in 1 millisecond , the other of which allows the same in less than 1 nanosecond . Using the latter provides your attacker with a 1,000,000x productivity boost. Personally, I'm not that generous. As far as CPU exhaustion, there are some huge sites which use bcrypt (like, in the top 10)[1]. It is…

[deleted]

They might. I don't know. They didn't ask me for help getting it tuned.
Post reply on HN