Prashant Dhingrafield notes
Field Guide · Data & Privacy Engineering · No. 02 · June 2026

Encrypted analytics, three ways: TEEs, MPC & FHE

Trusted execution environments, multi-party computation, and fully homomorphic encryption all chase the same goal — compute on sensitive data without exposing plaintext to an untrusted party — yet they are not interchangeable. A working guide to how each behaves, what it can analyze, what threatens it, and when to reach for which.

Abstract · the short version
  • TEEs protect data in use inside attested hardware — broadest compatibility with existing SQL, ML, and streaming stacks, and the best latency.
  • MPC distributes trust across parties so none sees the inputs — best for analytics across mutually distrustful organizations.
  • FHE computes on ciphertext with no key on the server — best where plaintext must never exist server-side, especially private inference.
  • The deciding question is where trust sits: in the CPU vendor (TEE), a non-collusion assumption (MPC), or cryptographic hardness (FHE).
  • In production, the strongest answer is often hybrid — TEE for orchestration, MPC for cross-party joins, FHE for the most sensitive client-server steps.

01 — OverviewThe three technologies at a glance

They answer the same question with fundamentally different machinery. The fastest way to internalize the difference is one column each.

TEE
Trusted Execution Environment

Hardware-isolated execution that shields code and data from the OS, hypervisor, and peers, exposing attestation so a remote party can verify what's running before releasing secrets.

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

Cryptographic protocols that let parties compute a joint function over private inputs while revealing only the output, via secret sharing, garbled circuits, and homomorphic techniques.

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

A primitive allowing arbitrary computation on encrypted data without the secret key — the untrusted server operates on ciphertext, and only the client (or a threshold endpoint) decrypts.

OpenFHE · Microsoft SEAL · TFHE-rs · Concrete ML

For encrypted analytics specifically: TEEs fit general SQL, joins, ETL, Spark-style batch, existing ML training, and streaming, because they run largely unmodified software inside enclaves or confidential VMs. MPC is strongest when multiple data owners need joint aggregates, joins, set intersection, or privacy-preserving training without surrendering plaintext to a shared operator. FHE is strongest when a client wants an untrusted service to compute on its encrypted data with no hardware trust assumption — most practical today for constrained inference, vectorized arithmetic, small tabular models, and specialized encrypted data-frame operations.

02 — FoundationsFoundations and the core trade-off

The decisive question is where trust sits:

  • TEEs trust CPU vendors, firmware, attestation roots, and the absence or mitigation of exploitable side channels.
  • MPC reduces trust in any single infrastructure provider, but assumes enough parties stay honest or non-colluding per the protocol's corruption threshold — and that the implementation is correct.
  • FHE minimizes runtime trust in the server and avoids a hardware attack surface, but depends on careful parameter selection, key management, side-channel-safe implementations, and control of output and metadata leakage.

The lineage is worth knowing. MPC traces to Yao's secure two-party computation and the GMW generalization to the multi-party honest-majority setting. FHE began with Gentry's 2009 ideal-lattice construction and is now realized through RLWE/LWE-based schemes with standardized security parameters. TEEs are framed by Intel (SGX, TDX), AMD (SEV-SNP, adding memory-integrity protection against malicious hypervisors), and Arm (CCA "Realms" managed by a Realm Management Monitor).

A useful mental model

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 at runtimeYes — 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 help

← swipe the table →

03 — AnalyticsAnalytics coverage by workload

The decisive practical difference is not the crypto definition — it's the shape of analytics each supports without heroic redesign. TEEs inherit the flexibility of whatever they host (Gramine "lift-and-shift" of unmodified Linux apps, Opaque SQL running encrypted Spark SQL in enclaves). MPC covers a surprisingly broad surface but with workload-specific engineering (MP-SPDZ protocols, ABY3 for PPML, SCQL compiling SQL to hybrid graphs, VaultDB and SECRECY for federated SQL). FHE supports the narrowest set most economically, but that set is expanding (OpenFHE's CKKS/BFV/BGV and scheme switching; Concrete ML's encrypted inference and data-frames; TFHE-rs integer/Boolean/string ops with GPU bootstrapping).

