I am creating a small web application that stores about 10 pieces of information for each person added. Due to data protection, most of this information must be encrypted.
Using the CodeIgniter structure and the CodeIgniter encryption class, I can encode information on the application side before storing it in the database. The CodeIgniter encryption class uses the PHP mcrypt function along with the AES_256 cipher.
The problem is that I have to allow application users to search for information stored using wildcard searches, possibly also through the API later.
Any body is faced with a solution to a similar problem. I read about MySQL AES_ENCRYPT and AES_DECRYPT, but they still require passing the key back and forth in plain text, which I reluctantly do.
Currently, I have come to the conclusion that if I want to continue this route, then fully decrypting the table is my only solution every time a search is performed (which is clearly not good).
user1530205
source share