zgar
August 5th, 2008, 03:37 PM
I am storing encrypted data into a SqlServer 2005 database. I am new to this and was hoping to get some advice. I have about 10 string fields of varying length which need to be encrypted (I am using AES). To store them as varbinarys I need to allocate more space for the encrypted fields than I would for unencrypted varchar fields, but I am not sure how much. The thing that complicates it for me is the max size for most of the fields is around 10-50 chars, but a comments field which also needs to be encrypted is 1000 chars.
A couple of approaches I thought of were:
1) store the comments as a blob (varbinary(MAX)) and the rest as the max size of the encryption (not sure how to detemine)
2) store all fields as blobs
3) combine the fields and store as 1 blob field
I can think of +/-'s, but since I am new to this I was hoping to get some good advice. What would be a good method (in terms of simplicity vs storage vs speed) to encrypt of table with varyied length strings?
Thank you in advance,
zgar
A couple of approaches I thought of were:
1) store the comments as a blob (varbinary(MAX)) and the rest as the max size of the encryption (not sure how to detemine)
2) store all fields as blobs
3) combine the fields and store as 1 blob field
I can think of +/-'s, but since I am new to this I was hoping to get some good advice. What would be a good method (in terms of simplicity vs storage vs speed) to encrypt of table with varyied length strings?
Thank you in advance,
zgar