3 ms·
The server needs the plaintext password once, to generate a salted hash. From then on, it can send the salt and a challenge to the client. The client hashes t
by ams6110 15y ago
The server needs the plaintext password once, to generate a salted hash. From then on, it can send the salt and a challenge to the client. The client hashes the password, salt and then hashes that with the challenge and sends it back to the server. The server hashes the challenge with its salted hash and they should match.
This still has to be done over SSL because otherwise the JS doing this on the client side is subject to MITM.
- Xylakant 15y agowell. but if you're using ssl then you could as well send the password over the wire and have it properly stored with bcrypt on the serverside. And if I control the application I can make the client emit a plaintext password by sending an empty salt. The result is a simple hash of the password which can be reverted with a regular rainbow table. If the client uses bcrypt, I send a work factor of 1 and construct a proper rainbow table (that's rather simple). Or I could just have the javascript send the password in plain. So there's no gain here.