-
The current encrypt/decrypt allows for one key. I would like the ability to have unlimited keys (possibly number them: 1,2,3,nnnn). Allowing for the ability to specify which key would be used for the encryption/decryption call. This allows for the ability to use a different encryption key based upon table and/or a User. The goal is not to necessarily to stop a hacker, but to make it as difficult as possible for them to decrypt the data. As multiple companies have stated: It isn't a matter of if a hacker will steal the data, it is a matter of when. Let's take the following example: Now assume we have the same table. Also, just because we specified the key for the Customer's data in the custPIII table, doesn't mean that we would use the same key in another table, I wouldn't. My preference is to NOT replace the Laravel encrypt/decrypt feature. Enhance maybe, not replace. Any suggestions how I could accomplish this ? Please ? Or if I am in the wrong place for this question/request ? If so, where should I be entering this ? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can create multiple instance of the encrypter by passing the encryption key: But the question is where does the keys are coming, you're app needs them to access the data? Generally when both the database and your app key is stolen than probably your source code is accessible too, so any key generated from the data is trivially accessible too. |
Beta Was this translation helpful? Give feedback.
You can create multiple instance of the encrypter by passing the encryption key:
new Encrypter('key', 'cipher');
But the question is where does the keys are coming, you're app needs them to access the data? Generally when both the database and your app key is stolen than probably your source code is accessible too, so any key generated from the data is trivially accessible too.