I need to generate a PGP Public/Private key. I've never done this before. I've read documentation but the examples given do not match what I am seeing on my computer.
I generated the keys with gnupg
.
I run the command to list the public keys
gpg --list-keys --keyid-format LONG
and I get a structure like this.
pub rsa2048/123456789101112A 2000–01-01 [SC] [expires: 2000-01-01]
ABCD1234ABCD1234ABCD1234ABCD1234ABCD1234
uid [ultimate] Firstname Surname <[email protected]>
sub rsa2048/ABCDEFGHIJKLMNO1 2000-01-01 [E] [expires: 2000-01-01]
I then run a command to get the secret keys
gpg --list-secret-keys --keyid-format LONG
and I get the same structure
sec rsa2048/123456789101112A 2000–01-01 [SC] [expires: 2000-01-01]
ABCD1234ABCD1234ABCD1234ABCD1234ABCD1234
uid [ultimate] Firstname Surname <[email protected]>
ssb rsa2048/ABCDEFGHIJKLMNO1 2000-01-01 [E] [expires: 2000-01-01]
What's different here is the pub, sub, sec, and ssb tags, but the content is the exact same.
Which is the public private key in each example that's generated?
Is the sequence in the first line of pub or sec after the 'rsa2048/' (123456789101112A in the example) the public key? And then the longer sequence in the line below (ABCD1234ABCD1234ABCD1234ABCD1234ABCD1234 in the example) is the matching private key?
Or is the public key the sequence in the first line of pub or sec after the 'rsa2048/' (123456789101112A in the example) and then the matching private key is the line of sub or ssb after the 'rsa2048/' (ABCDEFGHIJKLMNO1 in the example)?
When you list your keys, pub
is always your public key, and it could be saw as you "main" key. Associated with it (this "main" key), you have a private key. Any other key (sub, ssb etc.) are sub-keys that are private.
In order to get the meanings for sec
, sub
, ssb
& pub
, you can read this post:
gnupg - What do 'ssb' and 'sec' mean in gpg's output
I hope this could solve your 'problem'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With