0

--symmetric key not encrypted by certification

create symmetric key SQLSymKey 
 with algorithm = aes_192 
    encryption by password ='uuu)) %';

--symmetric key encrypted by certification

CREATE SYMMETRIC KEY SQLSymKey 
WITH ALGORITHM = AES_128  
ENCRYPTION BY CERTIFICATE SelfSignedCertificate;  
  • 2
    what is the question ? – Thomas G May 02 '18 at 12:09
  • 2
    One uses a password and the other uses a certificate? – Damien_The_Unbeliever May 02 '18 at 12:11
  • 1
    Which [DBMS product](https://en.wikipedia.org/wiki/DBMS) are you using? "SQL" is just a query language, not the name of a specific database product (and your code is non-standard SQL). Please replace the `sql` tag with a tag specific the database product you are using –  May 02 '18 at 12:12
  • Different algorithms, different encryption methods... what else is there/ – S3S May 02 '18 at 12:50
  • yes Scsimon... that's why I am asking is there any different in respect to security. – Vinay Mehra May 02 '18 at 13:05
  • Please read about the Encryption Hierarchy https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/encryption-hierarchy?view=sql-server-2017 to learn about the different ways to manage the secrets that encrypt your data. – David Browne - Microsoft May 02 '18 at 13:37
  • You should also read the [answer here](https://stackoverflow.com/questions/2327931/how-to-control-what-users-can-decrypt-sql-server-symmetric-key-encryption?rq=1) it will entirely answer your question – Thomas G May 02 '18 at 13:53

0 Answers0