Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL based encryption performance
    primarykey
    data
    text
    <p>I am doing some research for a future project and it requires some data to be encrypted. </p> <p>In my research today, I have noticed that there are many different encryption algorithms (including AES, Triple-DES, X-DES etc) and I wish to use one of the algorithms in SQL-Server (2008r2 express probs), how would you recommend doing this, like best practices etc?</p> <p>I am planning to do something like the following:</p> <pre><code>-- Create the master key. CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Som3Rand0m!3y?na' -- Create the cert. CREATE CERTIFICATE someCert WITH SUBJECT = 'c3p009xFR?' -- Create Symmetric Key CREATE SYMMETRIC KEY someSymmetricKey WITH ALGORITHM = TRIPLE_DES ENCRYPTION BY CERTIFICATE someCert </code></pre> <p>And use it in the following way: </p> <pre><code>declare @sql varchar(8000) set @sql = 'OPEN SYMMETRIC KEY someSymmetricKey DECRYPTION BY CERTIFICATE someCert ' exec (@sql) -- Check the table SELECT col1, Convert(varchar(max), DECRYPTBYKEY(col2)) as col2 FROM myTable -- dont forget to close the symmetric key again afterwards. CLOSE SYMMETRIC KEY someSymmetricKey </code></pre> <p>I guess this is the correct way to do it (I read up on it ages ago and saved an example, so just double checking :])?</p> <p>Also, are there really any performance differences (or security differences, like one is easier to break than another) between using the different encryption algorithms? &lt;&lt;- this is the one i was really trying to find out about/most important.</p> <p>Lastly, if I move the database to a different server, I guess I can just re-create the key/cert in the same way and I will be able to get the data back etc?</p> <p>Any good blog posts/links/whitepapers would be greatly appreciated :) (most that ive read have been quiet bad tbh)</p> <p>Thanks for reading :D</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload