How can I display actual public/private key of key pair I just generated with gpg?

Viewed 744

I just created a key-pair locally on my linux machine with the gpg command:

gpg --gen-key 

Then I tried to display the information about my key-pair with the gpg command:

 gpg --list-keys

The long alpha-numeric number outputed by the above command is (from what I understand from reading the doc), the fingerprint of the public key of the pair, which is the result of applying a hash function on the public key.

  1. Is this correct?

  2. How can I see the actual public and private keys of the pair I generated? I know this isn't directly useful for encrypting or signing, I'm just curious to see what they look like

Thanks

1 Answers

about your questions:

  1. Yes, that is correct;
  2. You can use gpg --list-keys or gpg -k to list all your keys. Also, you can use gpg --list-secret-keys (pub means public keys, while sec means secret [private] keys).
Related