Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android nfc reading Driver license BAC vs BAP

Tags:

android

nfc

Using android device to nfc read my country ID card and Driver license (hint: both had 3 lines MRZ of Type TD1 and the Driver card has a number 8digits+'E' near the chip, witch I don't know what is used for!?)

  • for ID card part I used jmrtd library (BAC protocol, and I successfully read all what I want Data Group {1,2,11,12})

  • for Driver License, after reading some standards I supposed to do BAP instead-of BAC So I implemented a DLicenseService class the same as PassportService but with some minor changes:

    • changed EF_COM to 001F and AID to A0000002480200 (witch worked in the first tries) ...
    • I'm doing BAC as BAP with a custom key derivation algorithm the triplet (docNumber, dateOfBirth, dateOfExpiry) did not work...

My questions are:

  • Is there any protection against a wrong key derivation multiple attempts (assuming BAP == BAC) because the scuba service now is failing!!...please don't tell me there is and my card is blocked...
  • Are BAP and BAC equivalent? should I try other protocol?
  • Do you know the most used key seed derivation algorithm for Driver License (like SHA1 of last 6 doc digits...)
  • Is there a library to deal with Driver License like jmrtd for travel document?
like image 339
Imla Assuom Avatar asked Sep 05 '25 03:09

Imla Assuom


1 Answers

  • Yes, BAC and BAP are equivalent
  • The triplet worked for Driver licence
  • I implemented all my logic on top of jmrtd code and every think worked fine, basically I implemented :
    • DLicenseService class
    • COMFile and all DGxFile that I'm interested in taking into account the correct SFI and Tags values from the iso/IEC FCD 18013-2 standard.
like image 115
Imla Assuom Avatar answered Sep 07 '25 21:09

Imla Assuom