Live data from Hacker News

Don't use bcrypt

unlimitednovelty.com

11–20 of 193 posts

Re: Don't use bcrypt

#11
post #5

Long story short, if a bcrypt exploit is found, you'll be sorry . So use http://en.wikipedia.org/wiki/PBKDF2 or http://www.tarsnap.com/scrypt.html instead. They're apparently better tested. I'm no expert opinion, but seems a bit unnecessary and that bcrypt is still a perfectly good choice for most password stores.

[deleted]

Re: Don't use bcrypt

#12
post #3

I like this article. But this sentence is odd. > […] with an academic pedigree from RSA Labs, you know, the guys who invented much of the cryptographic ecosystem we use today. Appeal to authority fails a little bit when RSA opens random Excel attachments from unknown untrusted sources - attached to an email that have to be retrieved from the junk mail folder. ( http://blogs.rsa.com/rivner/anatomy-of-an-attack/ ) EDIT…

As does ad hominem...

Edit: realized I should probably explain. What an administrative assistant does in a social engineering attach has nothing to do with the quality of cryptographic research at RSA. Humans are ALWAYS the weak point in cryptography.

Re: Don't use bcrypt

#13
post #6
post #2

However, if you're looking for a key derivation function for a new project, bcrypt is probably not the best one you can pick. I'm confused. Why would I pick bcrypt as a key derivation function when there are nice key derivation functions out there that are widely documented?

As stated in the article, a popular stance on Hacker News and Stack Overflow is "USE BCRYPT". It's chanted to crypto-noobs and webdevs as a simple-to-use library for password storage that is more secure than MD5/SHA/Whatever hashing, and with built-in salts. The whole point of this article is to say that, in fact, there are other options.

[deleted]

Re: Don't use bcrypt

#14
post #8

> While scrypt's cryptographic soundness, like bcrypt's, is poorly researched I think we may have different notions of what "poorly researched" means.

I think he meant it hasn't undergone the same level of public scrutiny. You've certainly spent ample time researching it, and it's obviously been tested, but possibly not as much something like AES.

Re: Don't use bcrypt

#15
post #13
post #6

Earlier quoted context omitted.

As stated in the article, a popular stance on Hacker News and Stack Overflow is "USE BCRYPT". It's chanted to crypto-noobs and webdevs as a simple-to-use library for password storage that is more secure than MD5/SHA/Whatever hashing, and with built-in salts. The whole point of this article is to say that, in fact, there are other options.

[deleted]

With a few very rare exceptions, those use cases are equivalent.

EDIT: The context was comparing 1. converting passwords into keys for cryptographic purposes and 2. hashing passwords to be used for logins.

Re: Don't use bcrypt

#16
post #14
post #8

> While scrypt's cryptographic soundness, like bcrypt's, is poorly researched I think we may have different notions of what "poorly researched" means.

I think he meant it hasn't undergone the same level of public scrutiny. You've certainly spent ample time researching it, and it's obviously been tested, but possibly not as much something like AES.

OK, but PBKDF2 hasn't had very much scrutiny either. The entire field of key derivation functions has been very much neglected.

Re: Don't use bcrypt

#17
TLDR: Use PBKDF2 or scrypt instead.

PBKDF2 has had longer public exposure, and also features an adjustable CPU work factor (though with a lower theoretical safety-to-compute-time than bcrypt).

scrypt is newer, but features both a CPU and memory work factor (memory-hard algorithm), and is algorithmically superior to both.

Re: Don't use bcrypt

#18
post #3

I like this article. But this sentence is odd. > […] with an academic pedigree from RSA Labs, you know, the guys who invented much of the cryptographic ecosystem we use today. Appeal to authority fails a little bit when RSA opens random Excel attachments from unknown untrusted sources - attached to an email that have to be retrieved from the junk mail folder. ( http://blogs.rsa.com/rivner/anatomy-of-an-attack/ ) EDIT…

As does ad hominem... Edit: realized I should probably explain. What an administrative assistant does in a social engineering attach has nothing to do with the quality of cryptographic research at RSA. Humans are ALWAYS the weak point in cryptography.

No, ad hominem is "You're wrong 'cause you're a jerk." DanBC pointed out that their opinion might not be as above reproach as is often assumed because of past lapses in good judgment.

Re: Don't use bcrypt

#19
So the author says to use PBKDF2 because it's researched and tested better than bcrypt, and then suggests scrypt as another alternative despite having, from what I can tell, less research done on it than bcrypt.

The crypto space can be intimidating to your average dev, but almost every app needs some sort of protection (at least for user information). I think the author is fair in wanting to push for the "default" to be PBKDF2 instead of bcrypt, but should he really be advocating a less-tested function in the same article?

Re: Don't use bcrypt

#20
PBKDF2 is worse than bcrypt.

scrypt is better than bcrypt.

bcrypt has the advantage of being both very good, and also broadly available on web platforms. scrypt does not yet have that advantage; when it does, I will start saying "just use scrypt".

But the simple fact is: all three of these functions are fine. ANY of them is a huge step forward from what people do without them.

"Just use bcrypt" is 1000x more effective as a meme than "just use adaptive hashing" (which is what all these constructions are).

So, while I have few specific technical qualms with this article (e.g. why do I care whether something is a PKCS standard or not?), the overall message is a bit hyperbolic.

Post reply on HN