问题
I want to know the difference between contact card and contactless(RF) card in terms of APDU command/response, implementation and so on.
I'm implementing an applet using combi card. I thought that regardless of contact interface or contactless(RF) interface, an applet returns the same response APDU for a command but it doesn't seem like that. I have no idea about that. (I implemented an applet for the only RF interface or for the only contact interface before, not for both.)
Is it possible to implement an applet to return the same response APDU for a command APDU? If not, what part is the difference. Is there any considerations when I implement an applet for both interface. I appreciate any related comment or information(URL).
Thanks.
回答1:
The difference you are hinting at is the difference between T=0 and T=1 / T=CL. T=0 and T=1 are contact based transport protocols. T=CL is a ContactLess protocol for either 14443 type A or type B contactless cards.
T=0 is byte based and the contents of the APDU are used for the transport layer as well. In that sense it is a lower level protocol. The separation between layers is very bad in the ISO/IEC 7816-4 specifications though, this is not made very explicit.
One of the effects of T=0 is that it cannot distinguish between the Lc and Le bytes that encode the command and maximum response sizes. Hence the APDU is required to either send or receive data. It can use specific status words, such as 61XX
and the GET RESPONSE
APDU to allow for both command and response data.
T=1 and T=CL provide an underlying transport protocol operates on its own layer. It therefore does not require special handling of the ISO case 4.
Now for Java Card, the handling of T=0 GET RESPONSE Is mostly done by the Java Card Runtime Environment, so there is usually no need for very specific T=0 code.
回答2:
There is no difference between contact and contactless (in terms of APDU command/response)
来源:https://stackoverflow.com/questions/25580909/difference-between-contact-card-and-contactlessrf-card