3 ms·
I get md5 is pretty weak now, but what's wrong with sha-256 and a salt?
by bigcohoneypot 7y ago
I get md5 is pretty weak now, but what's wrong with sha-256 and a salt?
- bawolff 7y agoThe md5 weakness (that everyone talks about) is about collision resistance, which isn't relavent to password hashing. Generally you want slow, high cpu & memory hash functions for password hashing. This is the opposite of what md5/sha/blake aim for, as they want to be fast as possible. A fast hash allows the attacker to make many guesses very quickly (i think you can get something like 2 billion sha256 hashes a second with high end gpus). A slow hash makes it harder for the attacker to take lots of guesses (adding high mem usage helps protect against using alternate architectures like fpgas to speed things up). Anyways, for passwords use something like argon2.
- nneonneo 7y agoThe Bitcoin network can perform some 10^20 SHA-256 hashes per second. That’s one 11-character upper/lowercase alphanumeric password PER SECOND. A practical password cracking rig can probably do upwards of 10^11 hashes per second. The same rig can only do 10^5 bcrypt hashes per second.
- basilgohar 7y agoSalting only protects against rainbow tables, but does next to nothing against brute force attacks because the salt is usually stored adjacent or even as part of the stored password hash.