Last week, I tried to register for a service and was really surprised by a password limit of 16 characters. Why on earth yould you impose such strict limits? Never heard of correct horse battery staple?

You are viewing a single thread.
View all comments View context
-8 points
*

“If a company tells you your password has a maximum length…”

Uhhh no. Not at all. What so ever. Period. Many have a limit for technical reasons because hashing passwords expands their character count greatly. Many websites store their passwords in specific database columns that themselves have a limit that the hashing algorithm quickly expands passwords out to.

If you plan your DB schema with a column limit in mind for fast processing, some limits produce effectively shorter password limits than you might expect. EVERYONE has column limits at least to prevent attacks via huge passwords, so a limit on a password can be a good sign they’re doing things correctly and aren’t going to be DDOS’d via login calls that can easily crush CPUs of nonspecialized servers.

permalink
report
parent
reply
15 points

It doesn’t matter the input size, it hashes down to the same length. It does increase the CPU time, but not the storage space. If the hashing is done on the client side (pre-transmission), then the server has no extra cost.

For example, the hash of a Linux ISO isn’t 10 pages long. If you SHA-256 something, it always results in 256 bits of output.

On the other hand, base 64-ing something does get longer as the input grows.

permalink
report
parent
reply
3 points

Hashing on the client side is as secure as not hashing at all, an attacker can just send the hashes, since they control the client code.

permalink
report
parent
reply
3 points

Then you can salt+hash it again on the server.

permalink
report
parent
reply
2 points

Hashing is more about obscuring the password if the database gets compromised. I guess they could send 2^256 or 2^512 passwords guesses, but at that point you probably have bigger issues.

permalink
report
parent
reply
5 points

Can you not simply have a hashing algorithm that results in a fixed length hash?

permalink
report
parent
reply
7 points

That would be all of them, yes.

permalink
report
parent
reply
4 points

Just in case someone runs across this and doesn’t notice the downvotes, the parent post is full of inaccuracies and bad assumptions. Don’t base anything on it.

permalink
report
parent
reply
0 points

Why not just store the first X characters of the hashed password?

permalink
report
parent
reply
1 point
*

The hash isn’t at all secure when you do that, but don’t worry too much about it. GP’s thinking about how things work is laughably bad and can’t be buried in enough downvotes.

permalink
report
parent
reply
0 points

Where can I read more about how it’s not secure?

permalink
report
parent
reply

Cybersecurity - Memes

!cybersecuritymemes@lemmy.world

Create post

Only the hottest memes in Cybersecurity

Community stats

  • 2.4K

    Monthly active users

  • 79

    Posts

  • 1.2K

    Comments