Re:Why you shoud never use your favorite password on News.YC...
by breck on Saturday May 31, 2008 @09:06PM
(#205543)
I 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?
Re:Why you shoud never use your favorite password on News.YC...
by orib on Saturday May 31, 2008 @09:15PM
(#205548)
You 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)
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!")
Re:Why you shoud never use your favorite password on News.YC...
by eru on Sunday June 01, 2008 @04:20AM
(#205753)
You should use individual salting for each password to make this at least a bit more difficult.
Re:Why you shoud never use your favorite password on News.YC...
by rw on Saturday May 31, 2008 @09:51PM
(#205573)
Provided, of course, that P != NP.
Re:Why you shoud never use your favorite password on News.YC...
by tptacek on Saturday May 31, 2008 @10:19PM
(#205583)
Message digest functions are not, generally, number-theoretic.
Re:Why you shoud never use your favorite password on News.YC...
by cperciva on Saturday May 31, 2008 @11:41PM
(#205620)
How is this relevant? The question of P ?= NP isn't limited to number-theoretic functions -- if P = NP then it is possible to find a preimage to any (polynomial time) hash function in polynomial time.
Re:Why you shoud never use your favorite password on News.YC...
by tptacek on Saturday May 31, 2008 @11:44PM
(#205623)
You're right.
Re:Why you shoud never use your favorite password on News.YC...
by jward on Sunday June 01, 2008 @04:04AM
(#205745)
A 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.
Re:Why you shoud never use your favorite password on News.YC...
by adamsmith on Saturday May 31, 2008 @06:45PM
(#205478)
and hash the passwords on the browser.
Re:Why you shoud never use your favorite password on News.YC...
by anewaccountname on Saturday May 31, 2008 @08:21PM
(#205521)
I agree that that will be safe, provided you use the same browser-side hash function that the bank uses
Re:Why you shoud never use your favorite password on News.YC...
by theg on Sunday June 01, 2008 @11:05AM
(#205890)
You 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.)
Re:Why you shoud never use your favorite password on News.YC...
by tptacek on Sunday June 01, 2008 @11:56AM
(#205933)
You'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.
Don't store user passwords in plaintext.