Live data from Hacker News

What technical reasons are there to have low maximum password lengths?

security.stackexchange.com

31–40 of 128 posts

Re: What technical reasons are there to have low maximum password lengths?

#31

My bank limits my password to 8. When I questioned while creating my account, they asked me to visit the login page - in the login page you are asked for the answer of the security question and also presented with 8 input boxes - one for each of of the password characters - but having to enter only randomly selected few from the password ( for preventing key loggers from getting password, of course ). This seemed lik…

Wait. Doesn't that imply your bank is storing your password in plaintext, or at best salted and hashed each individual character of your password? (Which is still horrible, because it now takes O(n) instead of O(n^8) to crack stolen hashes)

Re: What technical reasons are there to have low maximum password lengths?

#32
post #20

Earlier quoted context omitted.

Because the developer is storing passwords in plaintext, and he wants to save database space. This seem far fetched, not sure what thought process would lead anyone to come to this conclusion. Even if you have a million users, you have ~8MB worth of passwords. I'd imagine even developers who are not competent in cryptography realise that.

If you allow truly unlimited -length passwords, malicious users can set gigabyte-long passwords. Whether you hash them or just store them, that's a DoS waiting to happen with every login. So, there actually is a reasonable limit for the length of passwords, email addresses, and most other user-editable fields that end up either being hashed, or shoved through to the database. That limit is just probably somewhere aro…

While this is true, hashes use a set number of characters. For example, SHA-256 hashes can be stored in 32-character hex strings. In that sense, there's no point in allowing for a variable length field for password hashes.

Re: What technical reasons are there to have low maximum password lengths?

#33
post #20

Earlier quoted context omitted.

If you allow truly unlimited -length passwords, malicious users can set gigabyte-long passwords. Whether you hash them or just store them, that's a DoS waiting to happen with every login. So, there actually is a reasonable limit for the length of passwords, email addresses, and most other user-editable fields that end up either being hashed, or shoved through to the database. That limit is just probably somewhere aro…

While this is true, hashes use a set number of characters. For example, SHA-256 hashes can be stored in 32-character hex strings. In that sense, there's no point in allowing for a variable length field for password hashes.

It's not only dealing with password length. You could DoS the server by tying up all threads in processing the upload. Uploading 4GB isn't instantaneous.

Re: What technical reasons are there to have low maximum password lengths?

#34

It's amazing how all the comments so far have entirely missed that it's the top answer that was really submitted, not the question.

lol, check out his other works: http://security.stackexchange.com/questions/9487/how-can-pay...

Re: What technical reasons are there to have low maximum password lengths?

#35
post #33

Earlier quoted context omitted.

While this is true, hashes use a set number of characters. For example, SHA-256 hashes can be stored in 32-character hex strings. In that sense, there's no point in allowing for a variable length field for password hashes.

It's not only dealing with password length. You could DoS the server by tying up all threads in processing the upload. Uploading 4GB isn't instantaneous.

That's why the client should perform the hash and only submit the result.

Re: What technical reasons are there to have low maximum password lengths?

#36
post #33

Earlier quoted context omitted.

While this is true, hashes use a set number of characters. For example, SHA-256 hashes can be stored in 32-character hex strings. In that sense, there's no point in allowing for a variable length field for password hashes.

It's not only dealing with password length. You could DoS the server by tying up all threads in processing the upload. Uploading 4GB isn't instantaneous.

I'm not arguing with that. I wholly agree with you that a client should not be able to upload 4 GB for the password field. I think I misread your first point as if it dealt with server-side storage.

Re: What technical reasons are there to have low maximum password lengths?

#38
I could swear learning somewhere that it's because forcing short/simple passwords makes it harder to recognize the password in keystroke logs, which is the attack vector banks face the most. Can't find any sources to back that up, though... has anyone else head this explanation?

Re: What technical reasons are there to have low maximum password lengths?

#40
post #35
post #33

Earlier quoted context omitted.

It's not only dealing with password length. You could DoS the server by tying up all threads in processing the upload. Uploading 4GB isn't instantaneous.

That's why the client should perform the hash and only submit the result.

No; this is effectively the same as doing no hashing at all. If your database gets stolen, people can replay the "hashed" passwords from it to the server, without having to hash them themselves.
Post reply on HN