Every time I lightly touch on this point, I always get someone who insists on arguing with me about it, so I thought it would be worth making a dedicated, singular-focused blog post about this topic without worrying too much about tertiary matters.
Hereâs the TL;DR: If you actually built your cryptography properly, you shouldnât give a shit which country hosts the ciphertext for your messaging app.
The notion of some apps being somehow âmore secureâ because they shovel data into Switzerland rather than a US-based cloud server is laughable.
But this line of argument sometimes becomes sinister when people evangelize storing plaintext instead of using end-to-end encryption, and then try to justify not using cryptography by appealing to jurisdiction instead.
That more extreme argument is patently stupid. That is all I will say about it, lest this turn into a straw man argument. But if I didnât bring it up somewhere, someone would tell me I âforgotâ about it, so Iâm mentioning it for completeness.
Letâs start with the premise of the TL;DR.
What does âactually [building] your cryptography properlyâ mean?
Properly Built Cryptography
An end-to-end encrypted messaging app isnât as simple as âI called AES_Encrypt() somewhere in thee client-side code. Job done!â
If youâve implemented the cryptography properly, you might even be a contender for a real alternative to Signal. This isnât an exercise for the faint of heart.
To begin with, you need to solve key management. This means both client-side, secret-key management (and deciding whether or not to pass The Mud Puddle Test) and providing some mechanism for validating that the public key vended by the server is the correct one for the other conversation participant.
The cryptography tried for over three decades to make âkey fingerprintsâ happen, but I know professional cryptographers who have almost never verified a PGP key fingerprint or Signal safety number in practice. Iâm working on a project to provide Key Transparency for the Fediverse. This is much a better starting point. Feel free to let power users do whatever rituals they want, but donât count on most people bothering.
Separately, the app that ships the cryptography should itself strictly adhere to reproducible builds and binary transparency (i.e., SigStore).
Whatâs This About Transparency?
Both âKey Transparencyâ and âBinary Transparencyâ are specific instances of a general notion of using a Transparency Log to keep a privileged system honest.
Also, Key Transparency is an abbreviated term. The thing that youâre being incredibly transparent about is a userâs public keys. If that wasnât the case, key transparency would be a dangerous and scary idea.
If you donât know what a public key is, this blog post might be too technical for you right now.
If thatâs the case, start here to get a sense for how people try to explain it simply.
Separate to both of those topics, Certificate Transparency is already being used to keep the Certificate Authorities that secure Internet traffic honest.
But either way, theyâre just specific instances of using a transparency log to provide some security property to an ecosystem.
Whatâs a Transparency Log?
A transparency log is a type of log or ledger that uses an append-only data structure, such as a Merkle tree.
Theyâre designed such that anyone can verify the integrity and consistency of the logâs entries. See this web page for more info.
Sometimes youâll hear cryptographers talk about a âsecure bulletin boardâ in a protocol design. What they almost always mean is a transparency log, or something fancier built on top of one.
If this vaguely sounds blockchainy to you, you would be correct: Every cryptocurrency ledger is a consensus protocol (often âproof-of-workâ) stapled onto a transparency log, and from there, they build fancier features like smart contracts and zero-knowledge virtual machines.
Independent Third-Party Monitors Are Essential
There is little point in running any sort of transparency log if you do not have independent third parties that monitor the log entries.
Even better if you take a page out of Sigsumâs book and implement witness co-signatures as a first class feature.
What Does Transparency Give You?
If youâre wondering, âOkay, so what?â then let me try to connect the dots.
If you want to surreptitiously compromise a messaging app, you might try to:
- Backdoor the client-side software.
But binary transparency and reproducible build verification will make this extremely easy to detectâor even worse, mitigate.
- Compromise the server to distribute the wrong public keys.
But key transparency prevents the server from successfully lying about the public keys that belong to a given user. Additionally, it prevents the server from changing history without being detected.
For a more detailed treatment, refer to the threat model I wrote for the public key directory project.
What Else Is Needed for Proper Implementations?
Once you have reproducible builds, binary transparency, secret-key management (which may or may not include secure backups), and public key transparency, you next need to actually ship a secure end-to-end encryption protocol.
The two games in town are MLS and the Signal Protocol. My previous blog post compared the two. They provide different subtly different security properties, serve slightly different use cases, and have similar but not identical threat models.
If you want to go with a third option, it MUST NOT tolerate plaintext transmission at all. Otherwise, it doesnât qualify.
If your use case is to focus on scaling up group chats to large numbers of participants, efficiently, and donât care about obfuscating metadata or social graphs, you might find MLS a more natural fit for your application.
Cryptographers use formal notions to describe the security goals of a system, and prove the security of a design under a game theoretic design that proves an attackerâs advantage stays below some threshold (usually something like âthe birthday bound of a 256-bit random functionâ).
If you use the same algorithm (e.g., a hash function) in more than one place, you should take extra care to use domain-separation. Both of the protocols I mentioned above do this properly, but any custom features you introduce will also need to be implemented with great care.
Your protocol should not allow the server to do dumb things, like control group memberships. Also, donât even think about letting any AI (not even a local model) have access to message contents.
Once you think youâre secure, you should hire cryptographers and software security experts to audit your designs and try to break them. This is something I do professionally, and Iâve written about my general approach to auditing cryptography products if youâre interested.
Any mechanisms (static analysis, etc.) you can introduce into your CI/CD pipeline that will fail and prevent a build if you introduce a memory-safety bug or cryptographic side-channel are a wonderful idea.
Section Recap
If you actually built your cryptography correctly, then it should always be the case that the server never sees any plaintext messages from users.
Furthermore, if the server attempts to substituting one userâs public key for another, it will fail, due to key transparency, third-party log monitors, and automatic Merkle tree inclusion proof verification.
While youâre at it, your binary releases should be reproducible from the source code, and the release process should emit attestations on a binary transparency log.
If you do all this, and managed to avoid introducing cryptographic vulnerabilities in your appâs design, congratulations! You have properly implemented the cryptography.
Interlude: Whoâs Proper Today?
As of right now, there isnât a perfect answer. Iâm setting a high bar, after all. The main sticking point is key transparency.
WhatsApp uses key transparency, but is owned by Meta and is shoving AI features into the product, so I doubly distrust it. Factor in WhatsApp being closed source, and itâs immediately disqualified.
Matrix, OMEMO, Threema, Wire, and Wickr all rely on key fingerprints. The same can be said for virtually every PGP-based product (e.g., DeltaChat).
As of this writing, Signalâs key transparency feature still has not shipped (though it is being developed).
Today, âsafety numbersâ are the mechanism for keeping track of whether a public key has been substituted for a conversation partner. This is morally equivalent to key fingerprints. As soon as this feature launches, Signal will be a proper implementation.
Signal offers reproducible builds, but there isnât enough attention on third-party verification of their builds. This is probably more of an incentive problem than a technical one.
None of the mainstream apps currently use binary transparency, but thatâs an easier lift.
Enter, Jurisdiction
Now that the premise has been explained in sufficient detail, letâs revisit the argument I made at the top of the page:
If you actually built your cryptography properly, you shouldnât give a shit which country hosts the ciphertext for your messaging app.
At the bottom of the cryptography used by a properly-built E2EE app, you will have an AEAD mode which carries a security proof that, without the secret key, an encrypted message is indistinguishable from an encryption of all zeroes set to the same length as the actual plaintext.
This means that the country of origin cannot learn anything useful about the actual contents of the communication.
They can only learn metadata (message length, if padding isnât used; time of transmission; sender/recipients). Metadata resistance isnât a goal of any of the mainstream private messaging solutions, and generally builds atop the Tor network. This is why a threat model is important to the previous section.
Regardless, if the only thing youâre seeing on the server is encrypted data, then where the data is stored doesnât really matter at all (outside of general availability concerns).
But What If The Host CountryâŚ
âŚWants to Stealthily Backdoor the App?
Binary transparency and reproducible builds would prevent this from succeeding stealthily. If the government wants the attack to succeed, they have to accept that it will be detected.
âŚLegally Compels the App Store to Ship Malware?
This is an endemic risk to smartphones, but binary transparency makes this detectable.
That said, at minimum, the developer should control their own signing keys.
âŚWants to Replace A Userâs Public Key With Their Own?
Key transparency + independent third-party log monitors. I covered this above.
âŚPurchases Zero-Day Exploits To Target Users?
This is a table-stakes risk for virtually all high-profile software. But if you think your threat model is Mossad, youâre not being reasonable.
When Does Jurisdiction Matter?
If the developers for an app do not live in a liberal democracy with a robust legal system, they probably cannot tell their government, âNo,â if theyâre instructed to backdoor the app and cut a release (stealth be damned).
Of course, thatâs not the only direction a government demand could take. As we saw with Shadowsocks, sometimes theyâre only interested in pulling the plug.
If youâre worried about the government holding a gun to some developerâs head and instructing them to compromise millions of peopleâincluding their own employees and innocent civiliansâjust to specifically get access to your messages, you might be better served by learning some hacker opsec (STFU is the best policy) than trying to communicate at all.
In Conclusion
If youâre trying to weigh the importance of jurisdiction in your own personal risk calculus for deciding between different encrypted messaging apps, it should rank near the very bottom of your list of considerations.
I will always recommend the app that actually encrypts your data securely over the one that shovels weakly-encrypted (or just plaintext) data to Switzerland.
Itâs okay to care about data sovereignty (if you really want to), but thatâs really not a cryptographic security consideration. Iâve found that a lot of Europeans prioritize this incorrectly, and itâs kind of annoying.
Header art: AJ, photo from FWA 2025 taken by 3kh0.