2 ms·
When moving from a weak password hashing scheme to a stronger one you can keep old passwords around and just hash them again with the new system (that is, run y
by mambodog 13y ago
When moving from a weak password hashing scheme to a stronger one you can keep old passwords around and just hash them again with the new system (that is, run your existing hashes through your new hashing function), and mark them as using the twice-hashed scheme. Your password comparison function can have a special case to use the twice-hashed scheme when comparing passwords on login. Users are migrated to the new scheme upon updating their password.
This is the approach which Drupal supports for migrating from Drupal 6 (which uses unsalted MD5) to Drupal 7 (salted SHA-512).
- 6cxs2hd6 13y agoSo if I understand correctly, they could use the same approach when updating to do what they really ought to -- use bcrpyt? As a result the very oldest pwds would be thrice encoded -- from unsalted MD5 to salted SHA-512, and run that through bcrpyt?