0

Earlier on today I decided to backup my laptop and re-install everything. I thought I backed up the GPG keys correctly but it turns out I only exported my public key.

I understand that I can't get that key back as I failed to back it up correctly.

My question though is, can I re-generate a new secret key and assign it to the public key exported earlier? or should I just create another key/pair but then I would have 3 keys on my PC the old public key and then the new generated keys each would have the same name and email address - Is this the correct thing to do?

  • Do you have a revocation certificate for the old key? – Stephen Kitt Oct 13 '18 at 20:57
  • No I don't, I only copied across the exported public key before wiping the old install. – John McDonnell Oct 13 '18 at 21:00
1

Your old private key is gone so about all your old public key is good for is 'legacy' usage. (i.e. you won't be doing anything new with it but it could be used to verify anything previously signed, for example) Going forward, everything would be based on your new private/public key pair which have no relation to your old keys.

Also, since it doesn't sound like your old key used a CA you'll have to manually make sure that any people/services that need to be are notified and get your new public key.

  • Thanks, I'll create a new key - wasn't sure the "correct" approach. As for the old key fairly sure I only used it with Apache previously when signing a committer form. – John McDonnell Oct 13 '18 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.