WorkloadTEEsMPCFHE
Aggregationstrong
Arbitrary SQL/Spark aggregation runs naturally
strong
A core secure-computation primitive
good
Arithmetic/vectorized; depends on circuit depth
SQL select / filter / group-bystrong
Closest to plaintext execution
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 hybrids. SecretFlow combines MPC, HE, and other PETs in one framework; OpenFHE supports threshold and multiparty extensions; TEEs increasingly supply the attestation and secret-release plumbing around cryptographic kernels. Hybridization is often how teams reconcile trust minimization with acceptable latency.

04 — SecuritySecurity guarantees and threat models

TEEs offer the strongest story against a compromised host OS or malicious hypervisor within the vendor's threat model — but the guarantees are only as strong as that model's exclusions and the patch posture. The caveat is not theoretical:

  • 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 SEV-SNP routing-misconfiguration issue that could compromise integrity under privileged attack conditions.

The conclusion isn't that TEEs are unusable — it's that TEE security is a moving systems-security target, not a one-time cryptographic proof.

MPC has a cleaner story against a malicious cloud operator because no single executor holds the plaintext, but the guarantees hinge on protocol assumptions — two- vs three-party, honest vs dishonest majority, semi-honest vs malicious adversaries, and tolerated collusion. It is not "secure by theorem alone" at the implementation layer either: a 2025 study of SPDZ implementations found practical security issues despite the family's malicious-security design point, underscoring the need for software assurance and concurrency testing.

FHE provides the cleanest server-side confidentiality because the server never sees plaintext, rooted in LWE/RLWE hardness with parameters aligned to HomomorphicEncryption.org standards. But FHE doesn't hide everything: metadata, access patterns, model structure, and outputs can still leak at the application layer, and implementation side channels against FHE libraries have been demonstrated — so FHE often needs output filtering, model-partitioning, or threshold-decryption policies on top of the cryptography.

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 →

05 — PerformancePerformance, scalability, and cost

TEEs consistently win on raw workload flexibility and usually on latency. A few figures from the literature anchor the intuition:

7–31%
Opaque / SGX: I/O-encryption (~7.5%) to end-to-end (~31.7%) overhead in the cited setup; oblivious mode adds ~1.2×–46×
~20 min
SECRECY: a 2M-row password-reuse query; ~1.2 hrs for a recurrent C. diff query — MPC is network-bound
~1 ms
Concrete ML: very small linear / GLM models in FHE — but do not extrapolate to ensembles, deep models, or SQL

Confidential-VM TEEs often beat SGX for "lift-and-shift" analytics because they avoid SGX's per-process enclave model and small protected-memory limits; a 2024 study reported up to ~8.5% throughput overhead for confidential VMs on streaming (NEXMark) workloads. MPC performance is dominated by communication rounds, latency, batching, and expensive nonlinear operators — SECRECY showed batching cut communication latency by two-to-four orders of magnitude, exchanging 100M 64-bit shares in ~2 seconds, while ABY3 demonstrated billions of AND gates/second in optimized honest-majority settings. FHE remains the slowest, but standardized benchmarks show the winner depends on workload shape (TFHE best for binary circuits, HElib when batching many instances), and modern FHE increasingly assumes GPU/accelerator execution rather than CPU-only.

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 →

06 — EcosystemEcosystem, tooling, and maturity

The maturity timeline is asymmetric: MPC is oldest in theory, TEEs are most mature as infrastructure, and FHE is the fastest-moving practical frontier.

  • TEEs have the most mature platform ecosystem: Intel/AMD/Arm hardware stacks, the cross-TEE Open Enclave SDK, Gramine for Linux SGX workloads, Enarx for WebAssembly portability, and Confidential Containers for Kubernetes attestation and secret delivery. The limiting factor is secure-ops complexity, not missing tools.
  • MPC tooling is mature in research and increasingly usable: MP-SPDZ (many protocols/security models), ABY3 (PPML), SecretFlow (collaborative analysis, ML, PSI), and SCQL (a real SQL front end with column-control policies). Usability often comes from constrained workloads or policies.
  • FHE is moving quickly: OpenFHE (broadest surface, threshold FHE, scheme switching), Microsoft SEAL (BFV/CKKS), TFHE-rs (production-focused Boolean/integer), HEBench (benchmarking), and Concrete ML (Python APIs, deployment, hybrid execution). It still demands more cryptographic literacy beyond canned examples.
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 →

07 — DispatchWhat's new in 2025–2026

