4 ms·
Yes it totally is true. Hashes are a standard length, and you can feed any length passphrase into the hash algorithm. It wouldn't surprise me to see passphrases
by jessaustin 9y ago
Yes it totally is true. Hashes are a standard length, and you can feed any length passphrase into the hash algorithm. It wouldn't surprise me to see passphrases limited to e.g. 256 chars anyway, but 27 smells very bad. What system limitation leads to this particular number? It smells like a DB column width to me.
- user5994461 9y agoJust because there is a limitation on password length doesn't imply they store the password in clear text.
- nthcolumn 9y agoHe never said anything about 'clear text' you did and yes that is usually how it is with this 'tell'. It might be some other weakness. Smells like homebrew security. Nice. They are doing it wrong and the wrong shows. That is definitely going in my initial survey.
- peteretep 9y agoIt may not imply it, but it strongly suggests it.
- Piskvorrr 9y agoIt does not mean they store the password in clear text, but the implication is surely there. (It does not mean what you think it means.)
- thaumasiotes 9y agoPassword hashes are specifically designed to be computationally intensive. You can feed any length of password into a hash, but the longer the password is, the more work you have to do. "No length restriction on passwords" is a common and valid report on HackerOne, because servers that do store passwords securely can be DoSed by someone providing a long password and forcing the server to hash it.
- wongarsu 9y agoThat is an important consideration, but it still sets reasonable password length limits in the hundreds or thousands of characters.
- bigiain 9y agoNIST's latest recommendations say "at least 64 characters". I doubt there's anyone who can make a strong argument that "64 characters isn't enough", and I doubt even intentionally computationally expensive password hashing is going to end up with significant resource usage with 64 or 128 character strings. I wouldn't want my shared hosting WordPress site with a password plugin to need to calculate the bcrypt hash of the entire text of War And Peace, bit I suspect the difference between bcrypting "password123" and a random 64 or 128 character string is insignificant enough to be ignored (but I've never tried benchmarking it, so I'm open to changing my mind here if anyone has links to benchmarks that show otherwise...)
- thaumasiotes 9y agoI usually see recommendations for a 72 character limit. I doubt there's any particular reason for 72, but as you say, it's enough. Login attempts (should) get rate limited independently of password length limits, which makes the difference between hashing 8 characters and hashing 72 characters even less meaningful.
- CodesInChaos 9y agoI'd guess it's because bcrypt only supports 72-byte inputs (though there are workarounds, like pre-hashing)
- tracker1 9y agoWhich is why you add a randomized wait/sleep before responding to an invalid login attempt, to, hopefully slow down "tries" having a cache for recent tries by IP as well would assist in mitigation. The strength of the hashing is also of issue... for example pbkdf2 is very compute heavy. If you're working in an environment that has a FaaS (AWS Lambda, etc), it may be worthwhile to have this as an async function call so as not to block your primary application. Another option is to break authentication into its' own application, and have that return a signed auth token to your application. There are lots of options.