Get the private portion of subkeys

Damien Cassou damien at cassou.me
Sat Mar 30 17:20:58 CET 2024


Thank you both for your answers. I would like to understand why
restoring the backup doesn't restore my subkeys. On a fresh ~/.gnupg, I
did:

  $ gpg --list-packets /media/mystick/key
  gpg: keybox '/home/cassou/.gnupg/pubring.kbx' created
  # off=0 ctb=94 tag=5 hlen=2 plen=134
  :secret key packet:
  …
  # off=136 ctb=b4 tag=13 hlen=2 plen=32
  :user ID packet: "Damien Cassou <damien at cassou.me>"
  …
  # off=974 ctb=9c tag=7 hlen=2 plen=134
  :secret sub key packet:
          version 4, algo 22, created 1531155780, expires 0
          pkey[0]: [80 bits] ed25519 (1.3.6.1.4.1.11591.15.1)
          pkey[1]: [263 bits]
          …
          keyid: F36CF32DF9B09855
  …

The last key printed here is the one I would like to import
back. Unfortunately, importing this file doesn't import subkeys:

  $ gpg --import-options restore --import /media/mystick/key
  gpg: key F72C652AE7564ECC: secret key imported
  gpg: Total number processed: 1
  gpg:              unchanged: 1
  gpg:       secret keys read: 1
  gpg:   secret keys imported: 1
  
  $ gpg -K
  gpg: /home/cassou/.gnupg/trustdb.gpg: trustdb created
  /home/cassou/.gnupg/pubring.kbx
  -------------------------------
  sec   ed25519 2018-07-09 [C] [expired: 2023-07-08]
        8E64FBE545A394F5D35CD202F72C652AE7564ECC
  uid           [ expired] Damien Cassou <damien at cassou.me>


Can someone explain why I don't get my subkeys back please?

Thank you

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



More information about the Gnupg-users mailing list