Read DIN (Driver Identification Number) from a smart card (drivercard)
Asked Answered
R

1

6

I'd like to know how to get a DIN (Driver Identification Number) from a smartcard. The card is a driver card, used to store tachograph data.

I can already communicate with the smartcard reader but I don't have a clue about how to read that information.

Looking at the smartcard faces, it shows a list of (I think) record numbers:

  1. Surname
  2. Given name(s)
  3. Date and place of birth
  ...
  5b. Card Number

The last one is the info I need: Card Number on record 5b.

I'm not experienced with smartcard reading. I don't know what I have to do. I suppose I have to send a "select file" APDU command and then read the 5b record, but don't know which file or how to format that commands.

On the card, there is a rectangle with E1 inside, and 182 under it, don't know if that could be a hint about what to read...

I know driver cards need authentication to read important data but I think the card number is something public (not sure though).

Who can help me?

Reactance answered 28/4, 2014 at 11:21 Comment(0)
S
10

I assume you are refering to a tachograph driver card according to the ECC regulation No 3821/85, right?

In that case, the communication flow with the card would be something like the following:

  1. SELECT tachograph application

    00 A4 04 0C 06 FF544143484F
    
  2. SELECT elementary file by file identifier (xxxx)

    00 A4 02 0C 02 xxxx
    
  3. READ BINARY to get file data (zz bytes from offset xxyy)

    00 B0 xx yy zz
    

The card number would typically be in EF Identification (FID 0520), 16 bytes starting at byte 1.

You can find a complete specification of the driver card's protocol and data structures as part of the regulation document (here).

Samy answered 28/4, 2014 at 22:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.