Results 1 to 1 of 1
Thread: Encrypting unique columns
- 05-26-2010, 07:57 PM #1
Member
- Join Date
- May 2010
- Posts
- 11
- Rep Power
- 0
Encrypting unique columns
Hello again,
I hope I will not be banned for spamming this section, haha. I have a few questions regarding encrypting data in my MSSQL database. For instance, say I have a table Person that has the following columns:
id, int (PK)
firstName, VARCHAR(20)
lastName, VARCHAR(20)
socialNumber, VARCHAR(50), UNIQUE
phoneNumber, VARCHAR(20)
encryptionKey, VARCHAR(30)
Just an example. I am encrypting a String with a randomly generated key and I can then decrypt it again with the same key. As a result, I store the encryption key in the table. My problem is that to get the key, I must find the appropriate row. To do this, I would search for a given social number, but the problem is that it is encrypted in the database! Therefore I am having trouble figuring out how I can get the appropriate key to decrypt the social number.
I guess a solution could be to use the same encryption key for the entire table (or database), but I do not fancy that because it seems less secure to me.
Does anyone have a suggestion on what a good solution is?
Thanks a bunch in advance! :)
Andy
Similar Threads
-
Check for unique key violation
By andy16 in forum JDBCReplies: 6Last Post: 05-24-2010, 06:23 PM -
Error Encrypting Session Key
By InduM in forum New To JavaReplies: 1Last Post: 12-02-2009, 08:08 AM -
My encrypting thingy lags alot..
By Addez in forum New To JavaReplies: 3Last Post: 09-15-2009, 11:33 PM -
Encrypting packets
By bugger in forum NetworkingReplies: 2Last Post: 02-04-2008, 10:24 AM -
Encrypting File in Java
By sandeepkk2005 in forum Advanced JavaReplies: 0Last Post: 11-27-2007, 08:16 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks