Can't decrypt my files and folder, certutil shows "Missing stored keyset" for my user's certificate

Syed Waleed Aftab 20 Reputation points
2025-01-06T22:49:42.78+00:00

So a couple of months back, I encrypted some of my files and folder through a simple encryption GUI method. Click on file > Properties > Advanced.. >Compress and Encrypt attributes > Check mark on **Encrypt contents to secure data.
**
After some time, when I tried to decrypt it, it gave me "The specified file could not be decrypted." I checked the thumbprint in Compress and Encrypt attribute > Details with the user certificate, which matches.

Then I tried running it "certutil -user -store my <thumbprint>" and it gave "Missing stored keyset"
Then I tried running this:
certutil -repairstore my **<thumbprint>
**
It gives me this:

my "Personal"

CertUtil: -repairstore command FAILED: 0x80090011 (-2146893807 NTE_NOT_FOUND)

CertUtil: Object was not found.

In the cert store, I see another certificate with the same user name but with a different thumbprint. Is there a possibility of a certificate issue during Windows update and it created a new user certificate?

Now I'm unable to decrypt any of my files.

Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
3,023 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,173 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 40,310 Reputation points MVP
    2025-01-06T23:01:56.09+00:00

    The issue you're facing is related to missing private keys, which are essential for decrypting files encrypted using the Windows Encrypting File System. When files are encrypted with EFS, a public/private key pair is used, and the private key must be available to decrypt the files. If the private key is missing, the decryption will fail.

    Here is what you can try:

    1. Confirm the Certificate Exists: Run the following command to list all EFS certificates:

    certutil -user -store my
    
    • Look for the certificate that matches the thumbprint you noted. If the certificate is not listed, it may have been deleted or is unavailable.

    2. Check for Backups of the Private Key: If you previously exported the private key, search for .pfx files on your system or backups. This file is essential for restoring access. If you manage to find it, import it by running:

      certutil -f -user -importpfx <path_to_pfx_file>
    

    3. Look for a Data Recovery Agent (DRA):

    • If your system managed by another party (IT), a Data Recovery Agent may have been configured to assist with recovery.
    • Run the following command to check for configured recovery agents:
        cipher /r
      
    • If an agent exists, contact your administrator for assistance.

    4. Attempt to Repair the Keyset: The error NTE_NOT_FOUND indicates that the private key is missing or corrupted. To attempt recovery:

    • Use certutil to verify the private key exists:
        certutil -user -verifykeys
      
    • If keys are not found, they might have been deleted or are otherwise unavailable.

    5. Restore a Backup of Your System: If no private key or recovery agent is available, restoring from a system backup that includes the private key is your best option. Check for:

    • A system image backup.
    • A file backup that includes C:\Users\<YourUser>\AppData\Roaming\Microsoft\Crypto.

    Going forward, make sure to export and securely store the private key when using EFS encryption. You can do this by:

    • Opening the certificate in certmgr.msc.
    • Exporting it with the private key to a .pfx file.

    In addition, you might want to consider using BitLocker for full disk encryption instead of EFS for individual files, as it's easier to manage and recover.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.