I am working on a project where I have been provided with a GPG private key in armor text format, the pass phrase, and a file that was encrypted with the public key. The public key is not available however. I have verified the parts I have by importing the private key and decrypting the sample file, so I know the 3 bits I have are working.

Is there any option to recreate the public key from these 3 parts that I have access to?

1 Answer 1


If you have already imported the private key with gpg --import private.asc you can export the public key with gpg --export <id>. By default, it only exports the public key.

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.