shtrom at ssji
Aug 13, 2012, 10:32 PM
Post #3 of 4
Re: Using a different OpenPGP card/subkeys with same master key
[In reply to]
On Tue, Aug 14, 2012 at 05:26:55AM +0200, Hauke Laging wrote:
> > This seems to be related to the problem listed at .
> But the solution given there does not work?
I didn't try it, as I'm not exactly in the same situation, as the master
key is the same, only the subkeys are different.
> > More generally, I could not work out a reliable way to get a fresh OS
> > install/user account to recognise an already-initialised OpenPGP card
> > without copying over the full .gnupg/ from the machine where the card was
> > initialised.
> So you first imported the public key,
Yes. I just retried moving my .gnupg out of the way.
> read the card via --card-status then.
> What is the output of "gpg --list-secret-key" afterwards?
Ah! It now lists all subkeys! ... And signs properly with my home card.
Ok, so the process to reuse an already initialised card is to first
import the public key, then edit-card, and GPG should be able to use it
properly afterwards (given a proper scdaemon/gpg-agent setup). Great,
thanks for that.
Unfortunately, putting my original .gnupg back in, and doing the same,
doesn't work similarly. I have all the public keys and subkeys but,
after the card-edit, I still only have the secret keys from the work
card, rather than the home card currently in the reader.
Taking the solution from , only deleting the signing subkeys, then
editting the card seems to fix the problem. I can now sign with my home
card on my work laptop.
So, it would seem that the problem mentionned in  is still there,
even with different subkeys from the same master key. The solution works
similarly well in that, once the work subkey has been deleted, the
subkey from the home card can be imported and used. Surprisingly, the
work signing subkey still appears in the secret subkeys after this
I hope I find my work card again so I can test this further.
In the meantime, thanks for your help (:
Olivier Mehani <shtrom [at] ssji>
PGP fingerprint: 4435 CF6A 7C8D DD9B E2DE F5F9 F012 A6E2 98C6 6655