How to make GnuPG display full 8-byte/64-bit key ID?
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: RPG Blues Looping
--
Chapters
00:00 How To Make Gnupg Display Full 8-Byte/64-Bit Key Id?
00:53 Answer 1 Score 21
01:09 Accepted Answer Score 92
01:23 Answer 3 Score 14
01:40 Answer 4 Score 9
02:11 Thank you
--
Full question
https://superuser.com/questions/619145/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#gnupg
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: RPG Blues Looping
--
Chapters
00:00 How To Make Gnupg Display Full 8-Byte/64-Bit Key Id?
00:53 Answer 1 Score 21
01:09 Accepted Answer Score 92
01:23 Answer 3 Score 14
01:40 Answer 4 Score 9
02:11 Thank you
--
Full question
https://superuser.com/questions/619145/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#gnupg
#avk47
ACCEPTED ANSWER
Score 92
Alternatively you can use:
gpg --keyid-format LONG -k 0xDEADBEEF
Or:
gpg --keyid-format 0xLONG -k 0xDEADBEEF
ANSWER 2
Score 21
You can see the long key ID using the option --with-colons
(yes, very intuitive).
To print only the long key ID, use something like:
$ gpg --list-keys --with-colons XXXXXXXX | awk -F: '/^pub:/ { print $5 }'
ANSWER 3
Score 14
Just to point out a sanely named option to remember,
GnuPG 2.2.13 on macOS Catalina 10.15.4, --list-signatures
option displays the key ID as well:
$ gpg --list-signatures
ANSWER 4
Score 9
gpg --version
# gpg (GnuPG) 2.2.19
# libgcrypt 1.8.5
To get the Short KeyId of the existing keys. In the example below there is only 1 key and the short keyid is 567C9ABC
, displayed after rsa4096
gpg --list-keys --keyid-format SHORT
#~/.gnupg/pubring.kbx
#pub rsa4096/567C9ABC 2021-03-06 [SC]
The Long KeyId = 32FA0BE4567C9ABC
gpg --list-keys --keyid-format LONG
#pub rsa4096/32FA0BE4567C9ABC 2021-03-06 [SC]
EDIT: the keyId could be obtained using either gpg --list-keys
or gpg --list-secret-keys