Hacker News new | past | comments | ask | show | jobs | submit login

You don't even have to make a single line change to your backend to fix this. You can fix this entirely on the frontend by just applying a digest hash on the password before sending to the backend for proper password hashing. This way you can even support "unlimited" length password.



That's a very much backwards incompatible change: password that used to work no longer does.

Sure, just put your 500M users through a forced-password reset.

Theoretically, it might also lead to weaker passwords depending on the hash size (that's how you support unlimited lengths by transforming a larger space into finite one) or any issues with the hashing algorithm uncovered in the future.

One thing to keep in mind is that the hash actually becomes the password, so I can imagine plenty of buggy implementations where a developer does not do what you advise ("proper password hashing"): "hey, it's already hashed, I can just store it as-is".


Yeah, just CRC32 the password on the frontend, should be fine


No, use a cryptographic hash function. If you use a CRC32 you will massively reduce the password space and make it easy to find collisions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: