Solving data sovereignty with encryption
Data sovereignty is about who can lawfully view your data and, more importantly, which privacy protections and civil liberties apply.
A brief history of international data laws
Or skip down to solutions ↓
China
First came worries about China. If Chinese companies hold your data, does the Chinese government have unfettered access to it? The answer is yes.¹ Countries started taking steps to protect themselves and their citizens.
Snowden
In 2013, Edward Snowden disclosed mass surveillance programs run by the U.S. government, including many aimed at close allies and even at U.S. citizens. Around the same time, we learned how the U.S. FISA courts were being used to bypass traditional due process and privacy protections. Suddenly, governments around the world, including in Europe, wanted to protect their data not just from China but from the U.S. as well.
Data residency
The first response was a slew of data residency laws. European countries, for example, required U.S. companies to keep certain types of data inside EU borders, on the theory that doing so would put EU courts in the middle of any demand for that data.
U.S. v. Microsoft
Late in 2013, the U.S. served a warrant on Microsoft for emails stored on its servers in Ireland. Microsoft refused and went to court. Meanwhile, the EU pushed forward on a new EU-wide privacy law, the General Data Protection Regulation (GDPR), which was adopted in 2016. That same year, Microsoft won its case against the U.S. government on appeal, and the government took the case to the Supreme Court.
CLOUD Act
In 2018, while the case was still pending, Congress passed the CLOUD Act. In short, the CLOUD Act says that a U.S. company served with a warrant for digital data must comply regardless of where the data is physically located. The government obtained a new warrant under the CLOUD Act, and the Supreme Court dismissed the case as moot.
The CLOUD Act shifted the conversation from residency to sovereignty: whose laws apply, not where the data is stored.

Schrems
Meanwhile, privacy advocate Max Schrems was challenging the legal basis for sending EU personal data to the U.S. In 2015, his case before the Court of Justice of the European Union (CJEU) struck down Safe Harbor, the framework most U.S. companies relied on to receive that data. Its largely similar replacement, the EU-U.S. Privacy Shield, arrived in 2016. Schrems challenged that too, and in 2020 the CJEU struck it down in a ruling known as Schrems II.
Schrems II didn’t just kill Privacy Shield. The court also ruled that companies using other transfer tools, like standard contractual clauses, must ensure EU personal data gets essentially equivalent protection at its destination and must add “supplementary measures” where local law falls short. The European Data Protection Board’s recommendations on supplementary measures name strong encryption as one such measure, provided the keys stay under the control of the data exporter, or an entity it trusts, in the EU or a country with adequate protections. In other words, EU regulators point to encryption with keys held in Europe as a way to keep EU data protected even when a U.S. company holds it.
EU-U.S. Data Privacy Framework
For three years, U.S. companies holding EU personal data were on shaky ground. Then, in 2023, the U.S. and EU struck a third deal, the EU-U.S. Data Privacy Framework (DPF). It’s already facing a legal challenge, though, and it could go the way of its predecessors.
Beyond Europe
Europe isn’t alone. Saudi Arabia’s Personal Data Protection Law restricts transfers of personal data out of the Kingdom, and Australia steers sensitive government data to certified hosting providers that meet ownership and control requirements. India, Switzerland and others have their own versions. The details differ, but the encryption approach below works the same way everywhere: keep the keys under the control of someone in the jurisdiction.
- China's 2017 National Intelligence Law, Article 7, requires that "all organizations and citizens shall support, assist, and cooperate with national intelligence efforts." See the English translation at China Law Translate. ↩︎
Using encryption to keep data sovereign
There are two ways to keep data sovereign. The first is to keep both the data and the companies that control it inside the jurisdiction. If Germany wants its citizens’ data to remain sovereign, for example, that happens automatically when the data is held in Germany and is solely under the control of German companies. But that’s a tricky proposition for foreign companies, which have to license out their tech and manage expensive islands of infrastructure. It’s also a problem for customers, who lose the freedom to buy best-of-breed solutions.
The second approach uses cryptography. The stored data is application-layer encrypted, so peeking at it or exporting it produces garbage. The key that unlocks the data is stored in the target jurisdiction in a non-exportable manner (hold your own key is an effective way to do this), so a U.S. vendor served with a CLOUD Act warrant can only hand over ciphertext.

