3 ms·
You prevent a lot of these problems by hashing passwords as soon as possible (i.e., on the client).
by amelius 9y ago
You prevent a lot of these problems by hashing passwords as soon as possible (i.e., on the client).
- amhokies 9y agoWouldn't that make it easier for someone that has access to hashed passwords in the case of a database leak? They would just have to submit the username and the hashed password (which they now have).
- etruong42 9y agoYou're right, but the attacker won't get the user's original password that they probably reuse elsewhere. If it's just your authentication system hashes that are compromised, the damage can be contained.
- larkeith 9y agoWhile there is merit to clientside hashing, you should always hash serverside as well, lest a leak prove catastrophic.
- jageen 9y agoIn this case client side will have our algorithm (i.e in JavaScript) + private key which we will use to hash the password. If this is the case I could not see any different between giving hacker password or hash-password with algorithm and key.