Privacy

Why Trusted Execution Environments Fall Short of Real Encryption for AI in Messaging

As messaging platforms add AI features, companies are turning to trusted execution environments to process data on their servers. But TEEs offer fundamentally weaker privacy guarantees than end-to-end encryption, and their use in messaging apps risks undermining years of security progress.

6 min read
Secure Messaging and AI Remain In Conflict Despite the Promise of TEEs

Messaging services including Signal, WhatsApp, and encrypted RCS rest on a core premise: conversations remain private between participants. End-to-end encryption provides mathematical assurance that platform operators cannot read message contents. Yet once a message lands on a user's phone, that guarantee dissolves. As artificial intelligence capabilities proliferate across messaging applications, the boundary between protected and exposed data grows increasingly blurred.

When AI processing happens entirely on a device, privacy risks remain contained. But many AI features demand computational resources beyond what consumer hardware can deliver, forcing companies to route processing to their servers. Tech firms propose a solution: trusted execution environments, or TEEs. The question remains whether server-side TEEs genuinely protect user privacy.

TEEs serve multiple purposes across the technology landscape, from digital rights management protections to secure storage in mobile wallets. For AI applications, the mechanism works like this: consumer devices lack sufficient power for advanced AI features, so companies transmit data to cloud servers for processing, then return results to the phone. This data movement creates a privacy opening. A request to summarize a conversation, for instance, might send entire message contents to the cloud and back. TEEs purport to keep such requests confidential. Implementations include Apple's Private Cloud Compute, Google's Private AI Compute, and WhatsApp's Private Processing, alongside TEE-based chatbot systems from other developers.

TEEs can deliver stronger security than unencrypted server processing, but they differ fundamentally from genuine encryption or local computation. Despite corporate assurances, they cannot match the privacy level of mathematical encryption. Consequently, devices should never automatically transmit data to a TEE without user intervention.

Understanding Trusted Execution Environments

A TEE functions as a hardened section of a computer that executes software in isolation from other processes on the same machine. TEEs permit users to verify that running code matches intended code rather than compromised versions, through a mechanism called attestation. Alternative names include secure enclave, or brand designations like SGX or TrustZone.

The cloud-based TEE concept aims for simplicity: a company operates a server in its data center while processing user-supplied data on the user's behalf, theoretically without accessing that information directly.

The Security Reality of TEEs

Real-world experience reveals multiple breaches and exploits annually, demonstrating that accessing TEE-protected data remains possible. The distinction matters: encryption relies on mathematics, while TEEs depend on engineering for security. Standard encryption algorithms emerge from years-long collaborative development by mathematicians worldwide, grounded in problems studied for decades. Mathematical consensus holds that standard encryption algorithms resist breaking according to current knowledge. No responsible engineer deploys a new encryption method without extensive peer review.

Engineering operates differently. Each system represents the work of specific engineers, carrying individual quirks and bugs discovered after deployment, not before. No system has proven unbreakable, and continuous research identifies new TEE attack vectors. Patches arrive as vulnerabilities surface, but perfection remains unlikely in the foreseeable future.

TEEs present particular engineering challenges because encryption keys physically reside on the device. Building a TEE requires keeping a key completely isolated and inaccessible while sharing the same physical hardware with system components that should not access that key.

Many TEE attacks exploit side channels. In such attacks, adversaries measure electrical impulses or other physical effects to determine operation timing within the TEE, then deduce the encryption key. Once obtained, the key unlocks all protected data. End-to-end encryption contrasts sharply: the key never exists on that machine, forcing attackers to conduct similar attacks on the user's own device instead.

Companies deploying TEEs for data protection face a dilemma: they must keep the key on the server while protecting it during complex operations like large language model execution, making key protection substantially harder.

A TEE versus plaintext on a server represents the difference between easy data access and specialized effort to obtain it. Such effort frequently requires physical machine access. This distinction matters most for protection against mass surveillance, and for many users, that level of security may suffice.

Yet this reveals the core tension: "secure enough for most cases" and "encrypted as in math" constitute different categories, and conflating them proves dangerous. Services currently offering mathematical encryption experience genuine security degradation when switching to TEE-based protection.

Large Language Models and AI Processing

Organizations sometimes wish to deploy language models that respond to queries while preserving privacy. On-device language models exist but face size limitations. When organizations want to offer query responses without accessing conversations, they turn to TEEs. This approach enables reasonably private chatbot operation, the strategy adopted by Apple, Google, WhatsApp, and others.

Why not use encryption instead? Language model inference is fundamentally mathematical computation: input flows through a large function to produce output. Mathematics exists for performing such computation while hiding inputs and outputs from the operator. This approach, called homomorphic encryption, remains too computationally expensive for practical deployment at this scale.

TEEs appeal because they execute computation within a special opaque server section. TEE manufacturers work to prevent the operator from observing internal operations. Yet the operator's trustworthiness remains essential—they could still attempt to determine what happens inside.

These systems reasonably qualify as privacy-preserving, but not encrypted. This distinction carries weight, particularly regarding TEE interaction with secure messaging. When an end-to-end encrypted chat user requests language model summarization, review, or storage of messages, that message content leaves the device for an unencrypted third-party server. This threatens secure chat privacy and increasingly escapes user control.

Practical Guidance for Users and Developers

Recommendations depend on individual threat models, but a fundamental principle applies: devices should never automatically transmit data to a TEE. When phone users control what information gets sent—even a data chunk like unread messages—they can pause and assess whether that data risks too much exposure.

Automatic transmission transforms data exfiltration into a system feature. If the system previously offered end-to-end encryption, automatic transmission eliminates that protection entirely.

  • Developers: avoid building systems that automatically send device data to a TEE, especially from otherwise end-to-end encrypted applications.
  • Users: if developers proceed anyway, disable automatic data sending features. Consider carefully how much risk accompanies sending data off-device when you actively choose to do so.

What Users Should Monitor

TEEs serve legitimate security functions in various contexts. Most phones contain a TEE that stores biometric unlock keys and the foundation of the password keychain. TEEs also enable certain backup systems, allowing phone restoration via passcode or WhatsApp and Signal backup recovery.

Cloud processing through TEEs differs fundamentally from end-to-end encryption and delivers lower privacy levels.

Private life increasingly concentrates on phones and in messages. Years of effort have secured those messages, producing major achievements like encrypted RCS and continued user experience refinement in Signal and WhatsApp. Recent advances like Advanced Data Protection extend end-to-end encryption to data beyond messaging, including notes and photos.

As companies introduce AI features that interact with encrypted services, extracting data from devices into cloud-based TEEs, they erode the privacy protections that end-to-end encryption provides. This risks creating serious confusion about which data remains protected and which does not.

Source: Electronic Frontier Foundation · Reporting supplemented by The Silicon Ledger staff.