I want to set up a system where I am allow to migrate encrypted password (hash password), from one system to another. How would i do this?
Say 2 month down the line, i found a encryption that is 10 times better and the current hash function has been proven without a doubt, totally vulnerable. How would I go about migrating user password from one type of hash to another (the better one).
You can slowly migrate from a method to another using the following technique. I cannot guarantee its quality so please take it with a grain of salt (pun not intended).
For example, consider the following table, that stores users:
Say that your outdated hash method is md5 and you want to replace it with the more secure
sha1, this is what you do:This migration can take a long time, so to speed it up you should e-mail your users asking them to log in or change their passwords.
Hope it helps.