Field dispatch · recently updated

The frontier moved — especially on hardware and FHE

  • GPU TEEs went mainstream. NVIDIA Confidential Computing now spans Hopper (H100/H200) and Blackwell (B200/B300, RTX Pro 6000) GPUs, sealing model weights, activations, and KV-cache in encrypted VRAM. AWS, Azure, and Google Cloud all offer CPU-TEE confidential VMs, and Azure offers end-to-end NVIDIA-CC GPU CVMs.
  • Composite attestation arrived. Intel Trust Authority and NVIDIA now attest a confidential VM and a confidential-computing GPU in one workflow — closing a long-standing gap for confidential AI.
  • GPU-TEE overhead is small for LLM work. Hopper CC benchmarks put LLM-inference overhead typically below 7% (near-zero for larger models / longer sequences); the bottleneck is PCIe CPU↔GPU transfer, not GPU compute. A Feb 2026 survey cautions that some GPU-TEE hardware components (power management, PCIe bus) remain early-stage.
  • FHE commercialized fast. Zama became the first FHE "unicorn" (June 2025), reports ~20–100× speedups since inception, and targets 500–1,000 TPS via GPU by end of 2026; TFHE-rs adds CUDA GPU and AMD Alveo FPGA acceleration. Apple shipped a production FHE feature (Live Caller ID Lookup), and dedicated accelerators (FPGA, processing-in-memory, ASICs) keep attacking the bootstrapping / off-chip-memory bottleneck.
  • Scale-out TEEs are on roadmaps. Current TEEs are bound to a single physical server; industry roadmaps point to scale-out solutions, which would materially expand confidential-analytics deployments.

The net effect: the practical line between "hardware-trust" and "no-hardware-trust" privacy is blurring as confidential GPUs make TEE-based private AI cheap, while FHE acceleration narrows the cost gap for the strictest workloads.

08 — ComplianceCompliance and operational realities

All three are best viewed as risk-reducing technical measures, not scope-elimination machines. GDPR Article 32 explicitly names encryption and pseudonymisation as example safeguards for security of processing. HIPAA's Security Rule is risk-based and requires confidentiality, integrity, and availability of ePHI. PCI DSS still emphasizes retention minimization and strong cryptography. None replaces lawful-basis analysis, data-minimization decisions, auditing, retention limits, or output governance.

Operationally, each technology centers on a different discipline:

  • TEEs center on attestation and secret release — reference-value management, KMS integration, certificate lifecycle, image signing, and patch-driven re-attestation. Monitoring is harder because introspection competes with confidentiality.
  • MPC centers on party coordination — who hosts compute parties, who may collude, how to rotate sessions, how to handle a party going offline, and how to govern outputs. SCQL's column-control list shows why output policy isn't optional: a correctly executed query can still leak through permissive result policies or ungoverned repeated queries.
  • FHE centers on key and circuit lifecycle — Concrete ML separates client-side cryptographic parameters from server-side compiled model artifacts, notes key generation can be slow and keys large, and warns compiled artifacts are architecture-specific. FHE CI/CD resembles a compiler toolchain plus crypto-parameter pipeline, not conventional model serving.
The shared caveat

TEEs, MPC, and FHE can materially strengthen a control environment — but they do not substitute for secure software engineering, and their security posture is still moving for all three families. Treat each as one control in a layered design, not a guarantee.

09 — DecideDecision framework by use case

The strongest overall mapping for most analytics programs:

Use caseFirst choiceWhy · when to differ
Single-org confidential SQL / ETL / BITEEBroad engine compatibility, best latency. Use FHE only if "no plaintext on server ever" is mandatory and the query set is narrow.
Cross-org joins, clean rooms, collaborative aggregatesMPCNo single operator sees all data; SQL/PSI ecosystems are credible. Add TEE for orchestration; add FHE for selected client-server steps.
Private ML inference as a serviceFHE / hybridStrong server-side confidentiality; concrete client/server patterns exist. Use TEE if latency or model breadth matters more than trust minimization.
Confidential ML training on existing frameworksTEEHighest software compatibility. MPC for collaborative training across distrustful parties; FHE only for narrow model classes today.
Streaming analytics on sensitive dataTEEBest match to existing stream processors. MPC for specialized aggregates/sketches; FHE usually only narrow transforms.
Regulated sharing where hardware trust is unacceptableMPCStrongest trust minimization for multi-owner analytics. FHE if single client/server and far higher runtime cost is tolerable.
Lowest operational friction, near-term rolloutTEEBest ecosystem support, closest to standard infra practice. Choose MPC/FHE when the trust model — not convenience — is non-negotiable.

