gpg not able to find my secret key

Martin T m4rtntns at
Mon Aug 27 12:14:52 CEST 2018

On Fri, Aug 24, 2018 at 2:38 PM Damien Goutte-Gattat
<dgouttegattat at> wrote:
> On 08/24/2018 07:47 AM, Martin T wrote:
> > One more small question- in the output of "gpg --list-keys" or "gpg
> > --list-secret-keys" I see two keys, but in the output of
> > "gpg-connect-agent 'keyinfo --list' /bye" or "ls
> > ~/.gnupg/private-keys-v1.d/" I see four keys with different hashes.
> > Why is that so?
> When you say that you have two keys, do you mean two *primary* keys? If
> so, each primary key probably has an encryption *subkey* (automatically
> generated by GnuPG, that has been the default behavior of GnuPG for a
> very long time), so you end up with four private keys.
> As for the fact that you see "different hashes", that's because `gpg
> --list-keys` prints out the *fingerprints*, whereas gpg-agent's keyinfo
> command prints out the *keygrips*.
> A fingerprint and a keygrip are both hashes of a public key, but they
> are computed differently and don't serve the same purpose. Fingerprints
> are specified by the OpenPGP format and uniquely identify an OpenPGP
> key. Keygrips are used internally by gpg-agent to uniquely identify a
> key independently of any protocol.
> Damien


thanks! I indeed have two primary key-pairs and each primary key-pair
has a subkey pair. When I execute "gpg --list-keys --with-keygrip",
then I see the same four public key hashes as with "keyinfo --list" in
gpg-connect-agent utility.


More information about the Gnupg-users mailing list