Recipe 7.7 Listing Your Keyring

7.7.1 Problem

You want to view the keys on your keyring.

7.7.2 Solution

To list your secret keys:

$ gpg --list-secret-keys

To list your public keys:

$ gpg --list-public-keys

7.7.3 Discussion

Here's a sample listing of a key on a keyring:

pub  1024D/83FA91C6 2000-07-21 Shawn Smith <smith@example.com>

It lists the following information:

  • Whether the key is secret (sec) or public (pub).[2]

    [2] Actually, the key types are secret master signing key (sec), secret subordinate key (ssb), public master signing key (pub), and public subordinate key (sub). Subordinate keys are beyond the scope of this book and you might never need them. Just remember "sec" for secret and "pub" for public.

  • The number of bits in the key (1024)

  • The encryption algorithm (D means DSA)

  • The key ID (83FA91C6)

  • The key creation date (2000-07-21)

  • The user ID (Shawn Smith <smith@example.com>)

7.7.4 See Also

gpg(1).



Linux Security Cookbook
Linux Security Cookbook
ISBN: 0596003919
EAN: 2147483647
Year: 2006
Pages: 247

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net