|
|
|
|
|
by msbarnett
2566 days ago
|
|
It’s explained in the linked blog post in the chain you’re replying to, but: - Set all password hashes to Bcrypt(existing SHA-1 Hash) - Create a new flag column to track whether the password is upgraded to straight Bcrypt. - If flag is false, compare stored hash with Bcrypt(SHA-1(user input)). If it matches, log user in and replace stored hash with Bcrypt(user input). Set flag true. - If flag is true, compare stored hash with Bcrypt(user input) |
|
I mean, A’s hash collision issues will just be applicable as well into B’s space, right?
And I would go for rehashing at next login, and, after a while, identify and disable (no login possible) the legacy accounts with their deprecated hash, forcing users to change password at their next login (if it comes one day, that is).
(Also, I would not use a Boolean, but some integer to identify what is the current algorithm to use, to cope with future deprecation, but really a small implementation detail here)