I accidentally messed up months ago by keytocard'ing a seret key before making an offline locked-away backup of it. I failed at reading comprehension and did not know that this would delete the key material after a successful move, and leave my backup without the actual key material. The key is structured as a signing key with an encryption and an authentication subkey. I still have access to the card where things were moved to, but I of course want to rectify the case of not having backups.

Doing --list-packets on my secret key backup gives

:secret key packet:
        version 4, algo 1, created REDACTED, expires 0
        pkey[0]: [4096 bits]
        pkey[1]: [17 bits]
        skey[2]: [v4 protected]
        keyid: REDACTED
:secret sub key packet:
        version 4, algo 1, created REDACTED, expires 0
        pkey[0]: [4096 bits]
        pkey[1]: [17 bits]
        gnu-divert-to-card S2K, algo: 0, simple checksum, hash: 0
        serial-number:  REDACTED
        keyid: REDACTED
:secret sub key packet:
        version 4, algo 1, created REDACTED, expires 0
        pkey[0]: [4096 bits]
        pkey[1]: [17 bits]
        gnu-divert-to-card S2K, algo: 0, simple checksum, hash: 0
        serial-number:  REDACTED
        keyid: REDACTED

(after some trimming and redactions).

The fact that only the subkeys (the E and A caps) are missing from the backup, and that in fact the main (signing) key can be salvaged.

  • How can I verify the above suspicion? I don't understand how to tell GPG to stop using the card if secret key material is present off-card.
  • If the main key backup is intact, is it sound course of action to generate new E and A subkeys, decrypt all secret data I have while the old E key is still available on the card, re-encrypt it all with the new E key, make new backup key material, then keytocarding the new subkeys?
New contributor
gspr is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Have you distributed this key? If you're the only one using it it might be simpler to decrypt everything (as you suggest in your second bullet) and just start over with a new master keypair. – user8675309 2 days ago
  • Sadly the master (signing) key has been distributed. I'd rather not loose the signatures on it. – gspr 2 days ago

Your Answer

gspr is a new contributor. Be nice, and check out our Code of Conduct.
 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.