Quantcast
Channel: Planet Grep
Viewing all articles
Browse latest Browse all 4959

Sven Vermeulen: GnuPG: private key suddenly missing?

$
0
0

After updating my workstation, I noticed that keychain reported that it could not load one of the GnuPG keys I passed it on.

*keychain2.8.1~http://www.funtoo.org*Foundexistingssh-agent:2167*Foundexistinggpg-agent:2194*Warning:can'tfind0xB7BD4B0DE76AC6A4;skipping*Knownsshkey:/home/swift/.ssh/id_dsa*Knownsshkey:/home/swift/.ssh/id_ed25519*Knowngpgkey:0x22899E947878B0CE

I did not modify my key store at all, so what happened?

GnuPG upgrade to 2.1

The update I did also upgraded GnuPG to the 2.1 series. This version has quite a few updates, one of which is a change towards a new private key storage approach. I thought that it might have done a wrong conversion, or that the key which was used was of a particular method or strength that suddenly wasn't supported anymore (PGP-2 is mentioned in the article).

But the key is a relatively standard RSA4096 one. Yet still, when I listed my private keys, I did not see this key. I even tried to re-import the secring.gpg file, but it only found private keys that it already saw previously.

I'm blind - the key never disappeared

Luckily, when I tried to sign something with the key, gpg-agent still asked me for the passphraze that I had used for a while on that key. So it isn't gone. What happened?

Well, the key id is not my private key id, but the key id of one of the subkeys. Previously, gpg-agent sought and found the private key associated with the subkey, but now it no longer does. I don't know if this is a bug in the past that I accidentally used, or if this is a bug in the new version. I might investigate that a bit more, but right now I'm happy that I found it.

All I had to do was use the right key id in keychain, and things worked again.

Good, now I can continue debugging networking issues with an azure-hosted system...


Viewing all articles
Browse latest Browse all 4959

Trending Articles