ePassport Viewer Guide: Inspecting MRZ, Chip Data, and Biometrics

ePassport Viewer: How to Read and Verify Electronic PassportsElectronic passports (ePassports) add a digital layer to traditional travel documents by embedding a contactless chip that stores the passport holder’s personal data and biometric information. An ePassport viewer is a tool — software or hardware — used to read, display, and verify the data held on that chip. This article explains how ePassports work, what an ePassport viewer does, legal and security considerations, practical steps to read and verify an ePassport, and best practices for developers and operators building or using viewers.


1. What is an ePassport?

An ePassport is a passport that contains an embedded integrated circuit (IC) chip compliant with ICAO (International Civil Aviation Organization) Doc 9303 standards. The chip stores:

  • Biographic data (name, date of birth, passport number, nationality)
  • Machine Readable Zone (MRZ) data used for basic access control
  • Facial biometric (a digital image of the passport photo)
  • Optionally, additional biometrics like fingerprints or iris data
  • Security data (digital signatures, certificates) enabling tamper-detection

The MRZ printed on the passport’s data page provides a compact, standardized text representation of key biographic fields and is central to secure access to the chip.


2. Core components of an ePassport viewer

An ePassport viewer typically offers these functions:

  • Read MRZ from a scanned image or manual input.
  • Establish contactless communication with the chip via NFC or a smartcard reader.
  • Perform Basic Access Control (BAC) or Password Authenticated Connection Establishment (PACE) to open a secure channel with the chip.
  • Retrieve data groups (DGs) stored on the chip (DG1: MRZ-related data, DG2: facial image, DG3: fingerprints, etc.).
  • Verify the chip’s data integrity and authenticity using Passive Authentication (PA) and Active Authentication (AA) where applicable.
  • Display and export the retrieved data in readable formats.
  • Log reader events and verification results for audit and compliance.

3. Security models and access control

Access to the chip’s data is controlled to prevent unauthorized reading or cloning. Key mechanisms:

  • Basic Access Control (BAC): Uses a key derived from MRZ data to establish an encrypted channel. It provides confidentiality and basic protection but relies on MRZ entropy, which is relatively low.
  • Password Authenticated Connection Establishment (PACE): A stronger protocol than BAC that resists eavesdropping and skimming by using stronger cryptographic key derivation and, optionally, a user-provided PIN.
  • Extended Access Control (EAC): Used when sensitive biometrics (fingerprints, iris) are present. EAC requires the reader to present valid certificates issued by the passport-issuing authority and often includes Terminal Authentication (TA) and Chip Authentication (CA).
  • Passive Authentication (PA): Cryptographic verification of data groups using digital signatures from the issuing authority’s Document Signer certificate and validated via a chain to a trusted Country Signing Certificate Authority (CSCA).
  • Active Authentication (AA) / Chip Authentication (CA): Protects against cloning by proving the chip holds a private key corresponding to a public key in the data, usually via a challenge-response protocol. CA is the modern replacement for AA and also helps secure the communication channel.

4. How to read an ePassport: step-by-step (operator perspective)

  1. Gather required equipment:

    • NFC-enabled device (smartphone with NFC) or a contactless smartcard reader.
    • ePassport viewer application that supports ICAO ePassport protocols (BAC, PACE, EAC).
    • Internet access for certificate validation (optional but recommended).
  2. Capture MRZ:

    • Scan or manually enter the MRZ from the passport data page. Many viewers include OCR to extract MRZ automatically from a photo.
    • The MRZ provides the data needed to derive access keys (passport number, date of birth, expiration date).
  3. Establish secure channel:

    • Use MRZ-derived key for BAC or run PACE if supported by the passport and reader. The viewer should display the chosen method and its success/failure.
  4. Read data groups:

    • Request DG1 (biographic data) to confirm MRZ data matches chip data.
    • Request DG2 (facial image) and display it side-by-side with the printed photo for visual verification.
    • If available and authorized, read DG3/DG4 etc. for fingerprints/iris.
  5. Verify authenticity:

    • Run Passive Authentication (PA): fetch the Document Security Object (SOD) from the chip and verify digital signatures against a CSCA certificate store. The application should report signature validity and certificate chain status.
    • Run Chip Authentication (CA) or Active Authentication (AA) if supported to ensure the chip is not a clone.
  6. Present results:

    • Show clear indicators for each verification step: MRZ match, PA status, CA/AA status, and whether sensitive biometrics were accessed lawfully.
  7. Log and store:

    • Record verification outcomes and timestamps. Comply with data protection rules — only store what is allowed and encrypted if retention is required.

