0

I have to change length of symmetric key in my database. I'm currently using TRIPLE_DES algorithm with key length 128 and I have to use key length 168 or 192, or AES_256 algorithm.

Is there any simple solution? If not please give me some pointers in how to do this

Regards, Ante

user3746480
  • 333
  • 5
  • 17

1 Answers1

1

You cannot change the algorithm for a Symmetric key, only the encryption method(s) used.

https://msdn.microsoft.com/en-us/library/ms189440(v=sql.110).aspx

Rachel Ambler
  • 1,440
  • 12
  • 23
  • Can you give me an example? This doesn't work: `alter SYMMETRIC key symmetric_key_name add encryption by TRIPLE_DES certificate certificate_name` PASSWORD = 'password' – user3746480 Sep 18 '15 at 13:20
  • No, I cannot because I already stated it cannot be done. The algorithm is separate from the encryption methods used and once chosen it is bound the the Symmetric key, so whilst you can change the encryption methods, you cannot change the algorithm used by the key itself. Take a look at the Create Symmetric Key statement and you'll see that the Algorithm is part of the Key Options and NOT the Encryption method. The Alter Symmetric Key statement ONLY allows you to change the Encryption Method. I know this is not the answer you wanted, but it is the answer. The answer is You cannot. – Rachel Ambler Sep 18 '15 at 13:44