Based in BengaluruPassport Reader.
A mobile app that checks whether a passport's chip was issued by its country and hasn't been altered.


A passport check that happens entirely on the phone.
Scan the photo page with the camera, hold the passport to the phone, and in a few seconds the app reads the chip over NFC and verifies the issuing country's digital signature, entirely on the device.
Built as a web app inside a native NFC shell for Android, with a browser demo that runs against a simulated chip. It works end to end and has been verified with a real passport on a Samsung Galaxy S20 FE.



Scan, unlock, read, validate, check for clones, show the verdict.
The camera reads the machine-readable zone with on-device OCR, and check digits catch and correct OCR mistakes, so a scan is either right or rejected. The passport number and two dates form the access key, so the chip only talks to a reader that has the passport open in front of it.
Personal details, the photo and the chip's security record arrive over an encrypted, authenticated channel. The signature is traced back to the issuing country's root certificate, and every file read is hashed and compared with the signed values.







The full ICAO 9303 protocol, written from scratch.
- BAC key derivation, 3DES secure messaging with ISO 9797-1 retail MAC, chunked and extended-offset reads, and file parsing, matching the ICAO worked examples byte for byte.
- RSA (PKCS #1 v1.5 and PSS) and ECDSA on NIST and Brainpool curves, including explicit curve parameters that browsers' WebCrypto can't handle. Written with BigInt.
- Chip Authentication from the DG14 key (ECDH or DH, then secure messaging re-keyed to 3DES or AES-CMAC) and Active Authentication from the DG15 key (RSA ISO 9796-2 or ECDSA challenge signature). A cloned chip has identical data and passes every other check; only this catches it.
- Ships the German CSCA Master List: 609 root certificates from 117 countries, its own signature verified against the fingerprint BSI publishes.
- OCR output is cleaned up and every field the chip key needs must pass its check digit. A reading is accepted only after two frames agree.
- No internet permission, OCR on the device, nothing stored. A privacy mode swaps personal details for placeholders before they are drawn.
Working around what the browser can't do.
The browser can't reach a passport: Chrome's Web NFC only reads NDEF tags, while passports are smart cards that need raw ISO 7816 commands. The fix was a hybrid in which every protocol step stays in the web app and a small native shell only moves bytes.
WebCrypto has no 3DES, no SHA-224, no Brainpool curves and no explicit curve parameters, all of which real passports use, so these were implemented directly, with curve constants generated from OpenSSL's definitions.
OCR is noisy but keys must be exact. Ambiguous characters are resolved by trying alternatives against the check digits, and a repair is only accepted when the overall check digit also agrees. A dependency that quietly added internet permission was removed explicitly to keep the privacy promise.
- ICAO 9303 · BAC · secure messaging
- RSA · ECDSA · ECDH · DH in BigInt
- ~3,700 lines protocol · ~1,600 UI
frames in, text lines out
- NFC reader mode + IsoDep
- ML Kit OCR, bundled offline
- No internet permission
Deep navy, glass, and a passport that opens like a book.
The signature element is the passport cover. It uses the issuing country's real cover colour, with its national emblem rendered as a single-colour gold foil mask with a moving sheen, and it opens like a book into the data page.
Motion is purposeful: staggered entrances, numbers that roll into place, a scan line that locks on to the MRZ and view transitions between screens. All of it switches off under reduced-motion settings.





Checked against the spec, OpenSSL and real passports.
- Key derivation, mutual authentication and secure messaging reproduce ICAO 9303 Part 11 Appendix D exactly, down to every byte sent to the chip.
- Hashes, 3DES and MAC compared with OpenSSL; certificate chains and signatures generated by OpenSSL for every supported algorithm, then verified by the app.
- All 609 certificates in the German Master List checked: 597 verify and OpenSSL agrees on the other 12. In 2,500 tamper tests, no altered certificate was accepted.
- Chip and Active Authentication tested against simulated chips with OpenSSL-generated keys across curves and ciphers. Cloned chips are caught every time.
- Wrong passport details, a forged signature, an impostor root with the same name, a tampered data group, a corrupted radio response, oversized and missing files.
- Camera scan, chip read and signature validation of a real passport on a Galaxy S20 FE.




Technology / stack
- JavaScript · HTML · CSS · ES modules · No frameworks or runtime dependencies
- Android · Java · Gradle · Google ML Kit · WebView · NFC reader mode and IsoDep · Offline text recognition
- JavaScript interface with async callbacks · Raw APDUs in, responses out · Camera frames in, text lines out · getUserMedia with torch control
- 3DES, AES and AES-CMAC · ISO 9797-1 MAC · SHA-1/224/256 in JavaScript · SHA-384/512 via WebCrypto · RSA, ISO 9796-2, ECDSA, ECDH and DH in BigInt
- ICAO Doc 9303 · ISO/IEC 7816-4 · ISO/IEC 14443-4 · CMS (RFC 5652) · X.509 (RFC 5280) · RFC 8017 · RFC 5639 · BSI TR-03111
- View Transitions API · CSS foil masks · Glass with backdrop-filter · Haptics · Reduced motion · Light and dark themes
- Node.js · OpenSSL · Google Chrome · node:test with 66 tests · Headless screenshots over the DevTools protocol
What it doesn't do yet.
- PACE, the newer unlock protocol some recent passports require, isn't supported.
- No revocation lists are consulted and JPEG 2000 photos aren't displayed.
- Android only for now; an iOS version would need a Core NFC shell implementing the same bridge.
Small, tested and self-contained.
About 3,700 lines of protocol and crypto code, 1,600 lines of UI code and 2,400 lines of CSS
A 420-line Android shell
66 automated tests
117 countries in the trust list, 17 country covers with emblems
A 25 MB APK, mostly the offline OCR model
Sources and attributions.
- German CSCA Master List, published by BSI (Federal Office for Information Security, Germany).
- Wikimedia Commons, converted to single-colour masks. UK, France, Canada, Singapore and the Netherlands are CC BY-SA; the rest are public domain.
- Specimen passport data from ICAO Doc 9303.


