Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Decrypt issue Expand / Collapse
Author
Message
Posted Thursday, May 14, 2009 12:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 3:38 AM
Points: 7,004, Visits: 8,448
As Steve said : the password doen't need to be the same;

The backup password is used to encrypt the backup itself. Nothing else.


Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #716659
Posted Thursday, May 14, 2009 6:28 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, April 23, 2014 3:06 PM
Points: 319, Visits: 757
Thank you
Post #716829
Posted Thursday, May 14, 2009 10:24 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, April 23, 2014 3:06 PM
Points: 319, Visits: 757
I've the same issue still going on.. At this stage, we just want to provide our clients with what they will need to do when the master key gets corrupted.. So for testing this, I'm restored our database(UMP) to test. I took a backup of the master key from the UMP database.

use UMP
BACKUP MASTER KEY TO FILE = 'd:\ump\umpkey'
ENCRYPTION BY PASSWORD = '123'

Now, on the test database the decryption works perfect. I tried below to corrupt the master key:

OPEN MASTER KEY DECRYPTION BY PASSWORD = '239kc5i4gt6j81mn3k';

ALTER MASTER KEY
REGENERATE WITH ENCRYPTION BY PASSWORD = 'tst';

Now tried to decrypt the existing records, since the master key is altered- I expect the decryption not to work. But it decrypts successfully. Is there any other way to test our situation? We just want to test if the backup and restore of the master key will work incase of lost master key or corrupt master key so we can provide the steps to the client.

Thanks again for your help.
Post #717147
Posted Thursday, May 14, 2009 12:27 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 3:38 AM
Points: 7,004, Visits: 8,448
psangeetha (5/14/2009)
I've the same issue still going on.. At this stage, we just want to provide our clients with what they will need to do when the master key gets corrupted.. So for testing this, I'm restored our database(UMP) to test. I took a backup of the master key from the UMP database.

use UMP
BACKUP MASTER KEY TO FILE = 'd:\ump\umpkey'
ENCRYPTION BY PASSWORD = '123'

Now, on the test database the decryption works perfect. I tried below to corrupt the master key:

OPEN MASTER KEY DECRYPTION BY PASSWORD = '239kc5i4gt6j81mn3k';

ALTER MASTER KEY
REGENERATE WITH ENCRYPTION BY PASSWORD = 'tst';

Now tried to decrypt the existing records, since the master key is altered- I expect the decryption not to work. But it decrypts successfully. Is there any other way to test our situation? We just want to test if the backup and restore of the master key will work incase of lost master key or corrupt master key so we can provide the steps to the client.

Thanks again for your help.


The key you provided with "Open master key" was the correct key !
When it regenerates the encryption with the new password you provide, it actually rewrites all stuff that is encrypted !

That's why it is still working.

What you could try on your TEST system is to restore another master key. Doing that should actually corrupt the existing encrypted data !

I did NOT try this myself !!!

Play it safe....Start with a full backup !!!


Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #717268
Posted Friday, July 19, 2013 7:07 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 19, 2013 7:07 AM
Points: 1, Visits: 4
Try this:

USE master
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'pass'
GO
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY
GO

And later rest of the restoration procedure.
Post #1475458
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse