Notepad: Decryption not possible: No secret key The data was not encrypted for any secret key in your certificate list.

hi i cant decrypt my messages anymore i never changed anything its the issue

Hi @Chailover,

did you try to restart Kleopatra or even your PC?

Could you tell us some details?

  • Version of Windows
  • Version of Gpg4win

Hello,

I am using Windows 11 24H2 with Kleopatra version 3.3.0, Gpg4win 4.4.0, GnuPG 2.4.7, Libgcrypt 1.11.0, KDE Frameworks version 5.109.0, and Qt version 5.15.9 (all up-to-date).

Since yesterday, I have been unable to decrypt any messages, including from the command line. I haven’t made any changes, and my public and private keys appear to be intact. However, I keep encountering the following error message:

Notepad → Notepad:
Decryption not possible: No secret key
The data was not encrypted for any secret key in your certificate list.

I’ve tried various troubleshooting steps, such as restarting my PC and testing on a different machine, but the issue persists.

Could you please assist me in resolving this problem?

Why do you believe that the secret key used for encrypting “any message” is correct? That it is one which is available on your system?

Are you not able to decrypt messages any more which you were able to decrypt yesterday? Or are we talking about new messages?

And what does the diagnostics window show? This is the window which opens if you double-click on the “diagnostics” link on the right side of a window were you get an error.

I’m unable to decrypt messages from yesterday, while everything was working fine the day before. The diagnostics window logs show the following yes i have both the keys on the pc saved

gpg: encrypted with RSA key, ID BE64F4E7813B4B49
gpg: encrypted with RSA key, ID C4981F7B70F53EBF
gpg: public key decryption failed: No secret key
gpg: decryption failed: No secret key

Well, gpg says the secret keys used for the encryption are not there.
gpg --list secret-key BE64F4E7813B4B49
and
gpg --list secret-key C4981F7B70F53EBF
should then both not show a keylisting, too.

First check the self-tests at Settings → Perform Self-Test. They should all be passed (green) except the test for VS-compliance, which is skipped.

Then check out your GNUPGHOME where your keys are located, usually at C:\Users\g10code.WIN-TEST3\AppData\Roaming\gnupg\private-keys-v1.d
Is the directory there and does it contain files ending with “.key”? (keep in mind that file extensions are only shown on windows if you have configured your view preferences accordingly).

If your GNUPGHOME is in a different place than the usual C:\Users\g10code.WIN-TEST3\AppData\Roaming\gnupg, you can find that location by checking out Tools → “Show GnuPG configuration”. Look there for the path in the line starting with “homedir:”



So you have only one gpg keypair with those two subkeys.
But do you expect to have more?

What was the result of
gpg --list secret-key BE64F4E7813B4B49
and
gpg --list secret-key C4981F7B70F53EBF ?

If this does not list anything, then the message is not encrypted for your key.

If you were able to decrypt that yesterday, then another key of yours has to have been deleted in between.

gpg --list-secret-keys shows all your secret keys, btw.

it shows my private keys it says gpg: option “–list” is ambiguous

i could decrypt it before same message

i did delete never something

I forgot one “-” try
gpg --list-secret-key BE64F4E7813B4B49
gpg --list-secret-key C4981F7B70F53EBF
instead.

gpg: error reading key: No secret key

on both

so you do indeed not have the secret key that message was encrypted for.

If you were able to decrypt that exact same message yesterday, then either you have changed the GNUPGHOME in between or deleted that key from your GNUPGHOME. Or someone else did.

no i did change nothing can it be a problem with a windows update