I installed GPG4Win 2.2.1 to replace an old command line gpg installation (running on Win 7 (x64)). When trying to decrypt a file Kleopatra returns the error Decryption Failed: No Data. If I do the same decryption from the command line it works fine. I saw a couple of bug reports for Suse but didn’t see any resolution. Any thoughts?
Does Kleopatra’s file encryption and decryption work otherwise?
Encryption works fine. If I encrypt a file with my own key I can decrypt it. It is only when using an imported key from a 3rd party does the decryption not work with Kleopatra.
You should never be able to decrypt anything encrypted with a 3rd party’s key. You are using their public key, only they can decrypt it even though you encrypted it with their key. Once encrypted that file can only be used by them.
Sorry, I meant to say a file encrypted by a third party. When decrypting the file on the command line I can see the match against the key. I looked at the log output from the CLI and Kleopatra attempts and they go along the same but the Kleopatra log does not show the following
DBG: pubkey_verify: algo=1
The CLI attempt has that and then lines references the pkey/sig and hash.
This is hard to analyse without having an example.
As Gnupg is the cryptobackend that Kleopatra uses, it should support the same operations in the same way. What you could do is to try to find a difference.
Am I correct in that only some third party files do not decrypt? Or all of them?
Try the diagnosis output options of gpg2.exe to see some difference. E.g.
This particular installation only has the one third party key installled. I ran some more tests and happened to have Windows Explorer open to the folder where the file was being decrypted. When I ran the decrypt with Kleopatra, a temporary file showed up “decout.oc704” When I looked at the file it had the decrpted output. As soon as I clicked OK to close the error box in Kleopatra the file was deleted. This would indicate that decryption is working but there is some type of issue with outputting the file. I have teh GnuPG debug setting at 4 in Kleopatra but didn’t see any reference to either the input or output file. Is there a way to get any debug info around that.
Is there a way to debug what is happening in Kleopatra that may show what is happening after it decrypts the file?
Yes, there are several possibilities.
It may be best to ask on the gpg4win-devel mailinglist to get more of the developers
This section in the compendium should tell you more about some (not all of them)
of the debugging possibilities:
(Flattr Gpg4win at https://flattr.com/thing/2053326 if you appreciate my support.)