I've lost my key. Now I can't sign anything, and servers don't accept unsigned content. The key is uploaded to a keyserver. Now I have fingerprint, public key and I remember my passphrase.
How can I re-generate same key on my Linux box?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI've lost my key. Now I can't sign anything, and servers don't accept unsigned content. The key is uploaded to a keyserver. Now I have fingerprint, public key and I remember my passphrase.
How can I re-generate same key on my Linux box?
You cannot generate the private key¹ from the public key and the passphrase. The private key does not depend on the passphrase in any way. The passphrase is only used to encrypt the private key when you store it in a file. You could have multiple copies of the same private key encrypted with different passphrases. And you cannot recover the private key from the public key, public key cryptography relies on this being impossible.
The only way to recover your private key is from a backup of the private key.
¹ Outside of gpg, it's typically called a private key when there's a corresponding public key, and a secret key for symmetric encryption.
--list-secret-keys
, --export-secret-keys
, etc., which are used to refer to what you call private keys. What I'm trying to say is that there does not appear to be a single objectively correct way of calling things, many people will use the two terms interchangeably, and trying to be clever by correcting people when they use another term that the one you like does not help much, particularly when it is clear from the context what it means.