SQL Server 2008 Column Level Encryption – Implementation Guide

encryptionsql-server-2008

We are looking to do Column encryption on some of our DBs.
So creating the keys and encrypting is all good.
My boss is wanting to use Vault by Hashicorp to store the keys.

So I am wondering if anyone knows how you go about exporting the keys from SQL 2008 and then store them in Vault?

Best Answer

There are five types of keys in the heirarchy of any SQL Server column encryption. They are service master key, database master key, asymmetric key, certificate and symmetric key. SQL Server contains commands to back up the service master key, database master key and the certificate with the private key to separate password protected files. If you want to have something to preserve an asymmetric key, you can create one from a strong named key file (.snk) that already contains the key pair and save that. For the symmetric key, you will need to create it from a command, specify the key_source and identity_value and save those two values in your Vault. IF you create symmetric and asymmetric keys without saving the inputs, then you will not be able to export them. If you want to learn more about another method of securing the keys, I suggest reading about Extensible Key Management systems, which is a SQL Server enterprise edition feature. An EKM is a separate piece of hardware designed to hold the keys and perform the encryption and decryption functions.