Important!

Blog moved to https://blog.apdu.fr/

I moved my blog from https://ludovicrousseau.blogspot.com/ to https://blog.apdu.fr/ . Why? I wanted to move away from Blogger (owne...

Sunday, March 22, 2020

ATR statistics: Historical bytes - Historical bytes Ti (optional)

Article from the series "ATR statistics"

Historical bytes Ti (optional)

The ISO 7816-3 specification is not public. So I can't copy/paste part of the text. I will use Wikipedia instead.

From Wikipedia https://en.wikipedia.org/wiki/Answer_to_reset#Historical_bytes_Ti:
Historical Characters Ti for i≥1, if present (as defined by K coded in T0), typically hold Information about the Card Builder, Type of Card (Size etc.), Version number and the State of the Card.

You can read the previous article about the T0 byte at ATR statistics: T0 - Format byte.

Regarding the T0 high nibble values we have:

hbn#%
0x0F74335.86 %
0x0E21210.23 %
0x0D1507.24 %
0x071366.56 %
0x051286.18 %
0x081165.60 %
0x0B1155.55 %
0x0A1075.16 %
0x09904.34 %
0x06864.15 %
0x0C723.47 %
0x04462.22 %
0x02401.93 %
0x03150.72 %
0x00130.63 %
0x0130.14 %




A large part (38%) of the ATR have 15 (0x0F) historical bytes, i.e. the maximum size.

The bytes can contain application information like for 3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
Historical bytes00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
Category indicator byte: 0x00 (compact TLV data object)
Tag: 5, Len: 6 (card issuer's data)
Card issuer data: 72 75 54 6F 6B 6E "ruTokn"
Tag: 7, Len: 3 (card capabilities)
Selection methods: 48
- DF selection by file identifier
- DF selection by path
Data coding byte: 32
- Behaviour of write functions: proprietary
- Value 'FF' for the first byte of BER-TLV tag fields: valid
- Data unit in quartets: 0
Command chaining, length fields and logical channels: 0
- Logical channel number assignment: No logical channel
- Maximum number of logical channels: 1
Mandatory status indicator (3 last bytes)
LCS (life card cycle): 0 (No information given)
SW: 90 00 ()
or contain only the card name like for 3B 6F 00 FF 52 53 41 53 65 63 75 72 49 44 28 52 29 31 30
Historical bytes52 53 41 53 65 63 75 72 49 44 28 52 29 31 30
Category indicator byte: 0x52(proprietary format) "SASecurID(R)10"

I do not think it is important to detail all the possible information contained in the historical bytes.

For those who are interested you can read the ISO 7816-4 (note: not the 7816-3) chapter "8.1.1 Historical bytes".