1

Is that possible to use where condition in sql after converting data in to encrypted?

3
  • Have you tried anything? Commented Mar 2, 2015 at 10:43
  • What kind of encryption are you talking about? Data-at-rest encryption of the database files? That should be transparent to data users. Commented Mar 2, 2015 at 10:45
  • possible duplicate of SQL Encrypted Columns in WHERE Clause Commented Mar 2, 2015 at 10:56

1 Answer 1

1

Not if there is any kind of salt (such as an IV) involved in the encryption. In that case, every time you encrypt the same plaintext you will get a different ciphertext, so that you cannot search for it anymore.

It appears that this is the case with SQL Server's EncryptByKey facility.

Sign up to request clarification or add additional context in comments.

2 Comments

Encryption is done in sql itself. i insert the data using following query INSERT INTO dbo.Customer(UserId , FirstName, LastName, dbpassword) VALUES (EncryptByKey(Key_GUID('Key4CellEncryption'),'3'),EncryptByKey(Key_GUID('Key4CellEncryption'),'bala'),EncryptByKey(Key_GUID('Key4CellEncryption'),'malaichamy'),EncryptByKey(Key_GUID('Key4CellEncryption'),'bala'))
Encryption is done by using following example. databasejournal.com/features/mssql/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.