Hello GPG Community,
I am trying to set up my primary GPG key, which I want to use for various purposes, including standard use cases like file/e-mail encryption and more niche features such as authentication when using SSH. Using the wiki, man pages, and other resources, like the infallible Stack Overflow, I created most of my desired setup. However, I encountered a problem which I could not solve so far. In short, my desired setup (and please tell me if you have suggestions on how to improve or where I might have made incorrect assumptions) is as follows:
I have three YubiKey 5s, two personal keys, and one from my workplace. I want to use these YubiKeys as OpenPGP smartcards. After some research, I settled on a primary certification key that does not expire and will be moved to an offline medium. Furthermore, I want to create three subkeys for signing, encrypting, and authenticating for each YubiKey. My reason for this is that these subkeys are generated on the device, and in case of loss or theft, I can revoke the three subkeys for the lost device instead of my entire key. Thus, my public key contains the primary certification key and three encryption, signing, and authentication keys for a total of 9 keys.
However, there is a catch. It seems the current implementation uses the “latest” encryption key from a public key rather than all, even if they are all valid and unexpired encryption keys. Thus requiring me to use a specific device rather than any of them. At first, I thought a workaround might be using the same subkeys on each device, but since GPG uses key stubs for smartcards, which are linked to the smartcards’ serial number this does not work either without reloading in some way. I have seen simply deleting these key stubs after plugging in the device or forcing a reload through gpg-agent.
Now, my main questions are: Have I missed something? And is the “transparent” use of multiple smartcards currently not possible? I am aware that I can force the use of a specific encryption key using the ! suffix, but this requires additional work and awareness from the sender. I have seen that GPG recently added Additional Decryption Subkeys (ADSK), but a subkey can’t be an encryption and ADSK key simultaneously. Thus, I have no method of signaling that a sender should use all of my encryption keys at once if possible.
I hope I haven’t overlooked anything and done all my due diligence. Maybe someone can offer a solution or confirm my suspicions.
Thank you for reading my post and kind regards .
An example of such a setup is:
pub ed25519 2025-04-19 [C] [ultimate]
6C39 6098 DD7D 3912 12A1 D99C B6CD 986A 4558 97AD
uid [ultimate] XXX
sub ed25519 2025-04-19 [S] [expires: 2027-04-19]
A921 D5ED 40E9 19FB AE03 3BA1 E2DE C941 5762 83ED
sub cv25519 2025-04-19 [E] [expires: 2027-04-19]
4B99 EBC7 94B5 F798 75A4 C43E 85B2 16D4 8E7A 959C
sub ed25519 2025-04-19 [A] [expires: 2027-04-19]
F75F 9207 FF22 D9BE B904 F980 9D65 9369 9386 AA82
sub ed25519 2025-04-20 [S] [expires: 2027-04-20]
B754 53E4 557B DFDC D93A 687B 2C8F E59C 5AFB FD29
sub cv25519 2025-04-20 [E] [expires: 2027-04-20]
EA64 6FCF 17F4 475F 79FB 5368 A70A 47A6 E415 FA9C
sub ed25519 2025-04-20 [A] [expires: 2027-04-20]
4F3B 36A4 F388 BAC4 7E5F B800 7F1A 7EEE 4C6A 2AB8
sub ed25519 2025-04-20 [S] [expires: 2027-04-20]
3176 E3AE 9C55 F040 E027 7F3D DB93 0CEE FE3E ECEE
sub cv25519 2025-04-20 [E] [expires: 2027-04-20]
4C54 AD18 7796 3EC6 0C2A F4E9 B378 70D5 6B3B D8B9
sub ed25519 2025-04-20 [A] [expires: 2027-04-20]
5A60 A007 3ECD 561E B094 DCF8 4E23 F2D1 EF95 40A8