Results 1 to 1 of 1
Thread: Encrypting unique columns
- 05-26-2010, 08:57 PM #1Member
- Join Date
- May 2010
- Rep Power
Encrypting unique columns
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)
socialNumber, VARCHAR(50), UNIQUE
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! :)
- By andy16 in forum JDBCReplies: 6Last Post: 05-24-2010, 07:23 PM
- By InduM in forum New To JavaReplies: 1Last Post: 12-02-2009, 09:08 AM
- By Addez in forum New To JavaReplies: 3Last Post: 09-16-2009, 12:33 AM
- By bugger in forum NetworkingReplies: 2Last Post: 02-04-2008, 11:24 AM
- By sandeepkk2005 in forum Advanced JavaReplies: 0Last Post: 11-27-2007, 09:16 AM