On my Windows machine running Cygwin, When I run
gpg --list-keys --keyid-format LONG
gpg --list-secret-keys --keyid-format LONG
Both the pub and sec keys have the same value. sub and ssb have the same value. Is this expected behaviour?
On my Windows machine running Cygwin, When I run
gpg --list-keys --keyid-format LONG
gpg --list-secret-keys --keyid-format LONG
Both the pub and sec keys have the same value. sub and ssb have the same value. Is this expected behaviour?
Yes. this is expected behavior.
A Key ID (actually a shortened version of the key Fingerprint) is calculated using only Public Key material and so can ONLY refer to the Public Key.
Secret Keys do not have a separate "Key ID", gpg is just showing the "Public Key ID" that the Secret Key is paired to.
It may seem like it could be confusing. For example: if you import a Secret Key, how will gpg know which Public Key it is paired with? But this is not a problem because whenever you export a Secret Key, the exported (and subsequently imported) "Secret Key Packet" will always contain the Public Key as well.