prashant.dhingra.website
Tutorial · Data & Privacy Engineering · Updated June 2026

Encrypted analytics, three ways: TEEs,MPC,FHE

Trusted execution environments, multi-party computation, and fully homomorphic encryption all tackle a shared problem. extracting value from sensitive data while ensuring plaintext remains secure from unauthorized entities Nevertheless, they are not interchangeable. This guide highlights variations in functionality, analytics features, threat models, real-world performance, and the ideal scenarios for utilizing each option.

PD By Prashant Dhingra ~20 min read 3 technologies compared Primary sources ↓
Key takeaways
  • TEEs protect data in use compatible with popular SQL, ML, and streaming frameworks, as well as low latency performance due to reliable hardware.
  • MPC facilitates trust across various parties to ensure privacy of inputs, making it perfect for analytics across mutually distrustful organizations.
  • FHE Executes computations on encrypted data without requiring a decryption key on the server, making it well-suited for secure tasks that do not involve accessing plaintext data on the server, like confidential inference operations.
  • The real question is where trust sitsinside the CPU provider's Trusted Execution Environment (TEE), assuming no collusion (MPC), or because of cryptographic difficulty (FHE).
  • In production, the best answer is often hybrid TEE orchestrates, MPC joins cross-parties, and FHE handles the most sensitive client-server operations.

The three technologies at a glance

Both offer contrasting responses through unique methods. The easiest way to understand this difference is by analyzing only one card.

TEE
Trusted Execution Environment

Using hardware-based isolation guarantees the protection of code and data from the OS, hypervisor, and other components, enabling verification of the running environment prior to sharing sensitive information.

ExamplesIntel SGX/TDX · AMD SEV-SNP · Arm CCA Realms
MPC
Secure Multi-Party Computation

Cryptographic protocols enable parties to jointly compute a function on private inputs while keeping the inputs confidential. This is achieved through secret sharing, garbled circuits, and homomorphic techniques.

ExamplesMP-SPDZ · ABY3 · SecretFlow · SCQL
FHE
Fully Homomorphic Encryption

A simple function that allows for processing encrypted data without the secret key, ensuring that only the client or a specified endpoint can decrypt the data while an untrustworthy server operates on the ciphertext.

ExamplesOpenFHE · Microsoft SEAL · TFHE-rs · Concrete ML

For encrypted analytics specifically: TEEs are well-suited for a wide range of tasks including general SQL, joins, ETL, Spark-style batch processing, existing ML training, and streaming, thanks to their ability to run unaltered software within secure enclaves or confidential VMs. MPC is highly efficient when multiple data owners need to perform collective aggregations, joins, set intersections, or privacy-preserving training without exposing plaintext data to a third party. FHE works best for clients needing an untrusted service for encrypted data computations without hardware trust assumptions, and is currently recommended for tasks such as limited inference, vectorized arithmetic, small tabular models, and specific encrypted data-frame operations.

Foundations and the core trade-off

The decisive question is where trust sits:

  • TEEs depend on CPU manufacturers, firmware, attestation roots, and mitigating vulnerable side channels.
  • MPC reduces dependence on a single infrastructure provider by depending on the integrity and lack of collusion among multiple parties, up to the corruption threshold set by the protocol, under the assumption of perfect implementation.
  • FHE Decreases dependence on server trust and removes susceptibility to TEE hardware breaches, however, necessitates careful parameter selection, secure key handling, implementation devoid of side-channel threats, and stringent oversight of data exposure.

The importance of knowing the origins of these technologies cannot be understated. MPC traces back to Yao's two-party computation and GMW's expansion to multi-party situations with honest majority. FHE was first introduced through Gentry's ideal-lattice design in 2009 and has since transitioned to using RLWE/LWE-based schemes with established security parameters. TEEs have been created by major players such as Intel (SGX, TDX), AMD (SEV-SNP with memory-integrity protection against malicious hypervisors), and Arm (CCA 'Realms' managed by a Realm Management Monitor).

A useful mental model

Three ways to compute on data you can't see
TEE
Confidential execution
Plaintext lives inside attested hardware
MPC
Distributed trust
Data split so no one party sees it whole
FHE
Encrypted algebra
Server computes on ciphertext, never decrypts

Core properties side by side

