3 ms·
Because a lot of passwords aren't particularly strong, and thus are feasibly crackable when you use something like SHA-256. You can test millions or billions of
by mikeash 12y ago
Because a lot of passwords aren't particularly strong, and thus are feasibly crackable when you use something like SHA-256. You can test millions or billions of candidates per second on commodity hardware, and you'll be able to recover a lot of passwords.
The purpose of systems like PBKDF2, bcrypt, scrypt, etc. is to intentionally slow the whole thing down so that it takes on the order of one second to test a candidate. This is a minor burden for normal use, since you don't check passwords very often, but it makes it vastly harder for an attacker to crack a password.
Edit: just to put some numbers on this, it looks like high-end GPUs can brute-force about 2 billion SHA-256 hashes per second. That means that an eight-character alphanumeric password could be recovered from a SHA-256 hash in less than a day, on average. Add 20 non-alphanumeric symbols to your character set and you're still only looking at about six days. Eight alpha+num+symbol characters isn't a terribly great password anymore but it still shouldn't be recoverable if your password database leaks.