3 ms·
I don't want to be liable if one of my servers is hacked and someone's bank account gets accessed because of it. Don't store user passwords in plaintext.
by cperciva 18y ago
I don't want to be liable if one of my servers is hacked and someone's bank account gets accessed because of it.
Don't store user passwords in plaintext.
- adamsmith 18y agoand hash the passwords on the browser.
- anewaccountname 18y agoI agree that that will be safe, provided you use the same browser-side hash function that the bank uses
- theg 18y agoYou can't have it both ways. If you are hashing the password before it is sent from the client to the server, you need the raw password on the server side. (Assuming you are concatenating it with a server-provided random value before the hashing.)
- tptacek 18y agoYou're assuming they're using a secure challenge response protocol. They're not. They're sending password-equivalent hashes over the wire, so they can say they're not sending passwords. You'd be right to point out that this is a lot of silly acrobatics to go through to avoid a single SSL login page.
- breck 18y agoI use a hash. I don't quite know how secure that alone is though. My thoughts are if my server is compromised(and an endless stream of attempts lead me to believe it's not extremely unlikely) having both the scripts with the database could deduce the passwords. Am I wrong?
- orib 18y agoYou are. One of the defining properties of a cryptographic hash is that you cannot easily deduce the input given the output, nor can you easily construct an input to produce a given output. (see the overview at http://en.wikipedia.org/wiki/Cryptographic_hash http://en.wikipedia.org/wiki/Cryptographic_hash) However, it's still possible to do a dictionary attack on the database of hashes ("is the hash of "password" the same as the user's password hash? yes? Bingo!")
- jward 18y agoA hash is a one way thing so you can't reverse it. However, if they have that much access it'd be trivial to just change your script to dump the username/password combo into a plain text file whenever the login succeeds.