Performing a key recovery
This section describes how to recover archived keys by performing a key recovery.
To perform a key recovery
-
Log on to the system as Domain Administrator and ensure that the private key is still recoverable by viewing the Archived Key column in the Certification Authority console.
-
Log on as Domain Administrator.
-
From Administrative Tools, open Certification Authority.
-
In the console tree, double-click CA, and then select Issued Certificates.
-
From the View menu, select Add/Remove Columns.
-
In Add/Remove Columns, in Available Column, select Archived Key and Add. ArchivedKey should now appear in Displayed Columns.
-
Select OK and then, in the details pane, scroll to the right and confirm that the last issued certificate to UserKeyArchival has a Yes value in the Archived Key column.
Note
A certificate template must have been modified so that the Archive bit and Mark Private Key as Exportable attributes were enabled. The private key is only recoverable if there is data in the Archived Key column.
-
Double-click the Archive User certificate.
-
Select the Details tab.
Write down the serial number of the certificate. (Do not include spacing between digit pairs.) This is required for recovery.
The serial number is a hexadecimal string which is 20 characters long. The serial number of the private key is the same as the serial number of the certificate. For the purpose of this walkthrough, the serial number will be referred to as serialnumber.
-
Select OK.
-
Close Certification Authority.
-
-
Recover the private key into a BLOB output file by using certutil.exe.
-
On the taskbar, select the Start > Run. Enter cmd and select OK to open command prompt window.
-
Enter cd \ and then press ENTER.
-
Ensure that you are in the c:\ directory.
-
At the command prompt, type:
Certutil -getkey serialnumber outputblob
-
At the command prompt, type
dir outputblob
Note
If the file outputblob does not exist, you probably typed the serial number incorrectly for the certificate.
The outputblob file is a PKCS #7 file containing the KRA certificates and the user certificate and chain. The inner content is an encrypted PKCS#7 containing the private key (encrypted by the KRA certificates).
-
-
Recover the original private/public key pair using Certutil.exe
-
On the taskbar, select Start > Run. Enter cmd and select OK to open a command prompt window.
-
At the command prompt, type:
Certutil -recoverkey outputblob user.pfx
-
When prompted, enter the following information:
Enter new password: password
Confirm new password: password
-
Enter exit, and then press ENTER.
-
Close all windows and log off as the current user.
-
-
Import the recovered private key/certificate.
-
At the command prompt, enter certmgr.msc
-
Right-click Certificates (Current User), and then select Find Certificates.
-
In Find Certificates, under Contains, enter CA Name and then select Find Now.
-
In Find Certificates, on the Edit menu, select Select All.
-
In Find Certificates, on the File menu, select Delete.
-
In Certificates, select Yes.
-
Close Find Certificates.
-
-
Import the certificate at
c:\user.pfx
and let the certificates be placed by the system.-
In the console tree, right-click Personal and then select All Tasks and Import.
-
In the Certificate Import Wizard, select Next.
-
On Files to Import, in the File name box, enter
c:\user.pfx
, and then select Next. -
In Password, enter password and then select Next.
-
On Certificate Store, select Automatically select the certificate store based on the type of certificate and Next.
-
On Completing the Certificate Import Wizard, select Finish.
-
-
Verify the serial number of the imported certificate.
-
In the console tree, double-click Personal and then select Certificates.
-
Double-click certificate.
-
In Certificate, go to the Details tab and verify that the serial number matches the original.
-