14443-4 APDU template

Overview

ISO Innovatron the standard for smart card commands. According to this standard, the card is structured as a (lightweight) file-system, providing Directory Files and Elementary Files. Functions are defined to select the files and read the data from them. Every function call is called an “APDU”. The card's response is always terminated by a 2-B status word which denotes the success (value 9XXX, typically 9000) or the failure (value 6XXX).

Using the Innovatron Template, the reader is able to send 1, 2 or 3 APDUs and to find the data in the last card's response. The communication with the card is performed using the Innovatron Radio Protocol (deprecated Calypso cards).

Configuration

Lookup list (LKL register)

Register 03t0 (1 byte) selects the template.

Value Meaning Notes
72 Read data from Calypso cards using the Innovatron Radio Protocol

Size and format of output (TOF register)

Register 03t1 defines the output format. Refer to Template engine : Output Format register.

Prefix (PFX register)

Register 03t2 defines the output prefix. Refer to Template engine : Output Prefix.

Location of data (LOC register)

Register 03t3 (0, 1 or 2 Bytes) add offstet within data.

Bytes Content Notes / Valid range
0 (optional) Offset within the response to the last APDU
1 (optional) Shift bits to the left 00 to 07

Miscellaneous options (OPT register)

If register 03t4 is set, the reader adds a token to its output to tell the receiver what kind of object has been read.

Bytes Bits Meaning
0 7-4 RFU
3-2 Position of the “card type” token in the output
00: Before the PFX constant
01: After the PFX constant, but before the actual data
10: After the actual data
11: RFU
0-1 Add a “card type” token to the output
00: Do not add the “card type” token
01: Add a 1F as “card type” token
10: Add a T as “card type” token
11: Add 00

ISO 7816-4 APDU 1 (AU1 register)

The register 03t5 (4 to 32 Bytes) contains the first APDU to send.

Typically, this is a SELECT instruction (SELECT APPLICATION or SELECT DIRECTORY FILE).

Notes:

  • This 1st APDU can't be left empty,
  • The reader's receive buffer is limited to 128 bytes. Specify a LE below 80 to make sure the card's response will not overflow this buffer,
  • The reader does check the status word. The card must return a “success” SW (9XXX). Otherwise, the reader stops the transactions.

ISO 7816-4 APDU 2 (AU2 register)

The register 03t6 (4 to 32 Bytes) contains the second APDU to send.

Typically, this is another SELECT instruction (SELECT ELEMENTARY FILE), unless the file could be implicitly selected by a SFI (Short File Identifier) within a READ instruction.

Notes:

  • This 2nd APDU could be left empty (in this case the data is taken from the response to the 1st APDU),
  • The reader's receive buffer is limited to 128 bytes. Specify a LE below 80 to make sure the card's response will not overflow this buffer,
  • The reader does check the status word. The card must return a “success” SW (9XXX). Otherwise, the reader stops the transactions.

ISO 7816-4 APDU 3 (AU3 register)

The register 03t7 (4 to 32 Bytes) contains the third APDU to send.

Typically, this is a READ instruction (READ BINARY or READ RECORD).

Notes:

  • This 3rd APDU could be left empty (in this case the data is taken from the response to the 2nd APDU),
  • The reader's receive buffer is limited to 128 bytes. Specify a LE below 80 to make sure the card's response will not overflow this buffer,
  • The reader does check the status word. The card must return a “success” SW (9XXX). Otherwise, the reader stops the transactions.