Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to decrypt a column in a table that has previously been encrypted at application level.

The algorithm is DES at 192 bits and block size = 64.

I have the password but DecryptByPassPhrase doesn't seem to work.

share|improve this question
add comment

1 Answer 1

You need the original key. Most likely the encryption password was used to encrypt the key, not the data. DECRYPTBYPASSPHRASE can be used to decrypt something encrypted by ENCRYPTBYPASSPHRASE. To decrypt something encrypted by ENCRYPTBYKEY, you use DECRYPTBYKEY. The password is used to open the key:

OPEN SYMMETRIC KEY <keyname> DECRYPTION BY PASSWORD = '...';

If the encryption key was encrypted by a certificate and the certificate was encrypted by a password (As is often the case) then you obviously need open the certificate using the password. Whoever designed the original encryption scheme should be able to guide you through the proper decryption key hierarchy.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.