When using gpg to create a single key, I get:
$ gpg --list-keys
-------------------------------
pub 2048R/0C0EA301 2018-01-01
uid [ultimate]
sub 2048R/023A0509 2018-01-01
$ gpg --list-secret-keys
-------------------------------
sec 2048R/0C0EA301 2018-01-01
uid
ssb 2048R/023A0509 2018-01-01
When using bouncycastle to view the keys (in ~/.gnupg/pubring.gpg and ~/.gnupg/secring.gpg), I find that there are four keys created:
(#gpg.public[9AB238A08EF3EAB0A7D01E1284AB64C10C0EA301]
#gpg.public[A841D2BA6635154081F3A5176DE7FF9B023A0509])
(#gpg.secret[9AB238A08EF3EAB0A7D01E1284AB64C10C0EA301]
#gpg.secret[A841D2BA6635154081F3A5176DE7FF9B023A0509])
Why does gpg create four keys (public/private/sub/ssb) and what are they for?