| ▲ | fc417fc802 13 hours ago | |
That's not a bad idea and I believe it is how any modern not-a-website password based authentication works. Agreed that it does not address the attack vector of someone sniffing your password for site A and then logging into site A with it. However a key stretching algorithm (as opposed to just a hash) combined with salt does protect against an attacker logging into site B if the user reused his password. Of course for a website and assuming TLS then in practice it doesn't make much difference whether the hashing takes place client side or server side since an attacker sitting on the server could presumably serve up a compromised frontend. And without TLS a MITM could again compromise the frontend. But hashing client side does at minimum prevent the service operator from accidentally logging plaintext passwords, and anyway not all services are web apps. An attacker can't trivially change out the frontend if it's an app on my phone. | ||