2

I want to start using GnuPG keys. For this purpose I've installed gnupg and use the graphical interface seahorse. By selecting a new PGP-Key in seahorse I generate a new key. What I'm curiose about is the following: The generate key, is this just the private one?

enter image description here

and here the details about that key

enter image description here

Is it correct, that I just created a private key? If so, how do I create now a suitable public one?

1 Answer 1

5

You already have a public key

You will always generate a keypair. It's a public and private key shown as one entry. As you can always derive a public key from a private one, anyway.

What Seahorse and GPG does is just listing keys and only denote you can use to sign/decrypt using those keys if there's a private key available for those. Once you import other's public keys you will see those are listed as public-only keys, only available for encryption and signature validation.

enter image description here

As you can see, Seahorse will display keypairs as a two-key icon whereas for keys only a public key is present it will show a single key.

To verify this on the command line, use

gpg --list-keys

This prints all keys in the keyring, regardless of private key availability.

gpg --list-secret-keys

Prints all keys for which a private (secret) key is available.

5
  • thanks for you answer. just a small follow up question. if I choose the export option, will it automatically export the public key? I have nowhere the option to choose which key (public / private) to export. I'm scared about accidentally publish my private key. Is there a method to check whether a certain gpg key is a private or a public one?
    – math
    Dec 24, 2013 at 12:51
  • Usually, in plain GnuPG terms, all key operations are done on public keys, including exporting (gpg --export will only export the public key). To export secret keys this needs to be explicitly specified on the command line (--export-secret-keys). For frontends like Seahorse I can't really tell what their default behaviour is. As far as I can tell the File -> Export menu exports the public key in Seahorse 3.6.3 (Ubuntu 13.04).
    – gertvdijk
    Dec 24, 2013 at 12:59
  • thanks again for your quick response. I used the command line to export the key. But again, havin exported the key, is it possible to check whether it is a private or a public one?
    – math
    Dec 24, 2013 at 13:01
  • I will open a new question for that! thx again!
    – math
    Dec 24, 2013 at 13:04
  • askubuntu.com/questions/395172/…
    – math
    Dec 24, 2013 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .