Monday, March 26, 2012

Encryption Choices / Best Practices for hosted environment (shared server)

I'm building a hosted website and I am using SQL 2005.
The DBA for the host has told me that i can not encrypt a symmetric key with a certificate, when using that symmetric key for encryption. As i read that this method provided optimum performance/ security for encrypting columns of data.

The DBA told me i can use a cert or a symmetric key for encryption.
I have searched for comparisons and found a blog entry by Laurentiu Cristofor comparing certs with asymmetric keys. Which leads me to believe that certs and asymm are very different than symmetric keys.

My question is which is the best choice in a hosted environment for column encryption, a cert or symmetric key.
Which is more secure? Does one offer a significant performance (dis)advantage?

TIA

I'd encrypt the column data with a symmetric key and protect the symmetric key with an asymmetric key or a cert.

The encryption / decryption operations with a symmetric key are much faster then the same operations with an asymmetric key or cert.

I'd use AES_128 | AES_192 | AES_256 for the algorithm if the hosted OS supported it.

HTH,

-Steven Gott

SDE/T

SQL Server

|||

Steven Gott - MS wrote:

I'd encrypt the column data with a symmetric key and protect the symmetric key with an asymmetric key or a cert.

Steve, thanks for helping.

I think i need to clarify my question. On my development machine at home I am currently doing what you reccomend. Ecrypting the symmetric key with a certificate and using the symmetric key to encrypt column data.

BUT, to deploy my database on a shared server (hosted machine) the DBA at the host has told me I am not allowed to do this. I am only allowed to ecnrypt columns directly with a certificate or a symmetric key. (I need to retrieve the column data so I can't do asymmetric)

Is there a security benefit to using a cert over a symmetric key? (I am assuming i can directly encrypt data with just a cert.)

Basically what are the pro's and cons of encrypting data directly with only a cert and only a symmetric key.

TIA,

josh
|||

The performance of encrypting by certificates will be very bad for large amounts of data. Certificates are better for signing things than encrypting them.

You can also look at Raul's blog for insight into cryptography in SQL Server here is an entry involving indexes and encrypted columns http://blogs.msdn.com/raulga/archive/2006/03/11/549754.aspx

I'd encrypt with a symmetric key.

HTH,

-Steven

SDE/T

SQL Server

|||

Does your dba has any rationale for not letting you use a symmetric key encrypted with a certificate? That is a best practice for encryption, if there ever was one.

You can also encrypt the symmetric key with a password, instead of using a certificate, but then you'll have to pass that password around, whenever you'll need to open the key.

Certificates are much slower at encryption than symmetric keys and they have some additional limitations on how large a piece of data they can encrypt, hence it's not recommended to use them for encrypting data directly. I second Steven's suggestion to look at Raul's blog for additional details on this.

Thanks

Laurentiu

No comments:

Post a Comment