2

If I've exported a gpg key using the command line, how can I verify if the exported key is a public one? I'm interested in both, a binary format and the armored format as well. I'm just a little bit scared to accidentally publish my private key. Thanks for your help

4

Run on the command line:

gpg the-keyfile

With the-keyfile being the .asc (armored) or .pgp (binary) file. The output will either start with sec (secret available) or pub (public key only). This is a successful export of a secret key:

sec  [more key details]
ssb  [more subkey details]

And this for a public key:

pub  [more key details]
sub  [more subkey details]

Note that exporting the secret key also implies the public key (one can derive the public from the secret).

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.