laravel-database-encryption icon indicating copy to clipboard operation
laravel-database-encryption copied to clipboard

Decryption not working if APP_KEY is changed

Open sajeel-sheikh25 opened this issue 5 years ago • 3 comments

Hi. I have encrypted my data with versioning true and now I have changed my APP_KEY and the decryption is not working. If I change a value then only that is shown in the result set after data retrieval.

sajeel-sheikh25 avatar Apr 30 '20 11:04 sajeel-sheikh25

I assume its because it was encrypted using a different key

heyaj19 avatar Sep 20 '20 17:09 heyaj19

any update on it.This is going to disaster if it won't work with the new encryption key.

hassantahir01 avatar Dec 18 '20 14:12 hassantahir01

It seems to me like you're missing the whole point of encryption. Key is not supposed to change, it has to be backed up securely. The idea is that someone without the key can dump the whole DB without being able to decrypt encrypted fields

biscofil avatar Dec 18 '20 17:12 biscofil