What is an ATR (Answer to Reset)?
The ATR (Answer to Reset) is a sequence of bytes that a smart card (such as an EMV chip card) transmits to the terminal immediately after being powered up or reset. It is the card's first communication with the reader and is defined by the ISO/IEC 7816-3 standard.
The ATR tells the terminal how to communicate with the card, including the supported protocol, data transmission speed, and card capabilities.
ATR Byte Structure
An ATR consists of the following fields, in order:
Field | Name | Description |
|---|---|---|
TS | Initial Character | Indicates the convention used: 3B = direct convention, 3F = inverse convention. |
T0 | Format Character | The upper nibble indicates which interface bytes (TA1, TB1, TC1, TD1) follow. The lower nibble indicates the number of historical bytes. |
TAi, TBi, TCi, TDi | Interface Characters | Define communication parameters such as clock rate, voltage, guardtime, and protocol type. TDi also indicates whether additional interface bytes follow. |
T1…Tk | Historical Bytes | Optional bytes providing additional information about the card (manufacturer, card type, OS version, etc.). |
TCK | Check Character | A checksum byte (XOR of all bytes from T0 to the last byte before TCK). Present only when a protocol other than T=0 is indicated. |
How to Evaluate an ATR
1. Identify the Convention (TS byte)
3B → Direct convention (most common for EMV cards)
3F → Inverse convention
2. Parse the Format Character (T0)
The upper nibble (bits 8–5) is a flag that indicates which of the first set of interface bytes (TA1, TB1, TC1, TD1) are present.
The lower nibble (bits 4–1) gives the count of historical bytes (K).
3. Interpret the Interface Characters (TAi, TBi, TCi, TDi)
These define the card's communication parameters:
TA1: Encodes the clock rate conversion factor (Fi) and baud rate adjustment factor (Di), which together determine the data transmission speed.
TB1: Programming voltage and current (largely deprecated in modern cards).
TC1: Extra guardtime — additional delay between characters.
TD1: Indicates the protocol type in the lower nibble (e.g., 0 = T=0, 1 = T=1) and flags the presence of the next set of interface bytes (TA2, TB2, TC2, TD2) in the upper nibble.
If TD1 is present and its upper nibble flags additional bytes, parsing continues with TA2, TB2, TC2, TD2, and so on.
4. Read the Historical Bytes
Historical bytes are optional and card-specific. They can contain:
Card issuer identification
Card type or platform information
Supported standards or application identifiers
These bytes are not standardized beyond the ISO 7816-4 format and are often proprietary.
5. Verify the Check Character (TCK)
If the ATR indicates only T=0, TCK is not present.
If any protocol other than T=0 is indicated (e.g., T=1), TCK must be present and should equal the XOR of all bytes from T0 through the byte preceding TCK.
A TCK mismatch indicates a communication error or corrupted ATR.
Practical Example
ATR: 3B 60 00 00
Byte | Value | Meaning |
|---|---|---|
TS | 3B | Direct convention |
T0 | 60 | Upper nibble 6 → TD1 and TC1 present; lower nibble 0 → no historical bytes |
TC1 | 00 | Extra guardtime = 0 |
TD1 | 00 | Protocol T=0; no further interface bytes |
Since only T=0 is indicated, no TCK byte is present.
Tools for Parsing ATRs
Parsomatic: ID TECH's parsing tool can help decode ATR bytes along with other EMV data. See Parsomatic - Home.
Online ATR parsers (e.g., smartcard-atr.apdu.fr) can break down any ATR string into its component fields.