Hi,
I am looking for a good solution in which I can encrypt my data in the database in such a way that it supports the database queries like - __in, __icontains also.
Thanks in advance
Hi,
I am looking for a good solution in which I can encrypt my data in the database in such a way that it supports the database queries like - __in, __icontains also.
Thanks in advance
What kind of data is that you want to encrypt and why would you do that?
Consider cases in which I have to encrypt email in the database while user registration, Parallelly, I want to send email to some selected emails (Example. whose email ends with @xmail.com) separately in a cron job or any other event or separate API.
Note :- Email must be encrypted in database.
The only method I have in mind currently is encrypting the data using Fernet from the Cryptography module.
With these, data can be encrypted and require an decryption key. But remember that the decryption keys must be stored somewhere, preferably in a database. This raises another questions:
How do you secure the database hosting the decryption keys?
I’m not sure what you’re doing and why but I suggest protecting the database by following best practices and other guidelines regarding database security.
In summary, encryption adds another layer of complexity that you may actually not need.
True,
But I am working on a project which is finance based with extremely critical data like Credit Card details etc.
I hope you’re able to get me now.
Thanks
Welcome @ddindia-manpreet !
As a general rule of thumb, for the type of protection that you’re talking about, the typical solution is to use some degree of file-system encryption, usually at either the partition or directory level.
But what you should start with are the laws and regulations under which you are operating, along with whatever published standards may exist. If you’re dealing with legally-defined security requirements, then getting the lawyers involved would also be prudent.
You want professional guidance for this. This is not one of those topics that you want to take advice from an online service such as this (or any other).