Online Store

ePassport Reading Software – Machine Readable Travel Documents (MRTD) 

Machine Readable Travel Documents (MRTD) Source Code Software 

ePassport reading is now supported by all µFR Series NFC Readers. This feature was introduced with the release of µFCoder library version 5.0.12.

All our µFR Series NFC readers now support reading data groups from NFC chips embedded in Machine Readable Travel Documents (MRTDs), including ePassports which comply with ICAO specifications.

The implementation supports the Basic Access Control (short: BAC) mechanism for NFC chip access. BAC enables authentication and secure cryptographic communication channel with an NFC tag embedded in the MRTD. BAC is based purely on symmetric cryptography using the 3DES algorithm and it is implemented according to ICAO 9303, part 11. ICAO stands for International Civil Aviation Organization (https://www.icao.int). ICAO 9303 specification standardizes MRTDs, including ePassports.

epassport reading software and nfc rfid reader

NOTICE:

  • The MRTDs Basic Access Control is supported by the uFCoder library starting with version 5.0.12.
  • MRTD software IS NOT compatible with µFR NFC RFID devices with RF Booster upgrade.

Docs & Software Download

ePassport reading software SDK example

ePassport MRTD SDK example download link.

Software demonstration

Download the project and start the binary executable from the appropriate folder:
for a 32-bit Windows start the win32_releaserun_me.cmd
for a 64-bit Windows start the win64_releaserun_me.cmd
for a 32-bit Linux start linux32_release/ePassport_mrtd
for a 64-bit Linux start linux64_release/ePassport_mrtd

ePassport reading software example requires a µFR reader device to be attached and configured to the PC. No other application or service using µFR reader should be running on the computer. After the successful start of the “ePassport MRTD Example”, you will get a screen as shown below.

ePassport reading MRTD NFC

 

Now, you should choose one of the ‘M’ or ‘P’ options as stated in the application usage instructions on the screen.
If you choose M’ option, you will be prompted with the text:

You have chosen to enter the subjacent MRZ row located under the
‘P<XXXSURNAME<<FIRSTNAME<<<<<<<<<<<<<<<<<<<<<‘:

Enter subjacent MRZ row. Subjacent MRZ rows have to be 44 characters long.

An example of the subjacent MRZ can be seen in the photo below.

epassport reading MRZ

Otherwise, if you chose the ‘P’ option you will be prompted with the text:
You have chosen to enter the doc. number, date of birth, and date of expiry separately:

Enter the document number. The document number should be 9 characters long.
_________ …
Enter the date of birth. The date format has to be YYMMDD.
______ …
Enter the date of the expiry. The date format has to be YYMMDD.
______ …

After you have entered the valid data, the application will inform you with a message:
MRZ proto-key is set successfully.
——————————————————————-

After this message, you can continue with reading operations on the NFC tag embedded in the ePassport.

Now you can put the ePassport in the µFR reader field. On successful communication, you will get basic information about The NFC tag in the reader field. For example:
——————————————————————-
Tag type: DL_GENERIC_ISO14443_4, sak = 0x??, uid[4] = ??:??:??:??
——————————————————————-

SAK and UID in this example are masked and they can have any arbitrary value. ePassports will always be recognized like the DL_GENERIC_ISO14443_4 tag type.

Now you can choose application reading options:

‘C’ – this option reads common data (EF.COM elementary file) from the ePassport. After a successful reading, data is parsed and displayed in the following format:
EF.COM has been successfully read. The file length is ?? bytes
Raw data: 60 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx …
Parsing the EF.COM raw data:
LDS version is 01.07
UNICODE version is 04.00.00
Existing data groups list:
Found: EF.DG1
Found: EF.DG2
Found: EF.DG3
Found: EF.DG14

——————————————————————-

Raw data in this example is masked (xx xx xx…) for security purposes. When you read your own document, you will get its actual raw data here. You can read more about the LDS version and UNICODE version in the ICAO 9303, part 10 document.
LDS and UNICODE versions are followed by the data groups list that ePassport contains. Only DG1 and DG2 are mandatory. All the other data groups can be either present or not in the particular MRTD.

‘S’ – this option reads the document security object (EF.SOD elementary file) and saves it to the binary file which path and name you have to enter when you are prompted. Document security object contains a digital signature in the standard PKCS#7 CMS format. Presence of the EF.SOD on the MRTD is mandatory.

‘1’ – This option reads the EF.DG1, parse it, and displays raw and parsed data in the following format:
EF.DG1 has been successfully read. The file length is ?? bytes
Raw data:
61 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx …
Simple parsing of the EF.DG1 raw data:
Document code: P (ePassport)
Issuing State or organization: ???
Name of the holder: SURNAME FIRST_NAME
Document number: ?????????
Nationality: ???
Date of birth (dd.MM.yyyy.): ??.??.????.
Sex: ????
Date of expiry (dd.MM.yyyy.): ??.??.????.
Optional data: ??????????????
——————————————————————-

Raw data in this example is masked (xx xx xx…) for security purposes. When you read your own document, you will get its actual raw data here.

‘2’ – This option reads the EF.DG2 and saves it to the binary file which path and name you have to enter when you are prompted. EF.DG2 contains a document holder’s facial image and it is mandatory. EF.DG2 besides facial images could contain biometric facial features too. More about EF.DG2 content you can read in the ICAO 9303, part 10 document.

‘I’ – this option reads the EF.DG2 too. In this case, only the facial image is extracted from the MRTD file and saved to the file which the path and name you have entered. The image format is automatically detected and the file extension is set according to it. There are two possible image file formats defined for this context: JPEG or JP2 (i.e. jpeg 2000).

‘D’ – this option reads any of the elementary data group (EF.DG) files from the MRTD and saves it to the binary file which path and name you have to enter when prompted. After this option is chosen you will be prompted for EF.DG index. The index can be from the range of 1 to 16 (e.g. 1 for EF.DG1 and 14 for EF.DG14). The elementary file you wanted to read must be listed in the EF.COM data groups list.

The current version of the “ePassport MRTD Example” is 1.0 and depends on the uFCoder library version 5.0.12 and uFR firmware version 5.0.22.

Additional links

To browse or download other software examples visit our Gitlab Software repository.
For purchasing our devices, visit our official online store.
Feel free to contact our technical support if you have any questions about our software examples.

Print Friendly, PDF & Email