Page 1 of 1

could somebody give me a intuitive description about APDU commands

Posted: Tue Sep 29, 2015 5:21 am
by Dhawan
Hey guys.
I am getting started with java card programming. But now i am a bit confused about APDU commands.

I also heard that ISO 7816-4 specifications describes the details about APDU command.
However, it's payware.

So, could somebody give me a intuitive description about APDU commands?
if anyone is willing to put his time in here to help me out, i would greatly appreciate it.

Re: could somebody give me a intuitive description about APDU commands

Posted: Thu Oct 08, 2015 5:18 am
by Larson
An application protocol data unit (APDU) is the communication unit between a smart card reader and a smart card.
There are two categories of APDUs: command APDUs and response APDUs.
1.command APDU

The first four sections, CLA , INS , P1 and P2 are mandatory in all APDU commands and each one must be one byte length.
CLA --Instruction class - indicates the type of command
INS --Instruction code - indicates the specific command
P1-P2 --Instruction parameters for the command
Lc -- the number of bytes of command data to follow
Data field -- Lc bytes of data
Le --the maximum number of response bytes expected

2. response APDU

Data field -- the data returned to reader.
SW1 SW2 -- Command processing status, e.g. 90 00 indicates success.

Re: could somebody give me a intuitive description about APDU commands

Posted: Mon Oct 12, 2015 3:41 am
by Dhawan
Thanks for your detailed reply.