FAILURE MAP
← Case archive

FA-72625 / Check-digit algorithms / Member archive

MRZ composite check omits the field check digits · case 05

The composite (final) check digit fails on valid passports.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Machine-readable passport (TD3) second line, 44 characters of 0-9, A-Z and the filler "<" (else "malformed"). Check digits use weights 7,3,1 restarting per field, "<" = 0, A-Z = 10-35: document number [0:9] check [9]; birth date [13:19] check [19]; expiry [21:27] check [27]; optional data [28:42] check [42] (a "<" check is allowed only when the optional field is entirely filler); composite check [43] over [0:10]+[13:20]+[21:43]. Return five booleans.

Why this case matters

Border-control kiosks verify MRZ check digits to catch OCR misreads before a database query.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression ["AB1234<<<1UTO8501019F3001019<<<<<<<<<<<<<<<0"][true, true, true, true, false][true, true, true, true, true]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