3 ms·
There's a portion that says that using SHA-1 for generating a key is bad. Can anyone explain why ?
by laex 12y ago
There's a portion that says that using SHA-1 for generating a key is bad. Can anyone explain why ?
- tedunangst 12y agohttp://codahale.com/how-to-safely-store-a-password/ http://codahale.com/how-to-safely-store-a-password/
- jerematasno 12y agoThat link is not wrong, but scrypt is probably significantly better than bcrypt, and PBKDF2 is not terrible, if you don't have a handy bcrypt/scrypt library.
- StavrosK 12y agoBecause hash functions are really fast, so using them to derive keys from low-entropy sources is really bad: Someone could just iterate over the low-entropy source and get the SHA-1 of each one in virtually zero time. Brute force is really fast, and hash functions don't help you make it slower at all.