In an end-to-end encryption scenario, done properly, the service provider has no way to read the customer’s unencrypted data.
Server-side encryption patterns can work, too, provided insiders can’t peek at customer data, can only export customer data as ciphertext, and can’t produce any encryption keys. That takes a combination of technology and policy: a rule like “never build a way for an insider to decrypt and export all of a customer’s data” (in other words, no backdoors), plus keys held in the customer’s jurisdiction under the control of someone in that jurisdiction.
See how SaaS companies avoid compelled access with encryption and using ALE to block insiders for more details on the technical and policy combinations that must be in effect.
Data sovereignty encryption patterns
End-to-end encryption
Data is encrypted and decrypted on user devices, and the software companies holding the data don't have access to the keys needed to decrypt it. Their servers never see anything but meaningless bytes.
A government agency wanting access to the data will either need to compel it from the data owner, gain access to an authorized device that holds the key, or otherwise break or undermine the system.
Hold your own key (HYOK)
Data is encrypted before being sent to the database or disk, and the keys needed to decrypt it stay with the customer, in a key management service in the customer's own jurisdiction. The software company can't produce the keys.
For this to be effective, HYOK must be implemented in such a way that a U.S. agency would have to compel the software company to write code that undermines its own access controls and security measures to get access to the unencrypted data.
Benefits of encryption solutions
Data sovereignty FAQ
Do you need to have a European company as a partner to protect EU personal data?
Can this be used to keep data sovereign for other countries and regions?
Can encryption be used to protect EU personal data held by U.S. companies from compelled access that bypasses EU privacy protections?
Yes. The European Data Protection Board’s recommendations on supplementary measures name encryption as an effective safeguard when the keys stay under the control of someone in the EU or a trusted third country. Any encryption scheme attempting to solve this problem needs to meet these criteria:
-
The private data is meaningfully encrypted, meaning at the application layer, so that fetching data from a database returns encrypted values. That is what would be produced in response to a warrant.
-
The keys for decrypting the data remain within the EU or trusted third countries, so gaining access to them requires legal processes that protect the privacy of EU citizens. Implied in this is that the U.S. company holding the encrypted data can’t produce the keys, since another party, such as the customer, holds them.
-
Not mentioned, but of equal importance: the software vendor may be able to decrypt data on its servers for various purposes, but it should not have a way to view or export the data in unencrypted form.
Do you need keys to be stored by an EU company in the EU?
The European Data Protection Board’s guidance suggests as much, but it hasn’t specifically evaluated a lot of scenarios that likely provide equivalent protection.
-
For example, AWS says it can’t produce unencrypted keys because of how its systems are designed. The master keys it holds are generated and held by hardware security modules and can’t be extracted from them. Subkeys are encrypted with those inaccessible root keys.
-
Some cloud providers also support making calls out to remote KMSes. For example, Google Cloud Platform has an integration with Thales that allows a Thales appliance to be the root of trust and to hold the master key that is needed to unlock other keys in the system.
The safest approach is for the customer to hold its own key in an EU KMS operated by an EU provider.
What if a U.S. FISA court tries to compel access?
For IronCore Labs:
-
We don’t have any data of value (not that we can decrypt), so it’s unlikely they’d do this.
-
If they should anyway, we’ll respond appropriately to lawful requests, but that means delivering back encrypted data.
For our customers:
- As long as the data you pull off of disk or out of a database is encrypted (because it was encrypted with application-layer encryption before being sent to the data store), and as long as you can’t produce the keys, complying with a court order means producing encrypted data, which poses no harm to EU citizens.
If a company can access a KMS to decrypt the data it holds, can't a court mandate that it use that access to produce the data?
Not if the company doesn’t already have a way built into its software to extract the decrypted data.
In a properly designed system, the only way to produce the decrypted data would be to write software that decrypts it and writes it to disk. That should violate the company’s contractual promises, so the U.S. government would need the power to compel a software company to build a backdoor that undermines its own security system.
What about the EU-U.S. Data Privacy Framework (DPF)?
Since 2023, the DPF has once again allowed U.S. companies that certify under it to receive EU personal data. That makes it far easier for U.S. companies to hold the private data of EU citizens, though they are still subject to GDPR’s rights and duties of care, like the requirements for data protection by design.
But the DPF is the third such agreement in a decade. The first two were struck down by the courts, and the DPF is already facing a legal challenge of its own. In our view, technical measures let you ignore the ups and downs of data transfer frameworks entirely.