Writing
Notes from the code, with actual code.
Short write-ups on decisions I made in Cipher, Lantern and Fathom, with the code that backs them up.
- 7
- posts
- 3
- projects covered
- 12
- minutes of reading
Latest
Newest post
15 October 2026 · 2 min read · Cipher
Dropping loan spam on Android without TensorFlow
How Cipher filters promotional SMS and OTPs before regex parsing using a pure-Kotlin multinomial logistic regression classifier, zero native C++ runtimes, and a sub-millisecond TF-IDF dot product.
Cipher
3 posts
Your bank texts, turned into a clean ledger. Nothing leaves your phone.
See the app- What happens when a bank SMS reaches CipherHow Cipher turns an incoming bank SMS into an encrypted ledger entry on Android: goAsync, a coroutine scope, a parser that returns null, and why the timestamp isn't the arrival time.2 min read
- Where Cipher's database key lives, and what happens when it disappearsHow Cipher protects its SQLCipher passphrase with the Android Keystore, migrates the old EncryptedSharedPreferences key, and refuses to silently replace a key it can't decrypt.2 min read
- Dropping loan spam on Android without TensorFlowHow Cipher filters promotional SMS and OTPs before regex parsing using a pure-Kotlin multinomial logistic regression classifier, zero native C++ runtimes, and a sub-millisecond TF-IDF dot product.2 min read
Lantern
3 posts
On-device DNS firewall and real-time network monitor.
See the app- Reading DNS off an Android VPN without routing your trafficHow Lantern uses VpnService to see DNS queries only: a single /32 route to a sentinel resolver, a hand-written packet parser with bounds checks, and local sinkholing with encrypted upstream transports.2 min read
- Matching 80,000+ threat domains with a reverse-label trieWhy Lantern stores its threat list in a trie keyed by domain labels from the right: lookups cost the length of the name, and a match on a domain covers all its subdomains.2 min read
- Which app asked? Attributing DNS queries to apps on AndroidHow Lantern maps a DNS query to the app that sent it using /proc/net/udp scanning and ConnectivityManager.getConnectionOwnerUid, and why an LRU cache keeps it cheap.1 min read
Fathom
1 post