-
Notifications
You must be signed in to change notification settings - Fork 42
Description
GnuPG 2.3 will include direct PIV support and I was going to give it a try with a PivApplet card. Unfortunately I didn't get far: PivApplet returns an APT where object 0x4F has length 11 and it contains the full AID, while GnuPG expects the object to have 6 bytes and contain only the PIX + version without the RID.
OpenSC sources @ https://github.com/OpenSC/OpenSC/blob/0d693f63cbebda1440f1468eb30c35b7a278f7e9/src/libopensc/card-piv.c#L718 indicate that "early Yubikeys" also returned the full AID, but apparently new ones don't (a Yubikey 5 I have returns PIX+version only). SP 800-73-4 isn't really clear on the matter. Part 2 section 3.1.1 comment regarding tag 0x4F just states that "The PIX of the AID includes the encoding of the version of the PIV Card Application."
What's your take on what the object should contain? I think GnuPG ought to support both versions since both kinds of cards are in the wild, but no idea whether the developers will budge.
Addendum: sub-tag 0x4F in TLV 0x79 is apparently expected to contain only the RID (which is what's there on a Yubikey) and not RID+PIX.