5 ms·
The fact that we're still talking about password hashing shows how much we're losing the war on security. Whether or not a service stores passwords correctly ca
by kerkeslager 12y ago
The fact that we're still talking about password hashing shows how much we're losing the war on security. Whether or not a service stores passwords correctly cannot be verified by the user. There is no up-front cost to storing passwords incorrectly, so sites have inadequate incentive to store their passwords safely. As such users must use different passwords for every site. This simply is too technical an issue for most users: no amount of education will fix this, and password managers are too much work for most users. The end result is that even if you hash your passwords correctly, your user's passwords will be compromised on other systems and this will lead to accounts on your system being compromised.
The solution to this is zero-knowledge password proofs[1]. Essentially, you should never be passing your password to another party. Instead, you should be providing the authenticating party with a prover (analogous to a public key in asymmetric-key encryption, but based off your password) when you sign up. Then when you want to authenticate, you provide the server with a proof based off your password which exposes no information about your password but can be used to verify that you have your password using the prover (analogous to a signature in asymmetric-key encryption, but again based off your password). There are a number of ways to generate these provers and proofs using existing asymmetric-key algorithms such as RSA, ElGamal, or ECDSA.
Once this becomes pervasive, browsers and other network applications can provide obnoxious security warnings similar to those currently provided for untrusted certificates. This will create an up-front cost for people still using password hashing and shame them into moving to ZKPP, while providing a user-friendly way for users to tell if their password is being used insecurely. Only once people are no longer giving their passwords to anyone with a login page can we be sure that poor security on other sites won't compromise our own servers.
EDIT: Additionally, ZKPP mitigates some of the damage caused by man-in-the-middle attacks. Currently, if an attacker can gain access to communications between a user and server, they can access the password in plaintext when it is passing over the wire, even if it is adequately hashed on the server. This has both permanence (the password continues to be useful after the vulnerability is discovered--until the user changes their password) and wide application (the password can be used on multiple sites).
With ZKPP the attacker only has access to the proof of the password. This might allow the attacker to authenticate with the server during the attack. However, a proper ZKPP implementation uses unique nonces from the server to create the proofs and rejects non-unique proofs, so the proof cannot be used after the vulnerability has been fixed (the server will check that it is unique) and it cannot be used on other sites (the nonce is provided by the server).
[1] http://en.wikipedia.org/wiki/Zero-knowledge_password_proof http://en.wikipedia.org/wiki/Zero-knowledge_password_proof
- sarciszewski 12y ago> The fact that we're still talking about password hashing shows how much we're losing the war on security. This post was written years ago. > Whether or not a service stores passwords correctly cannot be verified by the user, and as such users must use different passwords for every site. Actually, in PHP applications, if passwords are stored plaintext or via unsalted MD5/SHA1 and are compared with the non-strict == operator, we can test it remotely. https://eval.in/108854 https://eval.in/108854 Granted, this is technically exploiting a security vulnerability, but it's pretty conclusive if it works. :) As for ZKPPs, I'm looking forward to SQRL for anonymous, Ed25519 challenge-response based authentication that takes place without requiring technical knowledge, personally.
- jerematasno 12y agoLink is four oh four, but I assume you're talking about a string comparison timing attack? Those don't really work over a network on modern hardware. Most string comparison functions actually compare words (8 bytes), and string comparison increases faster over the years than network latency. For more info see the Time Trial paper by Daniel Mayer and Joel Sandin ( https://www.blackhat.com/docs/us-14/materials/us-14-Mayer-Time-Trial-Racing-Towards-Practical-Timing-Attacks.pdf https://www.blackhat.com/docs/us-14/materials/us-14-Mayer-Ti... / http://matasano.com/research/TimeTrial.pdf http://matasano.com/research/TimeTrial.pdf / https://github.com/dmayer/time_trial https://github.com/dmayer/time_trial )
- sarciszewski 12y agoErr, no, I'm not talking about a timing attack. <?php $a = md5('240610708'); $b = md5('QNKCDZO'); echo "$a\n"; echo "$b\n"; echo "\n"; var_dump($a == $b); Run that code. Then change the == to an === and observe the difference.
- sarciszewski 12y agoAlso, not sure if I actually have to mention Matasano in a post to get you to see this, but it'd be great if you could link to a blog/github/Twitter/something on your HN profile. :)