1997 Feb 03
12
Philips Semiconductors
Product Specification
Memory card IC
PCB2032
7.1
Memory Card ICS
For the memory ICs a normal Answer to Reset (ATR) of 4
x 8 bit is used. The ATR identifies the card to the terminal.
The ATR, ATR data and DIR data are programmed into
byte 0 to 31 of the EEPROM memory.
All these bytes from address 0 up to address 31 (0x1F)
in the memory can be turned into ROM by setting the
according protection bits
(see Chapter 5).
Once frozen these bytes can not be altered any more!
The memory card ATR looks as follows (see Fig.6):
ATR header:
H1 .. H4
4 bytes, which refer to the ISO 7816, Part 3
standard (address 0 .. 3)
protocol (here “0xA2” stands for 2-wire bus
protocol/general purpose structure)
memory organization, means number of
data units and length of data units (e.g. for
2032 -> “13” stands for: 256 x 8 bit)
are the so called historical data as defined in
ISO7816, part 3
category indicator: DIR data exists Yes/No
(here “0x10” = Yes)
address of DIR data (here “0x91”, bit 8 set to
“1” says address is valid, address = “0x11”,
so points to the first byte of the DIR file)
H1 =
H2 =
H3, H4
H3 =
H4 =
The terminal reads the ATR and if H3 = 0x10, the DIR
address is read in H4 and the terminal then jumps to DIR
(H1 .. H4 must always be read!).
DIR data:
The whole ATR is TLV (tag/length/value) coded. This
means there are always three entries:
Tag
indicates position of any of the entries or
identifier, all these tags are given by ISO
Length
gives length of the entry in number of data
units (bytes)
Value
is the contents of the entry or identifier
So in the DIR file there is first of all a tag TT for the
application template followed by the length (LT), then
comes the application identifier (AID), also leaded by the
AID-tag (TA) and AID-length (LA). The last part of the DIR
file is the application personalizer ID, which also has this
structure.
7.2
Application Identifier (AID)
Main reason to have an application specific identifier within
every card is that ATR enables to distinguish between
different applications, which are using the same protocol,
same silicon etc.
So in case the AID is not correct for the applications the
card is used for, the terminal should automatically reject
the card, so any confusion or abuse get avoided.
The application identifier can be applied at GMD
(Gesellschaft für Mathematik und Datensysteme), who
handles the registration for all German applications with a
length up to 16 byte.
for Germany:
ID German National Registration Authority
c/o GMD, att. Mr. Bruno Struif
Rheinstrasse 75, 64295 Darmstadt, Germany
For the international registration of RIDs (registrated
application provider identifiers = AID) a provider should -
according to ISO 7816, part 5, chapter 7 - apply to the
standard body of his related country. So every country
should have such an organization like the GMD in
Germany, which signs responsible. In the absence of such
body or organization the secretariat of the ISO technical
body is responsible for the assignment.
7.3
AP
The application personalizer identifier is optional.
7.4
Proprietary AIDs
For very small applications or pilot projects not registered
AIDs can be used. Bits 5 to 8 of the first AID byte at
address “0x15” must be set to logic 1. This means, the AID
has to start with “F”, to indicate, that it is not registered.
Major constraint with unregistered AIDs: there is no
guarantee that application IDs do not overlap!
7.5
ATR-file
The ATR-file is coded in the same way as the DIR-file, as
already explained above, and contains information about
the IC manufacturer, the IC-type (so for instance 0x05
stands for PCx2032, 0x15 stands for PCF2042) and the
serial number of the card.