PropertyTEEsMPCFHE
Protection mechanismHardware isolation + attestationSecret sharing / garbled circuits / HE across partiesCiphertext-level computation
Trust anchorCPU vendor, firmware, attestation chainCorruption threshold & non-collusionCryptographic hardness & parameter correctness
Plaintext visible during executionYes :: inside enclave/CVM memoryNo single party sees full plaintextNo :: server sees ciphertext only
Best fitGeneral analytics on existing stacksCross-party collaborative analyticsClient-server private compute on narrow circuits/models
Hardware requirementSpecial CPU support (SGX, SEV-SNP, CCA)None intrinsicNone intrinsic; accelerators increasingly helpful

← swipe the table →

Analytics coverage by workload

The main practical difference is not in the definition of crypto, but in the shape of analytics each can support without heroic redesignTEE technology is capable of supporting a diverse range of software, from unmodified Linux applications running encrypted Spark SQL to specialized engineering such as MP-SPDZ protocols and ABY3 for PPML. FHE technology, which initially had limited support, is now broadening with schemes like CKKS/BFV/BGV and encrypted inference capabilities. Additionally, TFHE-rs provides a variety of operations with GPU bootstrapping.

WorkloadTEEsMPCFHE
Aggregationstrong
Arbitrary SQL/Spark aggregation runs naturally
strong
Core secure-computation primitive
good
Arithmetic/vectorized; depends on circuit depth
SQL select / filter / group-bystrong
Closest to plaintext execution
strong, costlier
SCQL, VaultDB, SECRECY, SMCQL
limited
Specialized data-frames, not general SQL
Joinsstrong
Large equi-joins via existing engines
supported
Often the dominant cost center
weak
Replaced by equality circuits, PSI, narrow flows
ML inferenceexcellent
General models
strong
Common PPML settings
strong
Client-server private inference, some hybrid deep models
ML trainingstrong
Enclave XGBoost, broader confidential stacks
good
Linear, trees, collaborative; deep is costly
selective
Only some models; far narrower than inference
Streaming analyticsgood
Existing stream processors in confidential envs
specialized
Aggregate/sketch settings
weak today
Better for narrow encrypted transforms
Private set ops / entity resolutionpossible
But hardware trust stays central
excellent
PSI & private joins are mature
possible
Specialized; less turnkey than MPC

← swipe the table →

A second pattern worth highlighting is the growing role of hybridsSecretFlow combines MPC, HE, and other PETs in one platform, while OpenFHE provides backing for threshold and multiparty extensions. TEEs are increasingly important for offering attestation and secret-release mechanisms for cryptographic kernels. Teams often use hybridization to find a balance between trust minimization and acceptable latency.

Security guarantees and threat models

TEEs present a strong argument against a compromised host OS or malicious hypervisor within the vendor's threat model The guarantee level depends on the model's limitations and the effectiveness of the patching strategy, highlighting the practical implications.

  • Foreshadow broke core SGX confidentiality through speculative execution; Plundervolt compromised enclave integrity via undervolting.
  • Recent confidential-VM research demonstrated interrupt-based attacks against SEV-SNP and TDX.
  • Even in 2026, AMD issued bulletin AMD-SB-3034 for a vulnerability in SEV-SNP due to routing misconfiguration, which poses a risk to integrity in privileged attacks.

While TEEs are not inherently unusable, TEE security remains a critical consideration. moving systems-security target, not a one-time cryptographic proof.

MPC The idea of protecting data from a malicious cloud operator relies on multiple factors, including the integrity of all parties involved, the presence of adversaries, and the level of collusion permitted. The security of the system is not only based on theoretical guarantees but also on the implementation layer. A study in 2025 found security flaws in SPDZ implementations, underscoring the need for software assurance and concurrency testing despite the system's resilience to attacks.

FHE provides the cleanest server-side confidentiality The server depends on LWE/RLWE hardness with parameters aligned with HomomorphicEncryption.org standards, ensuring security as it never sees plaintext. Despite the high level of security offered by FHE, vulnerabilities such as metadata exposure and implementation side channels have been observed. To enhance protection, additional measures like output filtering and model partitioning are recommended alongside cryptographic safeguards.

DimensionTEEsMPCFHE
Protects vs compromised OS / hypervisorYes, by designYes, if protocol assumptions holdYes :: server runs without plaintext
Side-channel exposureHigh relative concern (microarch, interrupt/fault)Lower hardware dependence; output leakage remainsAvoids TEE boundary; impl & metadata can leak
Trust in hardware vendorHighLowLow
Trust in non-collusionLow to noneCentralUsually none (threshold decryption may add it)
Attestation / proof of environmentCore requirementNot hardware-based; correctness from protocolCircuit & cryptographic evaluation dependent

