smartcardapdu

APDU Command for same Personal ID card returns different response on different readers


I am trying to read Personal ID card on contactless card reader. I have done code in Java for USB Gemalto reader where I`m able to read basic stuff - such as Auth Certificate/Sign in Certificate.

When I perform same set of APDU commands on contactless, I get different responses and unable to read the certificate.

After successful select and getting ATR, I`m sending following commands:

On contactless reader, command 3 and command 4 return apdu response 69 82, suggesting security conditions are not met.

Is there any difference between reading chip contact/contactless which prevents me from getting successful response on last 2 commands?


Solution

  • There is a pretty sophisticated mechanism in ISO 7816-4, which allows access rules to be specific to the communication interface. It would be easy, to code a rule, which rejects the Read Binary on contact interface (the ISO-term is transport type descriptor), but this is an untypical use - one would expect more restrictions on the contactless side.

    On the other hand, your example is an extended length APDU, which the card as well as the reader have to support for contact-based interface. Of course 67 00 would be a more helpful status for that scenario, but... I would try shorter response LE (i. e. a single byte) for confirmation.