Under ISO 7816-3 T=0, some APDUs (all Case 4, but also often Case 2, and sometime others) are broken into several TPDU. For example all successful Case 4 APDUs need a separate Get Response command.
The necessary functionality (somewhat the Terminal Transport Layer of EMV) is described in ISO/IEC 7816-3:2006 section 12, pages 32 thru 40. There are 8 "short" cases (for commands with no more than 'FF' bytes, give or take few) and that goes to 14 if we include longer ones. There are tons of details to get wrong; here's a quick quiz: - What are the different meanings of '00' in the byte following P2? - What should the CLA byte of Get Response be? - What rules determine the direction of transfer of data in the first TPDU of the Select APDU (CLA INS = '00' 'A4'), after the card has sent the ACK byte, both from the reader's and card's standpoint? Is this drudgery built into Windows's PC/SC? Into PCSC-Lite ? Is there a recommendable implementation? In what other common software is this built in? So far I only identified javax.smartcardio (and I think I remember finding bugs in some versions). I have a vague memory of some component of .NET (or was it VB?) doing that, but I fail to locate it. TIA, Francois Grieu _______________________________________________ Muscle mailing list [email protected] http://lists.musclecard.com/mailman/listinfo/muscle_lists.musclecard.com
