I ran into a client that is running on PHP 5.6, and it looks like it was made back, right when encryption was starting to be a thing but supported decryption for passwords. Now, they do NOT need decrypting the password, it just has a script that decrypts the hashes in the DB using mcrypt_get_iv
to verify it is correct.
They are using something similar to
mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $encryptkey, $password, MCRYPT_MODE_ECB, $iv);
to encrypt their passwords.
Any ideas how I could keep the encryption but verify passwords without decrypting? They have thousands of users over 20 years. The only option I could think of was to make a new pw_hash
field and use their current decryptor and run through a new system and remove this old stuff.
I was able to upgrade their PHP to 7.1. but after that mcrypt is removed.
EDIT
I feel like I asked what I wanted, but will try to clarify. I want to use something other than mcrypt due to it being deprecated, but not lose thousands of users passwords. Currently they are stored and verified using a decrypt and encrypt function that is reliant on mcrypt/mcrypt_get_iv.
Once I upgrade to > 7.1 their login and registration process will break.