by hvidgaard · 9y ago · 0 comments
/edit: Security wise sending the password, means you trust the server to handle the password correctly. For all we know it stores the plaintext password. If we send the hash, we KNOW that it does not store the password. It's an important distinction to make in real world systems. No matter how much best practices dictates to not reuse passwords, it happens as long as humans are involved.
On the other hand, if the password is hashed client side, we KNOW that it cannot be stored as plaintext, because the server never knows it.
> If the server hashes the password, that is effectively the same as storing the password in cleartext.
The server hashes passwords to prevent a database leak or bad actor from effectively compromising all accounts at once. It is also a service to the users who — despite being advised not to do so — reuse the same password everywhere. With a proper hashing method (e.g., bcrypt, PBKDF2) these hashes are effectively one-way.
As a user, any password you supply should always be treated as a shared secret between you and the service. We are well past the age of using the same password for everything.
Agreed, but that does not change the fact that you shouldn't be sending the password to the server, since that is thrusting that the server handles it correctly. If you gurantee that passwords will never be reused, the password is as good a secret as the hash. But if you cannot gurantee this, and that includes nearly all real world systems with humans users, it makes an important difference security wise.