← swipe the table →

Boiled down: TEE-first for internal analytics modernization, regulated BI, confidential feature engineering, and confidential streaming. MPC-first for data clean rooms, federated healthcare/finance analytics, cross-company joins, and ad measurement. FHE-first for private inference services, encrypted client-server scoring, and selected arithmetic analytics where plaintext must never exist server-side. Hybrid-first when collaboration, low trust, and practical performance all matter at once.

10 — ChecklistAdoption checklist

  1. State the trust requirement first: what adversary must be defeated (host OS, cloud operator, collaborating party, the server itself)? This single answer narrows the field fast.
  2. Map the workload shape — general SQL/streaming vs cross-party joins vs client-server inference — against the analytics-coverage table.
  3. Pin the latency and cost budget, then sanity-check it against representative benchmarks (TEE near-native; MPC network-bound; FHE accelerator-dependent).
  4. Decide attestation and key management early: reference values and KMS for TEEs; party/session and secret-share lifecycle for MPC; key + compiled-circuit pipeline for FHE.
  5. Write the output-governance policy — thresholds, allowed columns, repeated-query limits — because even correct execution can leak through permissive results.
  6. Pilot one narrow workload end-to-end, validate the security review against the real threat model, and only then industrialize.
  7. Plan for hybrids: TEE orchestration around MPC primitives, or FHE at the most sensitive client-server edge, is often the realistic production answer.

11 — FAQFrequently asked questions

What's the difference between TEEs, MPC, and FHE? +
All three compute on sensitive data without exposing plaintext to an untrusted party, but they place trust differently. A TEE protects data in use inside attested hardware. MPC distributes trust across parties so no single one sees the inputs. FHE lets an untrusted server compute on ciphertext without the decryption key. TEEs offer the broadest compatibility, MPC fits cross-organization collaboration, and FHE offers the strongest no-plaintext-on-server guarantee for narrow workloads.
Which is best for encrypted analytics? +
It depends on where trust must sit. For fast adoption over existing SQL/ML/streaming stacks, start with TEEs. For joint analytics across mutually distrustful organizations, start with MPC. For outsourced computation with no server plaintext and no hardware trust, use FHE for narrow analytics or private inference. Many production systems combine all three.
Is FHE fast enough for production in 2026? +
FHE remains orders of magnitude slower than plaintext, but the gap is narrowing fast. Small linear models run in ~1 ms, GPU acceleration (CUDA, plus FPGA) is now standard for libraries like TFHE-rs, and Apple shipped a production FHE caller-ID feature. It's credible for private inference and arithmetic-heavy analytics, but not yet a drop-in replacement for full SQL warehouses.
Are TEEs secure given side-channel attacks? +
TEEs protect strongly against a compromised OS or hypervisor within the vendor's threat model, but their guarantees depend on side-channel exclusions and patch posture. Foreshadow and Plundervolt broke earlier assumptions, interrupt-based attacks have targeted SEV-SNP and TDX, and AMD issued bulletin AMD-SB-3034 in 2026. Treat TEE security as a moving systems-security target, not a one-time proof.
Do these technologies remove GDPR or HIPAA obligations? +
No. All three are risk-reducing technical measures, not scope-elimination machines. GDPR Article 32 lists encryption and pseudonymisation as example safeguards, HIPAA's Security Rule is risk-based, and PCI DSS still requires retention minimization and strong cryptography. They strengthen a control environment but don't replace lawful-basis analysis, data minimization, auditing, retention limits, or output governance.
What is a confidential GPU and why does it matter? +
A confidential GPU extends TEE protections to GPU memory and execution, so model weights, activations, and KV-cache stay encrypted in VRAM even from a privileged host. NVIDIA Confidential Computing on Hopper and Blackwell GPUs, attestable alongside a CPU TEE, makes private AI inference and training practical with typically under ~7% overhead for LLM work.

12 — SourcesSources & further reading

Synthesized from vendor documentation, foundational papers, peer-reviewed benchmarks, standards, and 2025–2026 announcements.