← swipe the table →

Performance, scalability, and cost

TEEs Consistently excel in raw workload flexibility and usually lead in latency, with valuable insights from data collected from different sources.

7–31%
the mentioned configuration, Opaque/SGX I/O-encryption incurs around a 7.5% overhead in comparison to end-to-end encryption.
~20 min
SECRECY: A recurrent C. diff query for a 2M-row password-reuse query takes approximately 1.2 hours, limiting MPC due to network constraints.
~1 ms
Concrete machine learning: while small linear and GLM models in FHE can be effective, they may not be suitable for ensembles, deep models, or SQL.

In a 2024 study, it was discovered that Confidential-VM TEEs outperformed SGX in 'lift-and-shift' analytics, mainly because they do not use SGX's per-process enclave model and have fewer restrictions on protected-memory limits. The study also showed that confidential VMs had around an 8.5% throughput overhead on streaming (NEXMark) workloads. MPC Batching in SECRECY led to a significant decrease in communication latency, enabling the transfer of 100 million 64-bit shares in approximately 2 seconds. Furthermore, ABY3 demonstrated the capability to handle billions of AND gates per second in scenarios where honest majority is prioritized. FHE remains the slowest, but standardized benchmarks show that the best option depends on the workload type (TFHE is great for binary circuits, while HElib is better for batching multiple instances). Furthermore, modern FHE implementations are moving towards using GPU or accelerator processing alongside CPU-only execution.

Cost & operational burden

Burden areaTEEsMPCFHE
Compute costLowest premium of the threeHigher :: multiple parties + protocol overheadHighest; acceleration often needed
Network / egressModerateOften high :: protocol messages dominateModerate, but ciphertexts/keys are large
Key managementAttestation-bound secret release + KMSMulti-party key & secret-share lifecycleClient keygen, eval keys, threshold decryption
OrchestrationAttestation, container policy, enclave/CVM schedulingParty coordination, fault handling, sessionsCompilation pipeline, circuit packaging, accelerators
Monitoring / debuggingHard :: introspection breaks trust boundaryHard :: transcripts distributed & sensitiveHard :: compiled, encrypted execution is opaque

← swipe the table →

Ecosystem, tooling, and maturity

The maturity timeline is asymmetric: MPC is the oldest in concept, TEEs have the most established infrastructure, and FHE is quickly advancing as a practical frontier.

  • TEEs The most advanced platform ecosystem features hardware stacks from Intel, AMD, and Arm, in addition to the cross-TEE Open Enclave SDK, Gramine for Linux SGX tasks, Enarx for WebAssembly compatibility, and Confidential Containers for Kubernetes security and secret distribution. The primary hurdle is navigating the complex nature of secure operations, not a shortage of tools.
  • MPC Advancements in research have resulted in the development of user-friendly tools like MP-SPDZ, ABY3, SecretFlow, and SCQL, which are increasingly accessible. Enhancements in usability are frequently tailored to cater to particular workloads or policies.
  • FHE demands a rapid tempo: OpenFHE (widest surface, FHE threshold, scheme switching), Microsoft SEAL (BFV/CKKS), TFHE-rs (Boolean/integer for production focus), HEBench (benchmarking), and Concrete ML (Python APIs, hybrid execution, deployment). It calls for a thorough grasp of cryptography beyond.
DimensionTEEsMPCFHE
Hardware / platform maturityHighNot hardware-dependentModerate, improving; accelerator ecosystem emerging
Developer abstractionStrong via enclaves/CVMs/containersModerate; improving with SQL/ML frameworksModerate for packaged ML; lower for custom analytics
Production readiness (general analytics)HighestModerateLowest for arbitrary analytics; stronger for focused inference

← swipe the table →

What's new in 2025–2026

Recently updated

