Password Hashing vs Encryption for long term viability
Posted on 2016-08-03
I currently store all of our users passwords in our database using AES encryption with unique salt per user combined with a site specific encryption key.
I'm looking at increasing our security by implementing password hashing so that the users passwords are not stored in our database in a way that they can be retrieved if the database becomes compromised.
The issue that I am slowly realising is that once I implement password hashing I will most likely be unable to change algorithms in the future.
For example :
Originally people were told to use MD5 hashing on their passwords.
That became compromised/easily cracked so they started using SHA hashing.
That again changed and people were told to use the more secure SHA128, SHA256, SHA512 algorithms etc etc
If my users passwords were originally stored as an MD5 hash am I stuck using that forever? Without access to the original password I'm unable to change to a newer hashing algorithm.
Before I hash my passwords and delete my encrypted passwords I would like to know how people handle the task of upgrading hashing algorithms?
Or should I stick to using encryption?