Search feature in an encrypted database

From: Artboy717 (Artboy717[NoSpam)
Date: 10/03/04


Date: Sun, 3 Oct 2004 18:20:51 +0300

Hello

    I develop an application in VB.NET which uses an SQL database. In its
simplest

form my program has to show to authenticated users some sort of information
(mainly text)

and to let them perform search to the stored data.

    The implementation I came up is the following:

      I use Triple DES encryption to encrypt the text, I encode it to a
base64 string and

      store it in an ntext column. When a user has the credentials to see
the data, I get the

      bytes from the stored string, decrypt them and show them the requested
data.

    I admit that this model works very well for my needs and it wasn't hard
to implement

but lately I faced a concrete wall. and that's the search feature. How am I
supposed to

execute queries like "SELECT * FROM table WHERE column LIKE '%DOG%'" to the
database?

When I need to validate a user I encrypt his typed username and password and
I try to find

a matching sting in the database but in a search where the criteria are just
small portions of the

full text how can I find a match in the encrypted text? I tried encrypting
the criteria but the result

string is not the same as the stored. I don't think that I'm the first who
comes up with this obstacle

and there's must be a work around or something I haven't figured out. Thanks
in advance.