CITI Previous | Index | Next

Exercise 2: Send an APDU to Cyberflex, and get a reply

We will send a "select" APDU to the card and get a reply.
There are really two APDUs here, including a second one that gets the reply.
The details of this protocol are described in ISO 7816 part 3 for those who are curious.
Sectok hides these details from us.

  1. Insert the Cyberflex card in the reader.
  2. Run sectok.
  3. Reset the card.
  4. Send the "select" APDU and get a reply.

% sectok
sectok> r
sectok> apdu a4 0 0 2 3f 0
1:0 2:0 3:34 4:c2 5:3f 6:0 7:1 8:0 9:0 10:0 11:0 12:0
13:a 14:13 15:0 16:3 17:2 18:0 19:83 20:83 21:0 22:0 23:0 
9000 ok
sectok> q

The format of the reply, called "response data," is specific to each card.