r/AskComputerScience • u/super_potato_boy • May 20 '25
why does password length affect strength if passwords are salt-hashed?
My understanding is that passwords are hashed into long, unpredictable strings via a one-way hash function. Why does the input length matter?
78
Upvotes
View all comments
37
u/MrColdboot May 20 '25
Because someone can generate a list of possible passwords, then run the same one-way hash function and see if they match. It's just guessing what the password might be. Shorter passwords mean less guesses until you get it right.