Can't paste password in Kgpg in whonix 9

Just upgraded to 9 from 8 and now I can’t paste anything in the kgpg password field when decrypting text.
In Whonix 8 pasting was just fine.
I suppose that’s a bug and not on purpose?

KGpg symmetric encryption doesn’t work for my in a Whonix 8 Workstation. Never did as far I know.

Most likely not a bug introduced by Whonix.

Looks like an upstream bug:

I conclude the fix might at earliest come in 0.8.4. (Not even available yet in sid Debian -- Error) And it would require a special compile flag. According to the Debian bug report, the maintainer has not said yet that he will use that compile flag.

I don’t think the Whonix project has resources yet for fixing that bug before upstream.

You have to disable the GnuPG Agent within the Kgpg config. With Kgpg passphrase dialog paste is possible.

Can you please add full instructions on how to do this (to the wiki)?

I am getting “The encryption failed with error code 2” then.

Yes. I can add it to the wiki. Where should i add it? http://xxxxxxxxxxh5kyrx.onion/wiki/E-Mail ?

It’s just a small change:

KGpg → Settings → Configure KGpg → GnuPG Settings → deselect ‘Use GnuPG Agent’ → OK

This will only remove ‘use-agent’ at /home/user/gpg.conf to active KGpg’s own passphrase dialog and not pinentry.

I never got ‘The encryption failed with error code 2’, maybe some kind of encryption - gpg --encrypt fails - Information Security Stack Exchange

Both symmetric and public key encryption runs flawlessly for me. Have this setting at all my KDE systems.

Yes this fixed it for me!
What is this agent and why it’s preventing pasting?

search term for search engines:
gpg-agent

Because of an upstream bug mentioned in an earlier comment:

Not sure where to add, but it doesn’t work for me yet, seem incomplete. At least for fresh workstations.

This will only remove 'use-agent' at /home/user/gpg.conf
True.

By the way, when doing this, you might end up with other issues. Namely, in other places, password caching might not work anymore. (But as soon as your solution works, we can use a separate gpg.conf for kgpg.)

KGpg -> Settings -> Configure KGpg -> GnuPG Settings -> deselect 'Use GnuPG Agent' -> OK
Exactly this doesn't work for me (error above).

What steps are required in a freshly downloaded Whonix-Workstation 9.x? Must any other gpg commands be run at command line beforehand to make this work?

It’s a bit strange, but i could reproduce it and don’t know how it was triggered - just played a bit with the config within KGpg and got the same error message.

Additionally to the setting mentioned above. It’s necessary to activate ‘Allow encryption with untrusted keys’. Without this only encryption with signed / local signed keys is possible trough KGpg.

Didn’t hat the time to investigate the reason, why the encryption was possible after the Agent dropout and without these setting. Maybe a curious bug.

Hope this will solve the issue.

Exactly this doesn’t work for me (error above).

What steps are required in a freshly downloaded Whonix-Workstation 9.x? Must any other gpg commands be run at command line beforehand to make this work?[/quote]

Does this solve your issue?

If yes, and you still think it would be good to have the solution in the wiki please give me an advice where to add it.

I thought I answered this already. Somehow my message was eaten by the internet. Thanks for bumping this!

KGpg -> Settings -> Configure KGpg -> GnuPG Settings -> deselect ‘Use GnuPG Agent’ -> OK
+
"Allow encryption with untrusted keys"
didn’t solve it for me. Still getting ‘The encryption failed with error code 2’.

What steps are required in a freshly downloaded Whonix-Workstation 9.x? Must any other gpg commands be run at command line beforehand to make this work? Can you try please starting with a fresh VM?

Maybe we’re doing something different? This is what I do:
File -> Open Editor -> write “abc” -> click encrypt, click options, check “symmetrical encryption”, “Allow encryption with untrusted keys” is already checked -> click “OK”.

Okay, i can confirm it’s not possible to decrypt symmetrical within the editor. I think it’s bug within KGpg.

Short workaround:

Write a text within KGpg Editor (or any other text editor), save the document and use the KGpg encryption dialog thru Dolphins context menu. The Kgpg passphrase dialog will pop-up.

Symmetric Decryption works both within the editor and Dolphins context menu.

Didn’t tested is on a fresh VM yet.

Works for me now.

It is better to not use KGpg’s editor as per Surfing Posting Blogging - Whonix anyway.

Yes, please document it here: