Inspiration
Anyone can text you as "T-Mobile." SMS has no sender authentication, nothing like DKIM or SPF for email, so a spoofed "your account is suspended" text can land in the same thread as the real ones. People learn to distrust everything, including the genuine fraud alerts and one-time codes that businesses need them to act on. To our knowledge, nothing neutral works across phones and gives the person holding the phone proof of who sent a text.
We wanted the opposite of a scam-detection model: no guessing, no scoring message content. Just proof. TrustMobile (called VeriText in our repo) is a neutral registry that businesses and phones can both rely on, and the algorithm behind it is deliberately simple:
- Register once. A business proves who it is, and its sender number goes into the registry.
- Stamp each message. For every text, the registry issues a short code tied to a fingerprint (a hash) of that exact message.
- Check on arrival. The phone recomputes the fingerprint and asks the registry whether the code matches. A match means the text really came from that business and wasn't altered.
No match means no proof, and a text that claims to be a registered business without proof gets flagged. One hash comparison per message makes it fast, cheap and easy to audit.
What it does
TrustMobile is a verification layer for business SMS.
- A business applies to the registry with its name, domain and sender number. An operator reviews and approves it.
- To send a verified text, the business asks the registry for a short-lived token bound to that exact message. The token rides along as a trailing
vt:XXXXXXXXmarker over ordinary SMS, with no special channel. - The customer's phone checks the text with the registry and shows one of three verdicts:
| Verdict | When |
|---|---|
| ✓ Verified | Text comes from a registered sender number (in strict mode, it must also carry a valid token for this exact text) |
| ⚠ Suspicious | Claims to be a registered business, but the token is missing, expired, tampered with, or replayed from another number, or the business was revoked |
| Unknown | Nothing to do with the registry. We never cry scam about senders we know nothing about |
Customers get a verified inbox in our Android app: a blue check and business name for real senders, a red warning for imitators, and notifications for both. The same app has a demo business mode that applies for verification, sends verified texts, and plays the scammer with two buttons: a spoofed text with no code, and a real code reused on a phishing message. An operator dashboard approves, rejects and revokes businesses and shows verifications and flagged reasons live.
How we built it
Registry on SpacetimeDB. All state lives in one SpacetimeDB database: businesses, their sender numbers, tokens and the activity log. Every table is private, and the business rules run as TypeScript reducers inside the database, transactionally, so no client can bypass them. Applying rejects a name or number already owned by an approved business, approval re-checks number ownership, and every reducer is admin-only. A zero-dependency Node API on Vercel holds the owner token and talks to SpacetimeDB over plain HTTP (reducer calls to write, SQL to read), so phones and the dashboard never touch the database directly. Endpoints cover applying, admin approve/reject/revoke, token issuing (per-business API key), /verify, and a public /directory of registered numbers, with rate limits and payload caps. An in-memory store with the same interface powers our unit tests.
Tokens. An 8-character Crockford base32 code (no I, L, O or U, so it's unambiguous on screen). The server stores it with the business, an expiry (default one hour) and SHA-256(canonicalize(body)). Binding to the content means a real code reused on a different message fails, while replaying the identical message is harmless.
Canonicalization. The server canonicalizes on both issue and verify: Unicode NFKC, smart quotes and dashes to ASCII, whitespace collapsed. Clients never have to port that logic.
Android app. Kotlin and Jetpack Compose (Material 3), minSdk 26. A BroadcastReceiver on SMS_RECEIVED checks each incoming text, the inbox is read with READ_SMS, and results are cached. Privacy is built in: a message is only sent to the registry if it carries a token or comes from a number in the public directory. Everything else stays on the phone. The inbox also has a Blocked list, a red live counter of scams and strangers caught, a rule that lets saved contacts through, and optional notification access so it can see RCS senders too.
Operator dashboard. A web console for approving and revoking businesses, live traffic charts, a live activity feed, a chart of why messages were flagged, and a "verify this number" tool.
Tests. 14 node:test tests cover carrier mangling, spoofing, tampering, replay from another number, revocation, impersonation attempts and the directory.
Challenges we ran into
- SMS rewrites your text. Carriers and phones swap smart quotes, trim whitespace and re-encode characters, which breaks a naive hash. We canonicalize server-side and simulate carrier mangling in our tests. Measuring real carrier match rates is next.
- The iPhone is a locked door. Apps can't read or intercept texts on iOS. The only hook is a Message Filter extension that can send unknown senders to Junk but can't show a badge. We built Android first and designed the iOS side.
- RCS and blocking. RCS chats never land in Android's SMS database, so an SMS-only app can't see them, and a non-default SMS app can't hide or delete another app's texts. We added notification access to catch RCS senders, and the app flags and warns instead of truly blocking.
- Android permissions. Google Play restricts SMS permissions to a short list of use cases, so our build is a sideloaded APK. The app explains exactly what it reads and what leaves the phone.
- Not crying wolf. "No token means scam" only holds for senders that claim a registered identity. Applied to every text, it would flag every legitimate sender who hasn't joined. If the registry can't be reached, the app shows no verdict instead of a false warning.
- The registry is the whole product. A badge handed to a fraudster is a weapon. Applications are reviewed, a name or number already owned by an approved business is rejected, and revoking a business flips its texts to suspicious. A manual approve button stands in for real KYC.
- Every character counts. The token is ASCII-only. An emoji checkmark would push the message into UCS-2 encoding and roughly halve what fits in one SMS segment.
Accomplishments that we're proud of
- A complete verification loop over ordinary SMS: business, registry, SMS, customer phone, verdict.
- A demo that makes the attack visible. One tap sends the scammer's version, and the customer's phone flags it.
- Privacy by design: the phone only asks the registry about texts that could be relevant.
- A hosted registry, operator dashboard and Android app in a single weekend, verified end to end on real phones, with tests behind the core rules.
- Business rules that live inside the database as SpacetimeDB reducers, so they can't be bypassed from the client.
What we learned
- The cryptography is the easy part. The hard part is trust: who gets to register, how fast a bad actor is revoked, and who shows the result on the phone.
- The platforms decide the design. iOS only allows a negative signal (junk the fakes), while Android allows a full verified inbox.
- Networks start narrow. Visa seeded cards and merchants in one city. We'd start with one vertical and one partner too.
- Fewer false alarms beat more detections. A warning people stop believing is worse than no warning.
What's next for TrustMobile
- iPhone: a Message Filter extension that sends texts imitating a registered sender to Junk.
- Carriers: verify at the network edge, the way STIR/SHAKEN does for calls, so customers need no app.
- Real business verification: domain and phone proof of control plus an abuse process, replacing our manual approve button.
- Offline signed tokens (Ed25519), so verification needs no per-message server call and the registry sees less.
- Recipient binding on Android, to stop a real message being forwarded to a different victim.
- Live dashboard: move it from polling every two seconds to SpacetimeDB subscriptions, so updates are pushed instantly.
- Measure and pilot: test body-hash match rates across carriers and phones, then pilot with one narrow use case such as security alerts or one campus.
TrustMobile is a hackathon project. T-Mobile appears only as an illustrative demo business, and we have no affiliation with or endorsement from T-Mobile.
Built With
- spacetime
- stuff
- vercel
