5 ms·
> Sending passwords plaintext over the wire isn't good either, even with TLS. You don't want your server to have any knowledge of the plaintext password. This
by thaumasiotes 6y ago
> Sending passwords plaintext over the wire isn't good either, even with TLS. You don't want your server to have any knowledge of the plaintext password.
This is literally impossible to avoid. Whatever the server receives, that's what the password is.
- ilammy 6y agoThis is literally untrue. Zero-knowledge comparison protocols exist [1], and their goal is to prevent malicious party from obtaining any knowledge of the secret. Yes, the genuine server will have its copy of the password (or its hash, whatever) and the user will have their copy of the password too. What you don't want is to have the user send their copy of the password to a place which looks like your server but isn't. [1]: https://www.cossacklabs.com/files/secure-comparator-paper-rev12.pdf https://www.cossacklabs.com/files/secure-comparator-paper-re... EDIT: I mean, yeah, you're right in the sense that whatever you send to the server is used to authenticate you, so that whatever is a 'password' of a sort by definition. However, using the raw password as is for authentication is not a great idea. If you intercept the password, you will be able to compromise any further authentications. There are alternatives that avoid this.
- DarthGhandi 6y agoAnother alternative is a PAKE. You'll never have a password sent over the wire. For some reason PAKE schemes aren't that commonly used despite having a solid grounding. Matthew Green has a few good articles on them.
- thaumasiotes 6y ago> You'll never have a password sent over the wire. As far as I can see, you do need to send the full password over the wire once when you set its value. But the server doesn't need to remember it. > For some reason PAKE schemes aren't that commonly used despite having a solid grounding. It doesn't look like something you can implement unilaterally. How's browser support? (Interestingly, I guess you could implement it unilaterally between your server and client-side javascript...)
- DarthGhandi 6y agoI'm not sure if this is coming down to semantics here but the password is essentially encrypted to everyone except the client, I wouldn't call that sending a password over the wire, you may disagree. This is a unique value for every login attempt. Probably the most common scheme is SRP. https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol https://en.wikipedia.org/wiki/Secure_Remote_Password_protoco...
- deleted 6y ago[deleted]
- thaumasiotes 6y agoNo, you're right; I wasn't talking about login attempts. I was thinking that PAKE is a way to establish that two parties have common knowledge of a shared secret, and so the password needs to be shared once in order to become a shared secret. But the protocol you link doesn't transfer the password even when setting it. (Weirdly, the article explicitly notes that s, the salt Carol applies to her own password, is shared with the server and sent over the wire during login. But the salt never appears to be used by the server in any capacity. And the instruction "Carol must not share x with anybody, and must safely erase it at this step, because it is equivalent to the plaintext password p" doesn't make a lot of sense; presumably Carol isn't going to erase her knowledge of her password -- what does erasing x add? [The only thing making the password equivalent to x is that the server transmits the value s during the login attempt. If it didn't do that, x would still be useful, but the "password" would be worthless, unless of course s was stored alongside the password...])
- vlz 6y agoTrue, but if the hashed password is compromised, the user‘s other accounts with the same password might remain safe. So it‘s not about protecting one single account but protecting the user.
- rl3 6y ago>This is literally impossible to avoid. Whatever the server receives, that's what the password is. Hence why I specified no knowledge of the plaintext password, which is absolutely possible to avoid sending over the wire.
- thaumasiotes 6y agoSure, if you've implemented SRP as suggested sidethread, you don't need to send the password over the wire when logging in. But you're not talking about that. You, rl3, are just misunderstanding what a password is. If the user types qwe123 to log in, and you hash that in Javascript to 200820e3227815ed1756a6b531e7e0d2, and send 200820e3227815ed1756a6b531e7e0d2 to the server, then the user's plaintext password is 200820e3227815ed1756a6b531e7e0d2.
- pests 6y agoRight, but you are missing the point. This is a thread about revealing a users "choosen password" to a fake or compromised server. If you aren't going to fully implement SRP like you mentioned, I'd rather a server only see a hash than my actual "chosen password". I understand the hash becomes the password to that server. That's okay. But each server gets its own hash that's unique. It cant be correlated in dumps or used on our her sites with the same email. That server can now never know the password my grandma also uses for her email, bank. and every other website across the internet.
- rl3 6y agoThanks. That was a really clear and concise explanation.
- thaumasiotes 6y ago> I understand the hash becomes the password to that server. That's okay. But each server gets its own hash that's unique. It cant be correlated in dumps or used on [other] sites with the same email. First: > It cant be correlated in dumps Hashing client-side doesn't help with that. The password already couldn't be correlated in dumps, because it was salted server-side. > or used on [other] sites with the same email. This depends on how Mallory obtained the password. It was already hashed and salted server-side. So consider the example where the user entered a simple password P, the client side hashed P to become C, and the server side rehashed C to become S. C is what went over the wire. If the server is compromised and the password database is dumped, Mallory gets a bunch of random-looking hashes. She has to crack those. She could do that by enumerating the space of C possibilities -- very long random strings of binary data -- and hashing them once. Or she could do that by enumerating the space of P possibilities -- the things a user types in order to log in -- and hashing them twice.[1] The first option is essentially impossible. But the second option is easy. (Assuming your grandma used a password that is easy to guess.) Mallory will use the second option. And the password she learns from that approach will transfer perfectly to every other website. [1] rl3 mentioned salting the user-password client-side. If the user is allowed to log in from multiple machines, then this salt must be stored on the server (so that it can be communicated to the user when the user attempts to log in from a new machine), and will be available to the attacker who's compromised the server.
- imtringued 6y agoIt's not impossible. SCRAM exists. >Whatever the server receives, that's what the password is. I'm not sure what you can do with a "password" that is only valid for a single login and tied to a specific certificate but hey if you want to ride on a technicality I won't stop you. The plain text password that the user types into the input field still remains unknown to the server. https://en.wikipedia.org/wiki/Salted_Challenge_Response_Authentication_Mechanism https://en.wikipedia.org/wiki/Salted_Challenge_Response_Auth...