Not that it's much better. Is it so hard to allow 50 character passwords?
Not that it's much better. Is it so hard to allow 50 character passwords?
To upload 100s or even more than a few megs you need a multipart message, a password form won't accept MP http requests.
https://github.com/plataformatec/devise/blob/88724e10adaf9ff...
They hash in the browser: the only way they can mess with it by producing silly outputs, but that only hurts them.
Requiring me to trust your code in order for you to decide whether or not to trust me is asking too much.
In the interests of hewing closest to cryptographic reality, I design not to allow a password longer than the algorithm can usefully use.
Everyone's been saying "just use bcrypt", but bcrypt has too many gotchas to be the default choice. We really need to work on getting scrypt and argon2 into the most popular programming languages and frameworks a.s.a.p.
If you are currently using something else (say salted md5 or even just plain md5), you can migrate your passwords to scrpyt(current_hash()) without having to change everyone's password and/or wait for everyone to log in.
See also this comment thread: https://news.ycombinator.com/item?id=12549110
There are user experience battles when talking about forcing a million users to change their passwords in a real system. Hashing the hash may be vastly preferable to management nixing the security upgrade. A password updating schema that changes the hash as users login and eventually locking the accounts of users who have not logged in for an extended period of time can accomplish rolling the hashes without having to tell users to change their passwords.
http://blog.ircmaxell.com/2014/03/why-i-dont-recommend-scryp...
In order to be able to tell people to "just use scrypt", we would need to have a sort of standard wrapper that uses the correct parameters by default and produces identical results in every common programming language.
This has got to be the underlying problem of modern security. By the time a best practice is well known, it's no longer best practice.
On the flipside, isn't there a risk of moving too quickly? There's a certain culture of caution because there's something to be said for "if it aint broke, don't fix it." and even if something is broke, how certain are we that cool new encryption algorithm is better or safer?
I haven't looked deeply at this, but using "key stretching" that clips your output characters to such a small space smells very suspect to me.
Remember: there is only 32 bytes of actual output there, regardless of whether you represent it as hex or binary. And since bcrypt can't take more than 56 bytes of input, you are clipping that down to the equivalent of 23 bytes.
Or you could use a better KDF, e.g. scrypt (even PBKDF2 is better on this metric). Artificial password-length restrictions are symptomatic of poor design.