4 ms·
If the server sends a nonce and the browser/client responds with hash(password + nonce), a replay attack is not possible.
by muldvarp 6y ago
If the server sends a nonce and the browser/client responds with hash(password + nonce), a replay attack is not possible.
- lordlimecat 6y agoTechnically, you should be doing hash(hash(password) + nonce). The server should not know the password, only the password's hash.
- fhars 6y agoThat just turns hash(password) into the effective plain text password, which the server must know in this scheme.
- lordlimecat 6y agoCorrect. The server should be storing the password hashed as Hash(Password+Salt) to make it impractical for an attacker to recover the user's password. Recovering whatever the server has stored is typically going to be sufficient to authenticate the user, but storing it as a hash mitigates some threats.
- fhars 6y agoYeah, but then the server must know the plaintext password to check the client reply, which is exactly the problem password hashing schemes were designed to solve.
- lordlimecat 6y agoThat issue is solved by simply having "hash(password+salt)" the thing the server has stored and is checking. In other words you can combine salts + hashes + nonces to both eliminate the server's need to know the password and the possibility of a replay attack.