I have encryption/decryption set up on database A with a database master key, certificate and symmetric key. I am copying encrypted data from database A to database B. My goal is to decrypt the data on database B but I am having problems decrypting data on database B which was initially encyrpted on database A. Both databases are on same server.
Here is what I did:
On database A--> backup database master key
On database A--> backup certificate
On database B--> restore database master key from backup (above)
On database B--> restore certificate from backup(above)
On database B--> create a symmetric key based on certificate
Then I try to run the standard decrypting functions on database B against the data copied over from database A and I just get NULL's? However, data which I encrypt on database B can be decrypted on database B successfully. I just can't use database B to decrypt data which was initially encrypted on database A? How can I use database B to decrypt data which was initially encrypted on database A?
Any ideas are greatly appreciated?