Question

Based on response APDU. I receives 61XX, which indicate i could read XX bytes (Length 0x00). I wonder, if I want to read 0x0000 in the Le, will always get maximum 61FF which 256 bytes available.

Is it possible to read 0x0000 length in the command APDU and receive all of it?

Was it helpful?

Solution

You probably want to use T=1 in this case and that would mean no 61XX answers (which is a property of T=0)

OTHER TIPS

61xx suggests, that you currently use T=0. Whether the also supports T=1 (this is not certain, but possible), is coded in the ATR, but hard to derive by humans without 7816-3 knowledge). The problem is, that 61 xx provides only one byte. You can now proceed with two approaches:

  • (cautious) either you try sending a GET RESPONSE with the given value, which again might return an 61 xx status code.

  • (progressive) send a GET RESPONSE using an LE coding of extended length (not all cards support it, but 61 xx does not imply, that your card does not).

As you mentioned, "61xx" means you can only get "xx" bytes data from the ICC. The number of returning data byte is controlled by ICC, and it is useless to send other value to ICC unless you wants to get less data from ICC (i.e., <= "xx").

As Martin said, "61xx" only presents in T=0 protocol. For T=1, it will never appear such a status word.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top