Pages

Technology News

Tuesday, February 10, 2015

Smart Card Communication-APDU Format

Java Smart Cards are different in sense that there is an on card virtual machine which resides in the card chip that is actually responsible for processing the instructions. The instructions to the card are sent by a host application. The host application may be a server side application or a desktop application or another smart card applet. 
Applets are applications that reside on the smart card. The host application and the smart cards communicate in a specific sequence. The host application sends commands to the applets and the applets sends back a response. 
This communication takes place with the help of Application Protocol Data Unit or APDU. The APDU is basically divided into two parts namely: 
  • Command APDU: Sent by the host application to the Java Card. The structure of the same is displayed below: 
    Mandatory HeaderOptional Body
    CLAINSP1P2LcData FieldLe
  • Response APDU: Response sent by the Java Card applet to the host application. The structure of the same is displayed below: 
    Optional BodyMandatory Trailer
    Data FieldSW1SW2

Google Search