5. What the viewer should display to a human operator

  • MRZ vs. DG1 comparison (match/mismatch)
  • Face image from chip vs. printed portrait (visual match)
  • Passive Authentication result (valid/invalid)
  • Chip Authentication / Active Authentication result (confirmed/not confirmed)
  • Access method used (BAC/PACE/EAC) and its success/failure
  • Data groups read and whether reading sensitive DGs required additional authorization
  • Warnings for anomalies (expired passport, revoked certificate, signature chain issues)

6. Developer notes: protocols, data groups, and sample flow

  • Relevant ICAO documents: Doc 9303 parts on LDS (Logical Data Structure), PKI, and MRTD (Machine Readable Travel Documents).
  • Common Data Groups:
    • DG1 — MRZ data (biographic data)
    • DG2 — Encoded face image
    • DG3 — Fingerprints
    • DG4 — Iris
    • SOD — Document Security Object (contains hash/digital signatures)
  • Typical message flow (simplified):
    1. Read MRZ
    2. Establish BAC/PACE
    3. Select eMRTD application and read EF.COM to find available DGs
    4. Read DGs and SOD
    5. Validate SOD signatures against CSCA/DSC chain
    6. Run CA/AA challenge if available

Example code snippets are commonly available in libraries such as OpenCV (for MRZ OCR), libp11, OpenSC, and passport-specific libraries (Java: JMRTD, C/C++: OpenICL). Always follow licensing and security best practices.


  • Access to chip data must comply with local laws and international agreements. Some jurisdictions restrict biometric reading to authorized border control or law enforcement.
  • Limit data retention: store only what’s necessary and for the permitted duration. Encrypt stored data and apply access controls.
  • Obtain consent where required. While border officials may have legal authority, private operators (hotels, banks) typically require explicit consent.
  • Protect certificate stores and private keys. Mismanagement can enable unauthorized access or impersonation.

8. Common pitfalls and troubleshooting

  • Failed BAC/PACE: often due to OCR errors in MRZ capture. Re-scan MRZ or enter manually.
  • Invalid SOD signature: could mean outdated CSCA certificates in the viewer’s trust store — update trust lists regularly.
  • NFC hardware incompatibility: ensure reader supports ISO/IEC 14443 and specific chip types.
  • Missing CA/AA support: not all passports implement CA/AA; absence is not necessarily a sign of tampering.
  • Privacy risks: careless logging or screenshots can leak sensitive biometrics.

9. Best practices for operators

  • Use PACE-capable readers where possible; PACE is more secure than BAC.
  • Keep trust lists (CSCA/DSC) updated — ideally via secure, automated updates from trusted authorities.
  • Train staff to perform and interpret visual face comparisons; biometric algorithms assist but human judgement is still important for final verification.
  • Implement clear audit trails and role-based access to the viewer and logs.
  • Regularly test readers and software against known reference passports to ensure interoperability.

10. Conclusion

An ePassport viewer is a key tool for modern identity verification at borders and in secure environments. Proper implementation combines hardware capable of NFC/smartcard interactions, software that follows ICAO protocols (BAC, PACE, EAC, PA, CA), and operational policies that protect privacy and comply with law. When used correctly, ePassport viewers make travel more secure by cryptographically tying a person’s biometric to a government‑issued document.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *