42 ms·
It's much safer to just hash twice: the first time using your old hash function and again using a secure hash. Then to migrate you only have to update all your
by jaf656s 13y ago
It's much safer to just hash twice: the first time using your old hash function and again using a secure hash. Then to migrate you only have to update all your customer's password hashes in place. Additionally, if you lose your database, you don't lose all the old, weak password hashes.
- rmrfrmrf 13y agoOoo, I hadn't thought of that! For some reason, I had it in my mind that some insecure hashing algorithm as the base would result in an insecure resulting hash, but of course that all goes out the window when your whole password table is out in the open. I'm glad you mentioned "safer", because for some reason rurounijones's approach made me nervous, but I couldn't quite put my finger on it. Here's some more discussion on the issue: http://crypto.stackexchange.com/questions/2945/is-this-password-migration-strategy-secure http://crypto.stackexchange.com/questions/2945/is-this-passw... (I found that from here: http://stackoverflow.com/questions/3955223/password-hashing-how-to-upgrade http://stackoverflow.com/questions/3955223/password-hashing-...).