Answer to Reset

Answer to Reset (ATR ) is the first information that conveys a smart card in the contact-type communication to a smart card reader after it has performed a reset of the card. Put simply, it is the ATR to a number of parameters with which the smart card that tells the chip card reader, how he can communicate with her.

Content

The contents of the ATR is specified in the smart card specifications ISO 7816-3 and the capabilities of the hardware chip (UART ) and the protocol implementation of the smart card operating system dependent. Smart card manufacturer to have the option of using the communication parameters in the ATR to affect the communication performance of the IC card and the terminal, in particular, the communication speed and optimized. The processing speed of an IC card, therefore, is highly dependent on the capabilities of the smart card reader used.

ATR is a smart card also often used by the host software to identify its type and thus select the required middleware to access the card. In the Windows Registry, the ATRs of cards can be found in order to reference the correct Cryptographic Service Provider (CSP). When installing a new CSP the ATRs of supported cards are entered into the registry.

Cold and warm reset

Chip cards can output different ATRs depending on the type of reset that is used by the terminal. When the card starts by applying the supply voltage and releasing the reset line, we speak of a Power -On-Reset or Cold reset. In contrast, a warm reset or a soft reset signal to the reset line of the contact surfaces of the chip card during operation. The map, depending on the nature of the reset, or even depending on the number of the hot return resets various ATRs.

This behavior makes it possible to achieve higher compatibility between the smart card reader and smart card. If a smart card reader does not support the parameters of the ATRs after the Power -On-Reset, it can send a signal to the reset line and receives depending on the card implementation an amended ATR. If the reader supports the parameters of the amended ATRs, the communication between the card and reader is established. Does the smart card reader to hot not reset, or does not support the parameters of the modified ATRs, no communication is possible, and the card reader can not be used with this card.

Structure

ATR is a series of bytes. Of which the first two bytes, and TS T0 required. All other are optional and by details from the previous byte ( T0 and TDx ) announced.

The following data types can be distinguished in the ATR:

The initial character TS

This byte indicates the so-called convention, that is, the convention on the bit and byte transfer, using the map.

  • Direct convention ( Direct convention) transmits a bit 1 having a high (High) level, and a bit 0 to a low (Low) level at the I / O line. The bits of the bytes to be transferred, starting from the least significant bit transmitted, in ascending order. The initial character for the direct convention is set to '3 B '.
  • The indirect Convention ( inverse convention) works with reverse level, ie, a 1 bit is transmitted with low (low) level and a high bit 0 (high) level. In contrast to direct convention, the data byte is transmitted descending from the most significant bit. For the Indirect convention is the initial character '3 F '.

The specified with the Initial Character convention is used for all communication between the smart card and smart card reader. The initial character being selected for both conventions, so that the level of the start bit and the first two bits transmitted of the initial characters are identical. Thus, the chip card reader can detect the correct start of the ATRs and based on the flanks of the start bit and the third transmitted data bits chosen by the card transfer speed calculator ( time interval between the flanks / 3). Since the transmission speed for the ATR in the ISO 7816-3 defined waive many readers in this calculation.

The format character T0

The format character contains two pieces of information:

The Interface Characters

The interface character contain either

  • Global parameters for all protocols or
  • Protocol-specific parameters

Global interface character TA1

In the interface character TA1 of the splitter and the transmission factor are given:

The FI value defined by a factor (F ) and also the maximum permissible pulse frequency ( f max) of the chip card. The following table shows the possible values ​​for FI:

For DI, the coding is as follows:

To the divider and the transmission adjustment factor F D is the duration of a bit may ETU ( Elementary Time Unit) is calculated, where f is the frequency of the applied clock signal to the smart card:

Global Interface Character TB1

Interface character TB1 indicates the maximum power consumption and the required voltage for programming the EEPROM, which must be provided by the smart card reader on the contact surface Vpp. Since modern smart cards generate the programming voltage via built-in charge pump from the normal power supply, the TB1 is usually not indicated in the ATR.

The table below shows the encoding of the TB1:

The following values ​​are defined for PI1:

The current maximum required results from II by the following table:

Global Interface Character TC1

This parameter specifies the " extra guard time " (extra guard time ) as the integer value N. This value defines the number of ETUs between the edges of two consecutive byte transfers using the following formula:

The only exception is the value of 255, which specifies the minimum period of protection, which is

Interface character TDx

TD1, TD2, TD3 and TD4 each contain two pieces of information:

The precise structure we presented in the following table:

For the protocol type, the following values ​​are specified:

Global interface character TB2

Interface character TB2 contains the 8 -bit value PI2. It can be used as an alternative to PI1 in the interface character TB1 to specify the programming voltage very accurately. PI2 indicates the value of the required programming voltage in tenths of Volts.

Since modern smart cards generate the programming voltage via built-in charge pump from the normal power supply, the TB1 is usually not indicated in the ATR.

Protocol-specific interface character TC2

TC2 is a data element for the protocol T = 0 and is called the waiting time at work. This value is the maximum time between the start edges of two consecutive bytes. The default value of the work waiting time is 10

The Historical Characters

The contents of the Historical Characters is specified in ISO 7816-4 and in Compressed TLV (Tag 4xh and length 0-15 in a byte, the value behind it ) coded. They are used for a variety of information, for example, the version of the operating system and the capabilities of the card.

Often, instead of Compressed -TLV - coded data objects also to find a (non ISO 7816-4 compliant ), pure ASCII string.

The check character TCK

The check character is an XOR checksum of bytes T0 to the byte before the check character. In addition to the tests of the transmission protocol so that the correctness of the ATR can be tested.

The check character must not be sent with the ATR, when only the protocol T = 0 is supported in the ATR. If the protocol T = 1 is used, the check character should be transferred to the ATR.

68168
de