-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add another known Idemia ID-One PIV card #2995
Conversation
Looks OK. The first PIV 800-73-4 card I have is labeled "ID-ONE PIV 2.4 on Cosmo v8.1" from Dec 10, 2018 with ATR Then in June 12, 2020 I received a set of 5 cads labeled "ID-One PIV 2.4.1 CIV configuration" with ATR "3b:d6:97:00:81:b1:fe:45:1f:87:80:31:c1:52:41:12:23" The same as the one you have. These are the cards I used to do most of my PIV SM testing. The cards have different combinations of keys, PIV SM cipher Suites, PIN Policies and VCI Pairing code requirements. One card can actually do Fingerprint OCC which I did not add to OpenSC as testing would require loading my fingerprint to card.
The PIV driver is designed to check ATRs first then (matched or not) check card for the PIV applet by selecting PIV AID and/or testing for Discovery object See comment here: https://github.com/OpenSC/OpenSC/blob/master/src/libopensc/card-piv.c#L5455-L5468 The only place the ATR is used is for cards with issues or in the minidriver. But all PIV manufactures I have seen provide a minidriver, or can work with the Microsoft PIV support. So by default the OpenSC minidriver ATRs do not include ones for PIV cards. |
Based on my card ATR and Dough's one: 3b:d6:97:00:81:b1:fe:45:1f:87:80:31:c1:52:41:12:23 3b:d6:97:00:81:b1:fe:45:1f:87:80:31:c1:52:41:1a:2b
Updated the atr list with mask to match wider list of "common" ATRs. I see that the type is based on the discovery object, but I recently got reports about PIV cards without discovery object (or empty?), that OpenSC fails to work with so I wanted to try if this could solve the issue. I do not have the cards to play with yet though. I am not sure if there is some change in the applet or the card side so I hope I will come with some updated |
Yubico by, default does not have a discovery object but card-piv.c will try to read discovery object: The response to SELECT AID or Discovery must contain the short AID Some cards (muscle in particular) would respond 90 00 to any select aid! |
muscle detection happens bevor PIV - is this really still a problem? |
In the log I have with the ATR
and subsequent AID selection not returning FCI (again only So this change is likely not going to fix this problem, but I wanted to have the ATRs we are using recorded somewhere.
I think the muscle cards are less common these days making this less of an issue. Just a note that this card returns failures for selection of unknown objects (for example as the CAC detection continues, selection of CAC files fails with |
Sounds like card does not have a PIV applet. sp800-73-4 says the response should have a: Are these cards initialized? Do they have a PIV applet?
|
And if you think the card does have a PIV applet, look at: |
I was likely wrong regarding the missing discovery object. The new logs I got show that there is discovery, but there are no key/certificate objects except for the SM signer certificate. I am still working on getting more logs and information, but it takes time. So in any case, merging this should not hurt and as I will have more information, I will open a new issue/PR. |
My Idemia ID-One PIV 2.4 cards have different ATR than the one that is listed in the PIV driver (but works regardless this). We should probably introduce some mask to be able to match them better (probably for the third byte and last two).
@dengert can you check your idemia cards have this ATR or some different?
Checklist