3 ms·
You raise some good points, but the issue with MD5 are largely down to speed. MD5 is fast - and while computational speed is normally your friend, with cryptog
by laumars 12y ago
You raise some good points, but the issue with MD5 are largely down to speed.
MD5 is fast - and while computational speed is normally your friend, with cryptography it's your worst enemy. Simply put, the faster the cipher, the more break in attempts a cracker can have per second.
This is why password strengths are often represented in duration (ie how many years would it take to crack). Though those figures are hugely estimated - to the point of being practically worthless.
- kazinator 12y agoBut other digest algorithms are also fast, so the argument is stupidly strong; it should be "do not use any fast message digest algorithm in its naked form for password hashing".
- sarciszewski 12y agoThat's essentially what is meant when people say "use a 'password hashing' function, not a mere cryptographic hash"
- kazinator 12y agoThanks folks; I brushed myself up on this thanks to this discussion. An interesting feature of some dedicated password hashes is that the salt input can contain encoded parameters, such as the number of rounds or maybe even choice of algorithm. This means that we can "future proof" a hash to some extent, while allowing it to support existing old passwords, while increasing the number of rounds for new passwords. A plain message digest function doesn't have these features, needless to say.
- sarciszewski 12y agoYou can also encode "version" information (e.g. $2a$ vs $2y$ for bcrypt) so that, if a vulnerability is discovered in a prior implementation, you can re-hash with a safe algorithm transparently without having to go "everyone, reset your passwords!"
- laumars 12y agoThey might appear fast on a personal web server, but the point behind it is the accumulative effect. When you have millions of possible password permutations to attempt against thousands of passwords hashes (as crackers would when they have a stolen password database) the additional overhead that more computationally expensive ciphers have makes a huge difference.