I've read these:
https://hackernoon.com/im-harvesting-credit-card-numbers-and-passwords-from-your-site-here-s-how-9a8cb347c5b5
https://security.stackexchange.com/questions/8596/https-security-should-password-be-hashed-server-side-or-client-side
Is it worth hashing passwords on the client side
Password encryption at client side
https://softwareengineering.stackexchange.com/questions/76939/why-almost-no-webpages-hash-passwords-in-the-client-before-submitting-and-hashi
... and I STILL think that hashing your password on the client side is better. Let me explain.
The first cited article advocates that you should make the login page stand alone since there's no way to trust the entire codebase used in the client side. I think it makes sense.
And if it makes sense, how can you trust the entire codebase used in the server side?
So many upvoted answers above are claiming that "don't hash on client side, because TLS exists". That's true for preventing the password from sniffed, but is not related at all if it's about our potentially-evil server side code.
Also, I don't see any reason for the server side to hash the password if it's hashed already. If your server is cracked, you're done - regardless of the passwords - but the cracker can't use the obtained passwords anywhere else.
But since I can find no such answer, my statement seems to be fundamentally wrong. What am I missing?
If you think hashing BOTH client AND server side with a modern password hashing algorithm like PBKDF2, BCrypt, SCrypt, or Argon2 with a high work factor/iteration count is better, then I agree.
If you think hashing ONLY client side is better, then I have serious reservations about your threat model.
There are threats that hashing passwords server-side protects against, and threats that client-side protects against; here's a brief list:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With