How to Fight Against AI Hackers: A Logical Air Gap Built with Homomorphic Encryption
Tech & Insights — Homomorphic Encryption in Practice (a three-part series)
- ① How to Fight Against AI Hackers: A Logical Air Gap Built with Homomorphic Encryption — you are here
- ② Understanding Data Clean Rooms: How to Share Insights Without Sharing Your Data
- ③ Understanding Cross-Institution Fraud Detection: Following the Money Without Sharing Transaction Data — coming soon
TL;DR
- AI is beginning to automate parts of vulnerability discovery and attack execution, which makes attacks faster and larger in scale. Keeping intruders out remains essential, but it is just as important to limit what they can reach once inside.
- Fully homomorphic encryption (FHE) allows an external server to compute on data without ever seeing the plaintext or holding the decryption key. We call this cryptographic separation between computing on data and reading it a "logical air gap."
- FHE-based Private AI applies this approach to AI inference. The exact scope of protection depends on the encryption scheme and on the security assumptions of the protocol.
- FHE does not replace secure implementation, key management, protection of user devices, result verification or availability planning. Real deployments must also account for compute cost and for which models and operations are supported.
AI-driven cyberattacks are growing in reach and severity, and perimeter defenses are struggling to keep pace. Keeping attackers out is no longer the only question. We also need to ask what an attacker can actually obtain once inside, and above all, whether a compromised server that handles sensitive data gives up the data itself.
The work that needs protecting is changing as well. Companies and public institutions are increasingly using AI for tasks that involve sensitive information, such as customer service, document review and fraud detection, and that AI often runs in a third-party cloud. It is fine to use external computing resources, but if that environment is ever breached, it should give away as little as possible.
This post examines what fully homomorphic encryption changes when security is judged by what a breach exposes, and the conditions under which that protection holds.
1. AI is reshaping attacks while sensitive data moves off-site
This year has seen a series of public cases in which AI found software vulnerabilities or escaped security controls.
- May Anthropic reported that Claude Mythos Preview, used in defensive vulnerability research with about 50 partners, identified more than 10,000 high-severity vulnerability candidates in widely used software. (Anthropic)
- September On September 25, OpenAI reported that an agent in training had communicated with the outside world over DNS. The test environment restricted internet access, but its DNS controls were not tight enough. OpenAI discovered the issue on September 20 and paused tool-using training, evaluation and inference for the high-capability models involved. (Fortune)
- October Wiz researchers disclosed several remote code execution vulnerabilities in the core engine of PHP, which underpins a large share of the web. The flaws were found with the help of AI tools, and the first was discovered in August. (Wiz)
Taken together, these cases show AI accelerating both the discovery and the exploitation of vulnerabilities. The Anthropic and Wiz cases are also examples of defenders using AI to find and fix flaws first. Attackers, however, can use the same technology to automate repeated probing with fewer people, although they remain limited by compute, time, access and the cost of verifying what they find.
Security in the age of AI therefore has two jobs: to keep strengthening the defenses that keep attackers out, and to design systems so that sensitive data stays protected even after a breach. This post focuses on the second.
2. What does a breach expose?
Most servers handle data in plaintext while computing on it. Data is commonly encrypted at rest and in transit, but a server has to decrypt it before it can compute on it. As a result, a compromised compute server can expose whatever data it was processing.
Servers are protected by many layers of defense, each serving a different purpose. One of their most important effects is to make attacks more costly and more difficult, and guidance from national cybersecurity agencies emphasizes patching, attack surface reduction and defense in depth, alongside the use of AI for defense. (Australian Cyber Security Centre et al.) The table below summarizes the main role of each defense and the limits that remain once a breach has occurred.
| Defense | Primary role | Remaining limit after a breach |
|---|---|---|
| Firewalls and network isolation | Reduce the paths in from outside | If an attacker reaches the server through a misconfiguration or a bypass, the plaintext it is processing may be exposed |
| Authentication and access control | Determine who can access what | If a privileged account is taken over, the attacker can read whatever that account can |
| Sandboxes and containers | Keep a program from affecting anything outside its boundary | A flaw that breaks isolation can reach other data on the same server |
| Security patches | Remove known vulnerabilities | Cannot address vulnerabilities that are not yet patched or not yet known |
| Monitoring and detection | Identify anomalies and speed up response | Does not prevent intrusion, and anything exposed before detection remains exposed |
| Trusted execution environments (TEEs) | Process data inside a hardware-isolated enclave | Data is in plaintext inside the enclave, so the chipmaker and the firmware must be trusted |
Another way to limit exposure is to cut the connection altogether. A physical air gap removes direct access to a system from external networks, although controls are still needed for incoming data, maintenance, removable media and insiders. (NIST, MITRE) It is also hard to apply to work that depends on a continuous connection to external services. Even network separation in Korea's financial sector pairs physical separation with logical separation and controlled connections between networks. (Financial Services Commission of Korea) Work that relies on the cloud and on external AI models needs a different way to reduce exposure while staying connected.
3. How FHE separates computation from access to the data
Fully homomorphic encryption (FHE) is a form of encryption that allows data to be computed on while it remains encrypted. The process has three steps:
- The user encrypts the data on their own side and sends it.
- The external server computes directly on the ciphertext, without decrypting it, and returns an encrypted result.
- Only the holder of the decryption key can read the result.
The compute server never holds the plaintext of the protected input or the key needed to decrypt it. We call this cryptographic boundary, which keeps the server from accessing the data it computes on, a logical air gap. The term is a metaphor and should not be confused with a physical air gap, which cuts off network connectivity. Blocking network access and preserving the confidentiality of encrypted data are different kinds of security.
The FHE schemes in wide use today rely on the assumption that certain lattice problems are computationally hard. Given appropriate security parameters, a sound implementation and secure key management, it is computationally infeasible for the server to recover the plaintext from the ciphertext alone. (Homomorphic Encryption Security Guidelines) Even if the compute server is breached, an attacker obtains nothing of the protected data but ciphertext.
Comparing FHE with related technologies sharpens the distinction. Partially homomorphic encryption can handle limited computations such as sums. What sets FHE apart is that a wide range of computations can be delegated to a server that never receives the key. Secure multi-party computation (MPC) also computes without revealing the underlying data, but it divides the work among several servers, and each protocol tolerates a different degree of compromise or collusion among them. (MP-SPDZ) TEEs protect data in use at close to native speed, but the data is in plaintext inside the enclave. FHE, TEEs and MPC differ in what must be trusted, how the parties communicate and what each costs in performance, so the right choice, or combination, depends on the level of protection required and the demands of the workload.
4. What it protects, and under what conditions
What a logical air gap protects depends on the encryption scheme and on the security assumptions of the protocol. Anyone considering it should weigh the following.
- What is assumed about the server? A server that follows the protocol but tries to learn the data (often called semi-honest) falls under a different security model from a server that an attacker controls and can make behave arbitrarily (malicious). An attacker in control might tamper with results, submit malformed ciphertexts or watch how the system responds after decryption. Guaranteeing confidentiality against such behavior requires a separate review of the protocol. NIST likewise treats the security of FHE against attackers who can observe decryption results as a distinct question. (NIST)
- What exactly is protected? Encryption protects the content of the data. Metadata, such as when requests arrive, how large they are and how they are executed, may still be visible to the server.
- Before encryption and after decryption. The user's device before encryption, the channel through which the encryption software is distributed, key storage, and the process of decrypting and releasing results all need protection outside FHE. Nor can FHE by itself prevent implementation bugs or key management errors.
- Integrity and availability. FHE is a confidentiality technology. Verifying that results have not been tampered with, and keeping the service running through disruptions, require separate measures.
- Cost and coverage. Computing on ciphertext takes more time, memory and bandwidth than computing on plaintext. Not every model or operation is supported, and approximation methods carry their own accuracy trade-offs.
In short, FHE narrows the part of the computing environment that must be trusted to keep data confidential. User devices, keys, and the decryption and release of results still need protection, and the integrity and availability of the compute server still need to be managed. Authentication, access control, key management and anomaly detection remain as necessary as ever.
5. Applying it to AI: FHE-based Private AI
In a typical server-based AI service, user input is processed in plaintext on the server. Firewalls, access control and sandboxes protect that server, but a breach can expose the inputs it was handling. As AI takes on more work involving sensitive information, AI servers that hold such data in plaintext become increasingly attractive targets.
FHE-based Private AI applies the same approach to AI inference. The user encrypts the input and sends it, and the AI server runs inference on the ciphertext and returns an encrypted result that only the user, as the key holder, can read. Because the server never holds the plaintext input or the decryption key, it can remain connected to the network while reducing what a compromise would expose.
Its protection is subject to the conditions described in section 4. DESILO's THOR, for example, performs LLM inference on encrypted data and assumes a semi-honest server, one that follows the protocol but tries to learn the data. (Understanding THOR) A production service must also take into account the supported models and operations, response time and cost.
6. Beyond AI: data clean rooms and cross-institution analysis
The same approach extends beyond AI inference to any work in which computation on sensitive data has to be entrusted to another party. When researchers or external companies need to analyze data held by a hospital or a public agency, analyzing it in encrypted form gives them results without exposing the original records. When several banks want to detect fraud together, within the limits of what the law allows them to share, computing on each bank's transaction data in encrypted form lets them trace fraudulent funds as they move between institutions without revealing their customers' data to one another.
Because results in these cases are shared with third parties, the design must also determine who can decrypt which results. FHE reduces exposure in processing that is already permitted; it does not broaden what may be shared. The next two posts in this series examine these two cases: data clean rooms and cross-institution fraud detection. Data clean rooms are already in operation, while cross-institution fraud detection is at the proof-of-concept stage, where the benefit of joint analysis has been measured on synthetic data.
Closing
AI is increasing the speed and scale of vulnerability discovery and attacks. Preventing intrusion remains important, and it needs to be complemented by designs that limit what a breach exposes. FHE separates computation from access to the data by never giving the external compute server the plaintext or the decryption key, and this post has called that boundary a logical air gap. Its protection rests on the encryption scheme and the protocol's security assumptions, on implementation and key management, and on the cost of computation. FHE-based Private AI is this approach applied to AI inference.
Further reading
- "Understanding Data Clean Rooms: How to Share Insights Without Sharing Your Data" (Homomorphic Encryption in Practice, part 2): the main types of data clean rooms, which let others analyze your data without seeing the originals, and how they are used in practice.
- "Understanding Cross-Institution Fraud Detection: Following the Money Without Sharing Transaction Data" (Homomorphic Encryption in Practice, part 3, coming soon): a design that lets banks detect fraud together without revealing customer data to one another, and results from a proof of concept on synthetic data.
- Understanding Fully Homomorphic Encryption (FHE): Computing on Data Without Ever Opening It: how homomorphic encryption works, its main types and where it is used.
- Understanding Private AI: Using AI Without Handing Over Your Data: the different ways to use AI without giving up your data, and how homomorphic encryption compares with them.
- Understanding THOR: Running LLM Inference on Ciphertext: test results on the speed and accuracy of running a language model on encrypted input.
- Understanding the GL Scheme: Homomorphic Encryption Redesigned from Scratch for Matrices: how the cost of homomorphic encryption was reduced for matrix operations, the core of AI computation.