All one hundred eight build stories
Saifullah Ahad / Build Story
How to compare two lists for matches without trading whole files
When you need to compare two lists for matches across two separate organizations, plain exact text checks miss spelling variations while handing over a full spreadsheet exposes everyone who only appears on one roster.
Your list stays local
Names, areas, and household counts remain encrypted on your own phone.
Shared overlap only
Both sides learn only the families present in both registers and a signed count.
Their list stays hidden
Unmatched rows from the partner organization never cross over in readable form.
How to Check Two Lists for Matches When Spellings Differ
Two groups serving the same streets often keep separate lists of households or clients without a shared ID number. One volunteer writes Dr. Rahim Uddin, another writes Raheem Udeen, or one sheet names the husband first while another names the wife. In its Data Cleaning and Record Linkage guide (updated July 1, 2005), the Australian National University Febrl project explains why raw exports rarely line up on a direct text check.
"Often, data is recorded or captured in various formats, and data items may be missing or contain errors."
Australian National University, Febrl Documentation, July 1, 2005
The same Australian National University guide emphasizes that preparation comes before matching: "A pre-processing phase that aims to clean and standardise the data is therefore an essential first step in every linkage process." Before you compare two lists for duplicates across organizations, each team also needs to clean repeat rows inside its own sheet first. As the Febrl documentation states: "Data sets may also contain duplicate entries, in which case linkage may need to be applied within a data set to de-duplicate it before linkage with other files is attempted."
Once names and areas are standardized, two sensitive rosters still carry risk if either team emails its full file to the other. The National Institute of Standards and Technology (NIST) describes how cryptographic intersection solves that problem in its Private Set Intersection overview (created January 3, 2017; updated October 26, 2026).
"Private Set Intersection (PSI) enables two (or more) parties, each with a private set, to identify which are the common elements across the sets, while not revealing information about the non-common elements."
National Institute of Standards and Technology (NIST), CSRC, updated October 26, 2026
In short: "PSI allows two parties to compute the intersection of their sets, without disclosing the non-intersecting elements." Whether you check two spreadsheets by hand or use a set-matching tool, five steps keep matches accurate and non-matches protected:
- Deduplicate your own list first Remove identical or near-duplicate rows inside your own register so repeat entries do not skew counts or overlap totals.
- Split records into fixed, coarse fields Keep names, neighborhood or village, and household size band in separate columns instead of one long address string. Avoid street numbers when comparing across teams that record directions differently.
- Normalize format, titles, and spelling variations Remove honorifics such as Mr, Mrs, or Dr, fold accents and punctuation, sort multi-word names and area labels alphabetically, and collapse vowel and similar-consonant differences. The Febrl guide notes: "The main task of data standardisation in record linkage is the resolution of inconsistencies in the way information is represented or encoded in the data."
- Require agreement across more than one field and review matches Never treat a single first name as enough to link two records. Pair a person key with a coarse area and household size band, then check borderline matches by hand. Explaining clerical review of possible links, the Febrl guide notes: "In theory, the person undertaking this clerical review has access to additional data (or may be able to seek it out) which enables them to resolve the linkage status."
- Keep unmatched rows private Where lists contain vulnerable households, never send plain lists or unsalted name hashes, because a small neighborhood directory can be guessed on another computer. Use a blinded intersection or agreed review rule so non-matching rows stay undisclosed.
Worked Example: Why Some Household Pairs Match and Others Do Not
To make those matching rules concrete, suppose Organization A (holding 48 unique households) and Organization B (holding 45 unique households) check five example entries using Sutampa's normalization rules. Every entry stores four items: head name, another household member, coarse area, and size band (1 to 2, 3 to 4, 5 to 6, or 7 or more people). Both lists strip titles like Dr., remove accents and punctuation, drop vowels inside words after the first letter, fold close consonants, sort words alphabetically, and generate two keys per family: one anchored on each named person alongside the normalized area and size band.
| Case | Org A entry | Org B entry | Outcome |
|---|---|---|---|
| Spelling | Dr. Rahim Uddin + Salim Karim, North Sector 07, 3 to 4 people | Raheem Udeen + Saleem Kareem, sector 07 north, 3 to 4 people | Match Both phonetic keys and sorted area tokens match |
| Swapped | Aisha Rahman + Rina Karim, Ward 501, 3 to 4 people | Rina Karim + Aisha Rahman, Ward 501, 3 to 4 people | Match Both person keys are sorted regardless of column role |
| 1 adult | Tariq Hasan + Nadia Begum, East Canal, 5 to 6 people | Tariq Hasan + Farida Khatun, East Canal, 5 to 6 people | Match One person key matches with area and size band; staff review |
| Area | Tariq Hasan + Nadia Begum, East Canal, 5 to 6 people | Tariq Hasan + Nadia Begum, South Mill, 5 to 6 people | No match Same names alone fail without matching coarse area |
| Small | 12 unique households on phone | 45 unique households on phone | Refused Below the 40-household minimum per organization |
Notice the trade-off built into those rules: two teams do not need identical spellings or the same person listed as household head, yet matching on a name alone without the same neighborhood and size band produces no link. And when either side holds fewer than 40 unique entries, the protocol refuses to run so nobody can probe one family at a time.
How Sutampa Compares Aid Registers Without Pooling Them
I built Sutampa: Aid List Match so two local relief coordinators can find shared households on Android phones without uploading either register to a shared database. On first launch, a coordinator names the organization and taps Create local identity, which generates a device-bound signing key without creating any cloud account or login. The app never scores families, labels anyone suspicious, or recommends who should receive aid.
How a two-phone comparison runs
- Two transport choices: On the Compare screen (subtitle: "Both organizations confirm one run. Neither register becomes visible to the other."), coordinators can tap Host or Join under Together, on local Wi-Fi to connect directly over TCP port 37491 on a shared network or hotspot with no internet needed, or use Apart, through the relay with an 8-character session code and 12-character invite secret.
- Pairing code check: Both phones derive a 6-digit pairing code from their ephemeral key exchange and display Check both phones ("Continue only when this code is identical on both screens."). Both coordinators must tap Codes match before encrypted intents and blinded household keys flow.
- Padded blinded intersection: Each side pads its real derived keys up to 6,000 slots (3,000 households at two keys each) with random dummy tokens and runs a reciprocal P-256 oblivious pseudorandom function exchange. On devices with 2.5 GB RAM or less, up to 4 CPU cores, or Android low-RAM mode, Sutampa processes the curve steps in smaller 96-point chunks instead of 256-point chunks.
- Same 14 frames even on refusal: Whether a run proceeds or fails the 40-household or 24-hour limit check, both sides exchange the same 14 fixed-size AES-256-GCM frames so frame sizes do not expose set sizes or results to the relay.
Registers are built in the Households tab ("Add, search, review, or import households for the next comparison."). Coordinators add families manually or pick a CSV file through Android's document picker without granting broad file storage permission. Before saving, Review import checks the columns ("Columns: head_name, other_member, coarse_area, size_band. Size values: 1-2, 3-4, 5-6, or 7+.") and reports valid and skipped rows. When a field reads Coarse area, a helper note reminds staff: "Use a neighbourhood or village, not a full address."
Results, safeguards, and local erasure
- Mutual signed outcome: A completed run shows Shared record signed (for example: "You both have 40 households. Nothing else was shown."), then opens What was shared ("These are the only households both organizations learned were shared."), displaying only that phone's own matching rows plus a mutual receipt recording both organization names, both list counts, the shared count, and partner fingerprint.
- Attempt floor and daily cap: Runs require at least 40 unique households per side ("At least 40 unique households are required per organization") and allow at most 4 attempts with the same partner fingerprint in any rolling 24-hour window across both allowed and refused attempts.
- Email report and blocking: Inside a completed run, Report this comparison prepares an email draft via the user's email app ("The email contains only the run ID and partner fingerprint. Household names are never attached."), and Block partner refuses future runs with that device fingerprint locally.
- Encrypted storage and deletion: All tables sit in an encrypted local database whose random key is wrapped by Android Keystore, with system backup turned off and screen capture blocked on release builds. Optional app lock offers biometrics or a separate 6 to 12 digit PIN, and Delete all Sutampa data wipes the database, wrapped key, lock settings, and signing identity.
Honest Limits and What Was Not Checked
Sutampa minimizes what leaves each phone, yet no protocol can eliminate every human or device-level risk once two teams choose to collaborate. Full storage and relay details are documented on the Sutampa data handling page and the separate child safety standards page.
Where the technical safeguards stop
- Confirmation happens on the code alone: Tapping Codes match confirms the 6-digit pairing transcript before partner organization names and list counts are exchanged inside the encrypted protocol; those counts appear afterward on the signed receipt rather than in a separate pre-run approval dialog.
- Residual probing and screen risks: A modified client can fill up to 3,000 slots with guessed households, reinstalling resets local 24-hour partner limits, colluding identities can split runs, and any coordinator can photograph their own matched screen.
- Spelling and cultural boundaries: Phonetic rules and transliteration reduce common vowel and title mismatches, yet unfamiliar transliterations can still miss a family or occasionally link unrelated names in the same neighborhood and size band, so human review remains essential.
- Relay rate limits and timing: The optional relay caps session creation at 20 per day per hashed IP bucket (kept up to 26 hours) and deletes session frames immediately after both sides read the receipt or within 24 hours, though a refused run skips heavy curve work and finishes faster than an allowed run.
- No eligibility decisions: Sutampa never decides aid eligibility, tracks distributions, or replaces organizational safeguarding. Also note a minor interface quirk: blocking a partner enforces refusals in the database, but reopening an old run detail view displays the toggle in its default unblocked label.
What was checked in tests and devices
- Automated unit suite: 23 debug and 23 release unit tests passed covering fuzzy key derivation, 40-household and 4-attempt policy rules, OPRF blinding, frame encryption, and binary codecs (2 optional benchmark/harness tests stay skipped unless enabled).
- Two-device and 2 GB scale runs: On September 19, 2026, the frozen release APK matched 40 shared rows out of 3,000 versus 3,000 fictional households with zero missed or unexpected rows over local Wi-Fi (Infinix Note 8 and Galaxy Tab S3), over an isolated phone hotspot with no internet (145.248 seconds including test-driver confirmation and polling), and between the phone and a 2,048 MB Android 11 emulator (68.834 seconds including confirmation and polling, 86,789 kB sampled peak PSS).
- Probe refusal and PIN checks: 21 small-set runs (1 one-row and 20 five-row attempts) between the two devices produced 4 minimum-size refusals and 17 rate-limit refusals retained across restart; app PIN lock, lock disable, data deletion, and Android 15 system-bar layout checks also passed.
- Relay dictionary-attack check: On October 2, 2026, four live relay comparisons (two with the signed release on the Infinix Note 8, two with the debug build on the Galaxy Tab S3) against a PC test client holding dictionaries of every real key (up to 118,992,000 keys) recovered 0 of 2,960 non-matching rows, while plain-hash and known-key controls recovered all 3,000; all relay sessions emptied within 0 to 3 seconds and the debug device dump held zero partner-only names or hashes.
What was not checked
- No live field trial with aid agencies: Every comparison used fictional test CSVs rather than real neighborhood registers compiled by independent relief organizations or multilingual volunteers.
- Narrow device sample: Physical tests ran only on one phone (Infinix Note 8) and one tablet (Galaxy Tab S3) plus emulators, and the 2 GB check paired a phone with an emulator rather than two physical 2 GB phones.
- Debug storage dump and relay server internals: Because non-root Android blocks reading a release app's private files, the at-rest storage scan inspected a debug build of the same source, and Cloudflare Durable Object storage was verified via external HTTP 404 deletion checks rather than reading server internals directly.
- Biometric prompt and external receipt export: Biometric app lock was not tested with an enrolled finger or face on hardware, and probe-refusal signatures were verified inside the app rather than exported to an independent signature checker.