Questions tagged [symmetric-key]

14 questions
6
votes
1 answer

Can I control which algorithm SQL Server uses to hash symmetric key passphrases

I will start by describing the issue / cause before asking my question: If you are using a symmetric key in SQL to encrypt data. This can be set up as follows: CREATE MASTER KEY ENCRYPTION BY PASSWORD='password'; CREATE CERTIFICATE My_Certificate…
5
votes
2 answers

Changing a certifcate+key algorithm by dropping & recreating with the same names

We have a situation where a symmetric key has been created (a long time ago) using TRIPLE_DES. This is used to encrypt a password column, and is used by around ten stored procedures (that utilizes these with OPEN SYMMETRIC KEY SSN_Key_01 DECRYPTION…
EvilDr
  • 860
  • 4
  • 14
  • 29
4
votes
1 answer

Where does SQL Server store symmetric keys?

I am wondering if symmetric keys created in particular database are being stored in the primary file group? Or they are stored in some special file group which the user is not able to interact with? For example, if I am performing a partial backup…
gotqn
  • 4,348
  • 11
  • 52
  • 91
2
votes
1 answer

How to open master key in a session without exposing password

I restored a masterkey, and then created a certificate and symmetric key SSMS with: use AdventureWorks2022 DROP MASTER KEY RESTORE MASTER KEY FROM FILE = 'c:\stuff\master_key_backup.mas' DECRYPTION BY PASSWORD = 'ASDF$E£%^IJYK*&234' …
frank
  • 145
  • 4
2
votes
1 answer

How to use restored key to decode an encoded column in SQL Server?

In SQL server, I created a symmetric key and encoded a column as per An overview of the column level SQL Server encryption use AdventureWorks2022 CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'SQLShack@1'; CREATE CERTIFICATE Certificate_test WITH…
frank
  • 145
  • 4
2
votes
1 answer

Creating Symmetric Key from external provider

Knowing the security objects hierarchy, we can see that in order to create a Symmetric Key and encrypt data, we need to create: Database Master Key which is protected by password Certificate which is protected by the Database Master key The…
gotqn
  • 4,348
  • 11
  • 52
  • 91
1
vote
0 answers

OPEN SYMMETRIC KEY from AKV takes too long randomly

This post is similar to another question listed here. Encrypting data by OPEN SYMMETRIC KEY by ASYMMETRIC KEY created with Azure provider in SQL server takes more than 2 min We are also facing the similar problem on our PROD server randomly, did…
1
vote
2 answers

Decrypt Symmetrically/Asymmetrically Encrypted Data in MS SQL (T-SQL) Server via Apex Crypto Class

Hope you're having a good day. This is in continuation to my previously posted question in Salesforce StackExchange. I was suggested to seek help at DBA SE in order to find a way to extract Symmetric key from MS SQL in order to use it for…
1
vote
1 answer

What does a deterministic symmetric key mean?

In sqlservercentral blog I've encountered this phrase Symmetric keys are deterministic when created, meaning that the same parameters run in different databases will result in the same key. That means that the same key in a different database (or…
igelr
  • 2,162
  • 3
  • 26
  • 56
1
vote
1 answer

How to stop decrypting data after opening master key in SQL Server?

I have implemented data encryption using SQL Server symmetric key encryption technique using a certificate, master key with password. When we backup database from PROD server and restore to a different server, we open the master key using OPEN…
Sri
  • 403
  • 6
  • 16
1
vote
1 answer

What are implications for changing encryption from TRIPLE_DES to AES_128?

As title asks, what are implications for changing encryption from TRIPLE_DES to AES_128? I have an older database I've been tasked with hardening, and I need to updated the algorithm used for encryption on it. Running this query: SELECT name,…
1
vote
1 answer

Recreate symmetric key of unknown CREATE SYMMETRIC KEY

I found that for each encryption of a symmetric key an entry in sys.key_encryptions is present and at least for ENCRYPTION BY CERTIFICATE-type entries I can use the certificate of the specified thumbprint to decrypt the crypt_property: SELECT …
0
votes
1 answer

How can we decrypt data knowing the symmetric key used for the encryption?

In this article is explained how to decrypt a symmetric key. For example: SELECT SK.name, SK.symmetric_key_id, SK.key_length, SK.algorithm_desc, KE.crypt_type_desc, COALESCE(C.name,AK.name,PSK.name) AS protector_name, …
gotqn
  • 4,348
  • 11
  • 52
  • 91
0
votes
1 answer

How to protect a symmetric key?

When a symmetric key is created we have the option to encrypted it by using at least one of the following: certificate, password, symmetric key, asymmetric key or EKM. When a password is used, it it said that: When a symmetric key is encrypted…
gotqn
  • 4,348
  • 11
  • 52
  • 91