GPG: How to delete bad session key and get asked for encryption password again?

3.4k views Asked by At

I tried to solve this Geocache:

https://www.geocaching.com/geocache/GC67EXW_signaturbruch

And it gave me a password prompt, when I tried to solve gpg message.asc, but I didn't know the correct password back then.

Now I know it, but it just wouldn't give me the password prompt again, no matter how I tried it.

The output is as follows:

Martinas-Air:gpg martl$ gpg message.asc
gpg: WARNING:  Kein Kommando angegeben.  Versuche zu raten was gemeint ist ...
gpg: CAST5 verschlüsselte Daten
gpg: Verschlüsselt mit einer Passphrase
gpg: Entschlüsselung fehlgeschlagen: Bad session key

(I am on a German MacOs Mojave, 10.14.6 and my gpg --version gives me this:

Martinas-Air:gpg martl$ gpg --version
gpg (GnuPG/MacGPG2) 2.2.17
libgcrypt 1.8.4
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /Users/martl/.gnupg
Unterstützte Verfahren:
Öff. Schlüssel: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Verschlü.: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
           CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Komprimierung: nicht komprimiert, ZIP, ZLIB, BZIP2)

Can somebody tell me, how can I get back to getting asked for the password again??? I searched whole Internet for solutions like "restart your computer", reinstall all gpg tools, delete all .gpg files and so on, but nothing would make it better.

Thanks in advance.

1

There are 1 answers

0
Jonas Hals On

After having had the same issue, I was able to get the password prompt back using the following steps:

In file ~/.gnupg/gpg.conf, append:

use-agent
pinentry-mode loopback

In file ~/.gnupg/gpg-agent.conf, append:

pinentry-program /usr/bin/pinentry-gtk-2
allow-loopback-pinentry

Then restart your gpg agent with echo RELOADAGENT | gpg-connect-agent.