The frontier moved :: especially on hardware and FHE

  • GPU TEEs went mainstream. Confidential Computing by NVIDIA now includes Hopper (H100/H200) and Blackwell (B200/B300, RTX Pro 6000) GPUs, ensuring secure encryption of model data in VRAM. AWS, Azure, and Google Cloud offer CPU-TEE confidential VMs, with Azure also providing full NVIDIA-CC GPU CVMs.
  • Composite attestation arrived. Intel Trust Authority and NVIDIA have recently launched a private virtual machine and a confidential computing graphics processing unit (GPU) in one integrated process, filling a significant void in confidential artificial intelligence (AI).
  • GPU-TEE overhead is small for LLM work. Based on the Hopper CC benchmarks, the LLM-inference overhead typically stays below 7%, even with larger models or longer sequences, resulting in minimal overhead. The bottleneck lies in the transfer between the CPU and GPU through PCIe, rather than the GPU's computing capabilities. A recent survey from February 2026 highlights concerns about specific GPU-TEE hardware components, such as power management and the PCIe bus, which are still in development.
  • FHE commercialized fast. Zama became a unicorn in June 2025 as the inaugural FHE company, boasting speed enhancements of approximately 20-100 times from its inception. With a target of achieving 500-1,000 TPS through GPU technology by the close of 2026, TFHE-rs has integrated CUDA GPU and AMD Alveo FPGA. production FHE features like Live Caller ID Lookup and specialized accelerators such as FPGA, processing-in-memory, and ASICs are consistently tackling the challenges of bootstrapping and off-chip communication.
  • Scale-out TEEs are on roadmaps. Current Trusted Execution Environments (TEEs) are constrained to single physical servers, but upcoming industry strategies propose scale-out solutions that have the potential to greatly expand the deployment of confidential analytics.

With the rise of confidential GPUs and FHE acceleration, the line between 'hardware-trust' and 'no-hardware-trust' privacy in private AI is blurring, leading to more cost-effective TEE-based solutions for various workloads.

Compliance and operational realities

All three are best viewed as risk-reducing technical measures, not scope-elimination machinesBoth GDPR Article 32 and HIPAA's Security Rule emphasize encryption and pseudonymization for data processing security, while PCI DSS prioritizes retention minimization and strong cryptography. However, it is crucial to remember that these measures do not replace the importance of lawful-basis analysis, data-minimization practices, regular auditing, adherence to retention limits, and effective output governance.

Operationally, each technology centers on a different discipline:

  • TEEs center on attestation and secret release Managing reference values, integrating with KMS, overseeing certificate lifecycles, signing images, and conducting patch-driven re-attestation pose significant challenges. Monitoring is particularly challenging because of the conflicting introspections.
  • MPC centers on party coordination Organizing compute gatherings, addressing collusion concerns, overseeing offline events, and controlling outputs are crucial aspects to consider. SCQL's column-control list emphasizes the importance of enforcing strict output regulations to avoid data leaks from well-executed or unchecked queries.
  • FHE centers on key and circuit lifecycle Concrete ML differentiates between client-side cryptographic parameters and server-side compiled model artifacts, recognizing that key generation can be time-consuming and keys can be long, and alerting that compiled artifacts depend on architecture. FHE CI/CD functions like a compiler toolchain merged with a crypto-parameter pipeline, as opposed to conventional model serving.
⚠ The shared caveat

While TEE, MPC, and FHE can greatly improve a control environment, they should not be relied upon as a substitute for secure software development. The security of all three families is constantly changing. It is best to view them as a single layer in a holistic design approach, rather than a fail-safe solution.

Decision framework by use case

The strongest overall mapping for most analytics programs:

Use caseFirst choiceWhy · when to differ
Single-org confidential SQL / ETL / BITEETo achieve the best latency, make sure the engine is widely compatible. Utilize FHE only if 'no plaintext on server ever' is essential and the query set is restricted.
Cross-org joins, clean rooms, collaborative aggregatesMPCA single operator cannot see all data, but SQL/PSI ecosystems are dependable. Use TEE for coordination and FHE for client-server processes.
Private ML inference as a serviceFHE or hybrid FHE+TEEStrong confidentiality measures are implemented on the server side, with specific client/server patterns in place. TEE can be considered if prioritizing latency or model diversity over minimizing trust.
Confidential ML training on existing frameworksTEEThe majority of software supports MPC for collaborative training when parties lack trust, but FHE is currently restricted to certain model classes.
Streaming analytics on sensitive dataTEEThe best option for utilizing stream processors is to use MPC designed for particular aggregates and sketches, while FHE is generally limited to specific transforms.
Regulated sharing where hardware trust is unacceptableMPCHighest level of trust reduction for multi-owner analytics. Explore the use of Fully Homomorphic Encryption (FHE) for single client/server configurations, despite the potential increase in runtime
Lowest operational friction, near-term rolloutTEEWhen prioritizing trust over convenience, choose MPC/FHE for ecosystem support that aligns with standard infrastructure practices to ensure optimal performance.

