Reimporting key into gpgsm

Werner Koch wk at
Mon Jan 2 14:58:37 CET 2006

On Tue, 27 Dec 2005 17:16:07 +0100, Thomas Widhalm said:

> simple one. I deleted my whole keyring.kbx file and imported all anew but the 

keyring.kbx only contains public keys (aka certificates).  The private
keys are in  ~/.gnupg/private-keys-v1.d/.

To locate the actual used private key you best run 

gpgsm --dump-key userID

Which will give you something like

Serial number: 01509C
       Issuer: 1.2.840.113549.1.9.1=#737570706F7274406361636572742E6F7267,CN=CA Cert Signing Authority,OU=,O=Root CA
          aka: (
          aka: (
          aka: (
     sha1_fpr: ED:05:C9:FD:A2:BB:57:F1:38:9D:61:C0:46:C9:9D:8A:AF:08:C7:24
      md5_fpr: EF:35:35:ED:6F:C7:64:1B:27:7A:7B:66:69:11:39:91
      keygrip: F6730C230858070D2DCCB448C3994DF8B4225946
    notBefore: 2005-07-21 16:51:43
     notAfter: 2007-07-21 16:51:43
     hashAlgo: 1.2.840.113549.1.1.4 (md5WithRSAEncryption)
      keyType: 1024 bit RSA
    subjKeyId: [none]
    authKeyId: [none]
     keyUsage: digitalSignature keyEncipherment
  extKeyUsage: clientAuth (suggested)
               serverAuth (suggested)
               serverGatedCrypto.ns (suggested)
     policies: [none]
  chainLength: not a CA
        crlDP: [none]
     subjInfo: [none]
         extn: (authorityInfoAccess)  [38 octets]

Now take the keygrip line and you will find the key ay 


To view the private key you may use

/usr/local/libexec/gpg-protect-tool  FILE

pgp-protect-tool might be installed under lib on your system.

> issue stays the same. Could anyone help me changing my passphrase within 

gpgsm --passwd 



More information about the Gnupg-users mailing list