Kinegram eMRTD

Read and verify an eMRTD (electronic machine readable travel document) in accordance to ICAO Doc 9303.

The eMRTD SDK is able to read the data (like MRZ info or photo of face) and verify the authenticity and integrity of the data.

If the eMRTD supports the required protocols, the SDK will additionally be able to verify that the chip was not cloned.

Requirements

ℹ️ You must provide either the card access number (CAN) or the document number, the date of birth and the date of expiry to access the eMRTD. Refer to ICAO Doc 9303 Part 4.

ℹ️️ You must provide a CSCA Master List to verify the eMRTD. Refer to ICAO Doc 9303 Part 12.

💡 The german Federal Office for Information Security (BSI) publishes an extensive and up to date CSCA Master List regularly.

Usage Example

1️⃣ Acquire an IsoDep from Android. Refer to the NFC basics Guide from Google on how to configure your app and allow your Activity to receive the ACTION_TECH_DISCOVERED intent.

2️⃣ Access the eMRTD using EmrtdReader as shown below.

val isoDep: IsoDep // IsoDep acquired from Android

// Access Key values from the MRZ
val documentNumber = "123456789"
val dateOfBirth = "970101" // yyMMDD
val dateOfExpiry = "221212" // yyMMDD

// Master List containing Country Certificates from a trusted source.
val masterListFileInputStream: InputStream = assets.open("csca-2026-06-24-04-00-12.ml")

// Initialize EmrtdReader
val emrtdReader = EmrtdReader()
emrtdReader.readMasterList(masterListFileInputStream)

try {
// Access chip using the MRZ Info and get results
val emrtdResult = emrtdReader.readAndVerify(isoDep, documentNumber, dateOfBirth, dateOfExpiry)
// OR access the chip using the 6 digit CAN
// val emrtdResult = emrtdReader.readAndVerify(isoDep, "132456")

// MRZ Info from mandatory DataGroup 1
val mrzInfo: MRZInfo = emrtdResult.dg1File.mrzInfo
// Photo of the face from mandatory DataGroup 2
val facePhotoBitmap: Bitmap = emrtdResult.facePhotoBitmap
// Integrity and Authenticity of the read DataGroups
val passiveAuthenticationSummary: Boolean = emrtdResult.passiveAuthenticationResult.evaluate()

// Active Authentication Result { SUCCESS, FAILED, UNAVAILABLE }
val activeAuthenticationResult: CheckResult = emrtdResult.activeAuthenticationResult
// Chip Authentication Result { SUCCESS, FAILED, UNAVAILABLE }
val chipAuthenticationResult: CheckResult = emrtdResult.chipAuthenticationResult
} catch (e: TagLostException) {
TODO("Connection to NFC Tag lost. Please hold the phone and the document steady and try again.")
} catch (e: AccessControlProtocolException) {
TODO("Verify the Access Key data (CAN or MRZ Info)")
} catch (e: EmrtdReaderException) {
TODO("EMRTD Reader exception. Please try again.")
}

Packages

Link copied to clipboard

This package enables your Android app to access the eMRTD in accordance to icao9303.