3 ms·
Manager: We need to ensure people aren't using similar passwords on reset, but we can't store the password unhashed. Developer: Similar passwords? Or Same pas
by kbenson 10y ago
Manager: We need to ensure people aren't using similar passwords on reset, but we can't store the password unhashed.
Developer: Similar passwords? Or Same passwords. Similar is hard.
M: Similar. Can't let people be lazy with their passwords.
D: Well, if we really have to do it, I guess we could store a bunch of hashed variations of the password, but...
M: Good! Let's do that.
D: ...but that could be a massive amount of space for long passwords.
M: Okay, we'll just enforce short passwords then.
D: ...doesn't that more than negate all the benefit of preventing similar passwords when rotating them?
M: Doesn't matter, the CEO said he wants this. Hop to it!
Developer laments the stupidity of their life
- Imagenuity 10y agoBeen there, fought that.
- gpawl 10y agolonger passwords don't hash to longer values (within any reasonable variation of order of magnitude in input size). That would defeat the purpose of hashing
- squeaky-clean 10y agoBut a longer password would require more combinations for similarity than a short password.
- kbenson 10y agoYes, that's the point being made.
- gpawl 10y agoAh. Thanks for clarifying. Still, permutations longer hashes don't require substantially more space. Password storage is a completely trivial fraction of total storage -- Compare to a single photo, or a video! And further still, they don't need to _store_ all the hash variations https://security.stackexchange.com/questions/53481/does-facebook-store-plain-text-passwords/53483#53483 https://security.stackexchange.com/questions/53481/does-face...
- squeaky-clean 10y agoWow, it slipped my mind entirely that you could do the permutations when you create the new password but before verifying, rather than after creating a password. That's a great idea, and embarrassingly obvious in retrospect.
- spinsser 10y agoWhy would they need to store the hash for all the combinations? Why not generate a list of similar passwords to the new password, hash them all using the same salt of the previous password and then compare them.
- kbenson 10y agoDepending on what is considered "similar", every extra password character may exponentially increase the number of similar passwords.
- joshvm 10y agoWell in my case, there was only an 8 character limit, so there was a least a bound on it. I didn't investigate how far you could deviate from an old password before it was allowed though.
- cm2187 10y agoIt's funny because "DecemberSixteen" is very different from "MarchSeventeen" as a password from a characters point of view but is trivial to extrapolate if you know the guy has to change password every 3 months.