Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Differential Testing Revealed What Conformance Testing Missed: A Case Study with Open-Source eMRTD Libraries

Description and use

Differential testing of gmrtd (Go) and JMRTD (Java) revealed that both libraries silently fall back from PACE to BAC after a negotiation failure, creating a risk that applications accept downgraded sessions without notice.

Problem

Conformance testing only checks if a library passes its own tests, failing to show whether two independent implementations make the same security decision when presented with identical protocol traffic such as an eMRTD access control protocol downgrade.

Outcome

Both independent libraries successfully completed BAC authentication after a PACE failure returned 6FFF, but neither surfaced the protocol downgrade explicitly enough to prevent a naive application from assuming a standard secure session.

Workflow

  • Define a controlled synthetic protocol profile (pace-then-bac-downgrade) using JSON without physical silicon or NFC readers.
  • Inject a failure code (6FFF) on the first PACE APDU command while keeping BAC functional.
  • Execute the negotiation path against gmrtd in Go and JMRTD in Java using identical byte streams.
  • Capture run metadata, APDU traces, return values, and session error fields into JSON trace files.
  • Evaluate whether a naive application wrapper can catch or ignore the protocol fallback.

Evidence

PACE failed during the initial negotiation. BAC then completed successfully. For an application that merely checks whether a secure session exists, there was no explicit indication that a protocol fallback had occurred.

Source

  • Record date: 2026-09-08T21:15:30.678Z