← swipe the table →

Boiled down: TEE-first Updating internal analytics, adhering to BI regulations, creating confidential features, and integrating confidential streaming. MPC-first Federated analytics for healthcare and finance, inter-company joins, and advertising measurement are essential for maintaining clean data rooms. FHE-first for secure inference services, encrypted client-server scoring, and tailored arithmetic analytics with a strict no-storage policy for plaintext on the server. Hybrid-first When collaboration, trust issues, and practical performance become equally important.

Adoption checklist

  1. State the trust requirement Which obstacle must be conquered (host OS, cloud operator, collaborator, server)? This response efficiently limits the choices.
  2. Map the workload shape - Analyzing the effectiveness of general SQL/streaming versus cross-party joins and client-server inference in the context of the analytics-coverage table.
  3. Pin the latency and cost budgetNext, compare it to standard benchmarks (TEE performance similar to native; MPC constrained by network; FHE dependent on accelerator).
  4. Decide attestation and key management early: development of reference values and key management systems for secure execution environments; establishment of party/session and secret-sharing lifecycle for multiparty computation; creation of a pipeline for fully homomorphic encryption that integrates key generation with compiled circuit execution.
  5. Write the output-governance policy "Thresholds, allowed columns, and restrictions on repeated queries must be carefully managed to prevent potential information leakage, even with precise execution."
  6. Run a trial of a small workload from beginning to end, confirm security review matches the threat model, then move forward with implementation.
  7. Plan for hybridsImplementing TEE orchestration with MPC primitives, or FHE at the critical client-server edge, is often the most effective choice for operational settings.

Frequently asked questions

What's the difference between TEEs, MPC, and FHE? +
All three technologies securely manage sensitive data without exposing plaintext to unauthorized parties, each with its own distinct trust approach. TEEs protect data in use through authenticated hardware, MPC distributes trust among multiple parties to prevent individual access, and FHE enables untrusted servers to process ciphertext without decryption key access. TEEs offer compatibility, MPC is suited for inter-organizational collaboration, and FHE provides the highest level of assurance against plaintext exposure to servers for certain tasks.
Which is best for encrypted analytics? +
The technology chosen should align with the trust requirements of the given context. To easily connect with existing SQL/ML/streaming systems, TEEs may be the best option. When collaborating with organizations that have mutual distrust, consider beginning with MPC for analytics. For outsourced computation without server trust, FHE can be used for private inference or specific analytics. It is common for operational systems to utilize a combination of all three technologies.
Is FHE fast enough for production in 2026? +
Despite being slower than plaintext, FHE is quickly catching up thanks to advancements. Basic linear models now run in just 1 millisecond, with GPU acceleration through CUDA and FPGA becoming common for libraries like TFHE-rs. Apple has even introduced an FHE caller-ID feature in their latest release. While FHE holds potential for private inference and arithmetic-heavy analytics, it is not yet ready to completely replace traditional SQL warehouses.
Are TEEs secure given side-channel attacks? +
TEE security is not a static guarantee but a constantly evolving system security target, as demonstrated by recent vulnerabilities such as Foreshadow and Plundervolt. The protection it offers against compromised OS or hypervisor within the vendor's threat model depends on side-channel exclusions and patch posture, with attacks targeting SEV-SNP and TDX prompting AMD to release bulletin AMD-SB-3034 in 2026.
Do these technologies remove GDPR or HIPAA obligations? +
Each of these measures are designed to reduce risks, rather than completely eliminating them. GDPR Article 32 features encryption and pseudonymisation as safeguards, HIPAA's Security Rule focuses on risk management, and PCI DSS requires retention minimization and strong cryptography. While these measures strengthen control environments, they do not eliminate the importance of lawful-basis analysis, data minimization, auditing, retention limits, or output governance.
What is a confidential GPU and why does it matter? +
The Confidential GPU technology on Hopper and Blackwell GPUs enhances Trusted Execution Environment (TEE) protections for GPU memory and execution, safeguarding sensitive data like model weights, activations, and KV-cache by encrypting them in VRAM, even from privileged hosts. When paired with a CPU TEE, NVIDIA's Confidential Computing allows for secure private AI inference and training with minimal performance impact, usually less than 7% overhead for Large Language Models (LLM) tasks.

Primary sources

This tutorial includes vendor documentation, foundational papers, peer-reviewed benchmarks, standards, and recent announcements for 2025-2026. Key references: