|
|
 |
 |
|
Smart Card communication
| Security techniques
|
Please note, that the Knowledge Base isn't translated to english completely at the moment. You will still find some german texts - we are translating permanently the outstanding parts! Thank you for understanding! |
Answer to Reset - Basics |
| |
|
|
|
The "Answer to Reset" is the first information sended by the card to the card reader after reset initiated by reader. It is a simple row of parameter, in which the card is telling the reader, how to communicate with it. The structure of ATR Contact cards, regardless wether processor chip card or memory chip card, independent of used protocol. all the same. But the content depends on the specification, the chip structure and manufacturer guidelines. Smart card manufacturers have the possibility to control the performance of the chip card, by defining the parameters in the ATR. Chip cards can have more ATRs, to reach more compatibility.
The structure of an ATR consists of several blocks, the Initial Charater, Format Character, Interface Characters, Historical Bytes and the Check Caracter.
The Initial Character, called TS, is used for defining the Bit-Coding (logical „1“ is transmitted as Low (L) or High (H)) and for recognition of the factor relevant for bit-length, used by the card. This is implemented as follows, the start-bit and the next three bits are always built on the pattern (L) H H L x x x x x x (L = Low, H = High, x = don’t care). The card reader is measuring the time between the two falling edges, and divides it by three. The resulting Elementary Time Unit (etu) is defining the die lenght of time of one bit.
The next three bits of the sequence indicate the bit-coding. Three bits on high means that logic "1" is coded as "High" (direct converting); three bits on low means, logic 0 is coded as Low (indirect converting). first Bit: Start-Bit; last Bit: Partity-Bit
Direct Conversion - (L) H H L H H H L L (H) Indirect Conversion - (L) H H L L L L L L (H)
Consider, that, depending on the conversion, the order sequence is changing. Direct conversion means that the "Least signigicant Bit is transmitted first, otherwise the Most Significant Bit is transmitted first when indirect conversion is used.
Because Interface Characters and Historical Characters are optional, the Format Caracter (called T0) indicates, which characters are transmitted. The Most Signifiant Nibble (MSN) of T0 is showing by its bits, which of the next four Interface Characters are transmitted. The Least Significant Nibble (LSN) is interpreted as number and indicates the number of Historical Characters (1 to 15). Next table is showing possible Format Characters.
|
 |
 |
 |
ATR-schema |
|
Format Character |
|
- |
- |
- |
- |
x |
x |
x |
x |
number of historical characters |
|
- |
- |
- |
1 |
- |
- |
- |
- |
TA(1) is transmitted |
|
- |
- |
1 |
- |
- |
- |
- |
- |
TB(1) is transmitted |
|
- |
1 |
- |
- |
- |
- |
- |
- |
TC(1) is transmitted |
|
1 |
- |
- |
- |
- |
- |
- |
- |
TD(1) is transmitted |
|
 |
 |
 |
 |
 |
|
|
The structure of the Interface Characters can be compare to chained lists. TD(1) is showing, like T0, in its MSN (Most Significant Nibble), which of the following Interface Characters (TX(i+1), X Î {A, B, C, D}, i > 1) appears in the ATR. The Least Significant Nibble (LSN) of TD(i) indicates the protocol-type to be used (T = 0, T = 1 resp. others (in future). If the chip card is supporting more protocols, this is shown in TD(i+1) then the selection of the protocol has to be done in a separate workflow. TA(1), TB(1), TC(1) and TB(2) are calle global Interface Bytes. They are telling the card reader the internal clock pulse, the necessary programming voltage and the resulting programming power. The interpretation of TA(i), TB(i), TC(i) (i > 2) depends on the protocol type.
The content of the Historical Bytes isn't standardized yet. You will find informations about the card manufacturer or issuer, the card type, versionnumbers and state of the card. In austrian maestro cards you will also find the balance of the integrated austrian E-Purse "Quick", in this bytes.
By using the Check Character an additional Parity-check can be done. The Check Character contains check byte for the ATR - XOR from T0 to the last byte before TCK. Its transmittance depends on certain criteria, e.g. the protocol type, therefore, such an parity check isn't possible in all situations.
|
|
|
|
 |
|
 |
|
|
|
|
|
|
|
|
|
|