I have a gpg setup started with older gpg versions and I did not use a passphrase back then. I would type enter directly when prompted for it. I'm not sure if that means the key isn't encrypted or if it is encrypted with an empty passphrase.
Regardless, when I try to decrypt something that was sent to me recently, gpg needs access to my private key and prompts me for a passphrase but now I cannot use an empty passphrase anymore. gpg fails with:
$ gpg -d foo.asc
(X dialog that prompts me for passphrase, I just press enter)
gpg: public key decryption failed: No passphrase given
gpg: decryption failed: No secret key
I would like to be able to use my keys again. I don't mind setting a passphrase from now on but I don't know how:
$ gpg --passwd [email protected]
(X dialog that prompts me for current passphrase, I just press enter)
gpg: key xxxxxxxxxxxxxxxx/aaaaaaaaaaaaaaaa: error changing passphrase: No passphrase given
gpg: key xxxxxxxxxxxxxxxx/bbbbbbbbbbbbbbbb: error changing passphrase: No passphrase given
gpg: error changing the passphrase for '[email protected]': No passphrase given
I am running gpg (GnuPG) 2.2.5 and libgcrypt 1.8.2 on openSUSE 15.0.
gpg --passwd [email protected]
gpg: key xxxxxxxxxxxxxxxx/aaaaaaaaaaaaaaaa: error changing passphrase: No passphrase given gpg: key xxxxxxxxxxxxxxxx/bbbbbbbbbbbbbbbb: error changing passphrase: No passphrase given gpg: error changing the passphrase for '[email protected]': No passphrase given
gpg
to dump your private key and then install the new version ofgpg
then import the private key?