The Answer to Reset (ATR) is a byte string returned by an EMV chip card upon initialization, providing details about its interface, protocol, and historical data as per ISO/IEC 7816 standards. It varies by chip manufacturer, card issuer configuration, and batch, but patterns exist across similar card types.
A specific ATR for the Toronto-Dominion Bank Visa Classic card with BIN 408586 could not be identified in public databases, as ATRs are not directly tied to BINs and may differ per issuance. However, based on publicly available ATR lists for comparable Visa Classic credit cards from various issuers, here are some examples (in hexadecimal format) along with their descriptions:
| ATR Value | Description |
|---|
| 3B 7F 13 00 00 80 31 C0 52 0A A6 64 02 B3 02 37 83 83 90 00 | Visa Classic credit card issued by "La Caixa" (Spain) |
| 3B 7F 13 00 00 80 31 C0 52 0A D6 64 05 66 94 61 83 83 90 00 | Visa credit card issued by Caixa d'Enginyers (Spain) |
| 3B 67 00 00 A6 40 40 00 09 90 00 | Visa Classic card issued by Landkreditt Bank or DNBNor (Norway) |
| 3B 65 00 00 20 63 CB 68 00 | Visa credit card issued by Skandiabanken or Banque Populaire (France) |
| 3B 68 00 00 00 73 C8 40 11 00 90 00 | Visa Classic card issued by Nordlandsbanken (Norway) |
These are real-world samples from EMV-compatible Visa cards and can serve as references for prediction or simulation in development/testing scenarios. For exact ATR generation without a physical card, it typically involves knowing the chip's T=0 or T=1 protocol parameters, historical bytes (e.g., for application data), and issuer-specific customizations — often derived from manufacturer specs like those from Gemalto or IDEMIA. If you have additional details about the chip type, a more tailored prediction could be attempted.
ATR is a standardized message transmitted by a smart card's integrated circuit chip in response to a reset signal from a card reader, as defined in the ISO/IEC 7816-3 standard for contact smart cards. It establishes initial communication parameters, such as bit rate, protocol type, parity, and card-specific details, and is typically a sequence of up to 33 bytes (including the initial byte). The ATR is mandatory for asynchronous transmission protocols and helps the reader negotiate how to interact with the card for the session.
General Structure
The ATR is divided into five main fields, transmitted sequentially from the card to the reader:
- Initial Character (TS): This is the first mandatory byte, used for bit synchronization and to indicate the transmission convention (direct or inverse). It is always either 0x3B (direct convention, where logic '1' is high voltage) or 0x3F (inverse convention). TS ensures the reader can properly interpret the bit order and voltage levels for the rest of the message.
- Format Character (T0): The second mandatory byte, which indicates the presence of subsequent interface bytes. It is structured as follows:
- Bits 5-8 (higher nibble): Number of historical bytes (K, from 0 to 15).
- Bits 1-4 (lower nibble): Presence indicators for interface bytes TA1 (bit 4), TB1 (bit 3), TC1 (bit 2), TD1 (bit 1), where '1' means the byte is present. T0 essentially acts as a map for what follows.
- Interface Characters (TAi, TBi, TCi, TDi): These are optional bytes (up to 4 groups, indexed by i starting from 1) that define electrical and protocol parameters. They appear in sequence based on T0 and subsequent TD bytes:
- TAi: Global or specific interface parameters, such as clock rate conversion factor (FI) and bit rate adjustment (DI) in TA1.
- TBi: Parameters for voltage and current requirements (e.g., programming voltage in older cards).
- TCi: Extra guard time or waiting time integers.
- TDi: Protocol type (e.g., T=0 or T=1) and pointers to the next set of interface bytes (if any). TD1, for example, specifies the first protocol and whether more interface bytes (TA2, etc.) follow. These bytes can chain (TDi points to the next group), allowing flexibility for different card capabilities.
- Historical Bytes (T1 to TK): Optional bytes (0 to 15, as indicated in T0) providing card-specific information, such as manufacturer details, application type, or proprietary data. They often follow a tag-length-value (TLV) format, with common tags including:
- 0x1: Country code (ISO 3166-1).
- 0x2: Issuer identification number (ISO 7812-1).
- 0x4: Card service data (e.g., application selection methods).
- 0x5: Initial access data.
- 0x6: Card issuer data. These help identify the card's purpose (e.g., payment, ID) and may overlap with data in an ATR file on the card.
- Check Character (TCK): An optional final byte for error detection, computed as the exclusive-OR (XOR) of all bytes from T0 to the last historical byte (excluding TS). It is present only if the protocol is not T=0 (character-oriented) and ensures the ATR's integrity. For T=0, error handling uses character repetition instead.
Additional Notes
- The ATR applies to both cold resets (full power cycle) and warm resets (signal without power interruption).
- In EMV payment cards (a subset of ISO 7816), the ATR is often shorter and focuses on payment-specific parameters.
- For synchronous cards, the structure is less standardized and defined in ISO/IEC 7816-10.
- Parsing tools or libraries (e.g., in Python with pyscard) can decode ATRs for practical analysis.
This structure ensures reliable initialization, allowing the reader to adapt to the card's capabilities before further commands.
The examples provided are from public databases of EMV-compatible Visa card ATRs. Note that while they follow the ISO/IEC 7816-3 structure in part, some appear to have additional bytes at the end (e.g., repeating values or 90 00, which may indicate a status code or CRC for contactless interfaces in some contexts). I'll decode each as per the standard structure, assuming the core ATR ends at the TCK (if required), and note any discrepancies. The decoding includes interpretations where applicable, such as clock/bit rate parameters from tables in the standard.
1. ATR: 3B 7F 13 00 00 80 31...