What do you need to do in order to access data in a SQL Server that’s encrypted with Always Encrypted? It’s not much, and it’s really simple.
- The certificate used for encryption
- A parameter in the connection string
That’s it. It’s a small list of things.
I was experimenting with this, and I set up encryption on a VM, then copied the certificate backup to another VM and installed it in the Certificate Store.
This is all I changed on my C# application to enable encryption.
strConnstring += “; Column Encryption Setting = Enabled”
I had a connection string built, and I added this one little option to the end and when I queried my encrypted table, I could read the data.
There are certainly more caveats and more to learn about encryption, but this shows how easy it can be to change your application. Just alter the connection string.