We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Wildcard searching of encrypted data in a MySQL database?

Hi everybody,

I am in the process of building a small web application which will hold around 10 pieces of information for every person inserted. Due to data protection the majority of this information must be encrypted.

Using the CodeIgniter framework and the CodeIgniter encryption class I can encode the information on the application side before storing it in the database. The CodeIgniter encryption class uses PHP's mcrypt function along with the AES_256 cipher.

The problem I have is that I need to allow the users of the application to search the information stored using a wildcard search, Possibly also via an API at a later date.

Any body come across a solution for a similar problem. I've read about the MySQL AES_ENCRYPT and AES_DECRYPT but they still require passing a key back and forth in plain text which I am reluctant to do.

I am currently at the conclusion that if I wish to continue on this route then a full table decryption is my only solution every time a search is made (obviously not good).

2
Contributors
1
Reply
59 Minutes
Discussion Span
4 Months Ago
Last Updated
2
Views
Vincentas
Light Poster
31 posts since Nov 2012
Reputation Points: 0
Solved Threads: 1
Skill Endorsements: 0

If your application/API runs on the same server as the database, passing the key plain text is not really an issue.

pritaeas
Posting Prodigy
Moderator
9,263 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,454
Skill Endorsements: 86

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.5142 seconds using 2.64MB