Context: With PGP, we have master & sub-keys so that you can have a really secure (and therefore inconvenient) master for occasional use (subkey certification, revocation, renewal), and more convenient (and therefore less secure) subkeys for day-to-day use (signing & encryption). The typical recommendation is to generate your keys on a laptop that has never and will never be exposed to the internet, and transfer the subkeys to your daily use devices using a trustworthy storage medium.
OnlyKey (specifically the derived key feature) seems to me to be a natural replacement for the secure master laptop. Meanwhile, OnlyKey is not (currently) a convenient enough way to host subkeys for daily use. The email application that I use on my phone supports PGP using the phone’s secure storage, but does not support interacting with the OnlyKey.
However, I can’t figure out how to accomplish this setup. The OnlyKey Agent documentation shows how to use a derived master & subkey. It shows how to use an OnlyKey-subkey with a non-OnlyKey master key (the opposite of what I want). But there’s no explanation of how to add subkeys (even on-device ones) to a derived OnlyKey master key.
Attempting to add a sub-key using the OnlyKey GPG profile results in gpg
hanging indefinitely. I do see that the documentation explicitly states that OnlyKey and non-OnlyKey keys cannot coexist in the same profile, so this isn’t a surprise.
But I can’t imagine why it wouldn’t be possible to do the “generate a new key” part of the gpg --quick-add-key
procedure on one profile (which has only the public master), and then complete the remaining “certify the new subkey’s metadata with the master key” part of that procedure on a different profile (which has the secret master). This would effectively circumvent the restriction against mixing key types in a profile. However, it seems that offline subkey signing request, while theoretically possible, simply hasn’t been implemented in gpg
.
I found this guide that explains how to migrate subkeys from one master to another, but it requires creating temporary “dummy” subkeys on the destination master, which isn’t possible in this case.
Is there a way to do this in gpg
that I’m unaware of? Or any other tools that could accomplish it? If not, it would be a great feature to have in onlykey-gpg
.