BenchmarksStack Ranking
APIsPricingDocsWhite PaperTokenBlogAboutSecurity Demo
Log InGet API Key
FHE · 5 min read

FHE vs Secure Enclaves:
Comparing Privacy Technologies

A comparison of FHE and hardware secure enclaves for privacy-preserving computation.

~42µs
Per Auth
2.17M/s
Throughput
128-bit
Security
32
Users/Batch

FHE and secure enclaves (like Intel SGX and ARM TrustZone) both enable computation on sensitive data. However, they take fundamentally different approaches with different security properties. Understanding these differences helps you choose the right technology.

Fundamental Approaches

FHE (Fully Homomorphic Encryption)

Mathematical protection: data remains encrypted during computation on encrypted data, security based on cryptographic hardness. FHE schemes like BFV operate on lattice-based mathematical structures, encoding plaintext into polynomial rings and performing arithmetic directly on ciphertexts. The server executing the computation never sees the underlying data—it manipulates encrypted polynomials and returns an encrypted result that only the key holder can decrypt.

Secure Enclaves

Hardware protection: data decrypted inside a protected hardware region, security based on physical isolation. Enclaves carve out a section of the CPU’s memory space that is shielded from the operating system, the hypervisor, and even physical bus-snooping attacks. The processor enforces access controls at the silicon level, and remote attestation lets a client verify that the correct code is running inside the enclave before sending secrets.

Key Distinction

FHE: Data never decrypted, even during processing. The mathematical guarantee holds regardless of who owns the hardware.
Enclaves: Data is decrypted but in protected memory. Security depends on the hardware manufacturer’s implementation being correct and uncompromised.

Security Model Comparison

FHE Security

Enclave Security

Attack Surface

The difference in attack surface between FHE and secure enclaves is not merely theoretical—it has been demonstrated repeatedly in practice.

FHE Attack Vectors

Enclave Attack Vectors

Real-World Enclave Breaches

Between 2018 and 2025, researchers published over a dozen distinct attack classes against Intel SGX alone: Foreshadow (L1 Terminal Fault), Plundervolt (voltage glitching), SGAxe (cache-based extraction), and AEPIC Leak (architectural register leakage). Each required Intel to issue microcode patches, and some could not be fully mitigated in existing silicon. FHE, by contrast, has zero known real-world cryptographic breaks.

Performance Comparison

Performance has historically been FHE’s weakness and enclaves’ strength. But that gap is narrowing rapidly—especially for structured operations like biometric matching, inner products, and threshold comparisons.

Metric FHE (H33 BFV) Secure Enclave (SGX)
Computation overhead ~42µs per auth (optimized BFV) ~1–5µs per auth (native code)
Batch throughput 2.17M auth/sec (32 users/CT) Varies by workload
Memory model Standard RAM, no restrictions EPC limited (128–512 MB typical)
Context switch cost None (runs in normal process) ~8,000–15,000 cycles per ECALL
Post-quantum ready Yes (lattice-native) No (hardware agnostic to PQ)

FHE Performance

Enclave Performance

Why the Gap Matters Less Than You Think

For authentication workloads, the raw per-operation latency difference between FHE and enclaves is often irrelevant at the system level. H33’s BFV pipeline processes 32 biometric matches in a single ciphertext (~1,109µs per batch), leveraging SIMD batching across 4,096 polynomial slots. Combined with ZKP proof caching via in-process DashMap (0.085µs per lookup) and batch Dilithium attestation (~244µs per 32-user batch), the full-stack per-authentication cost lands at ~42µs. At that latency, FHE is no longer the bottleneck—network round-trip time is.

Practical Considerations

Choose FHE when:

Choose Enclaves when:

Hybrid Approaches

The best solutions often combine both technologies in a defense-in-depth architecture:

“The question is not whether to trust hardware or mathematics—it is how to architect systems so that neither a hardware flaw nor a cryptographic advance alone can compromise your users.”

H33’s Approach

We primarily use FHE for biometric matching because:

# H33 full-stack pipeline per authentication
FHE batch (BFV, 32 users/CT) .... ~1,109 µs
ZKP cache (DashMap in-process) ...   ~0.085 µs
Attestation (Dilithium sign+verify) ~244 µs  (amortized over 32)
────────────────────────────────────
Total per batch .................. ~1,356 µs
Per authentication ............... ~42 µs
Sustained throughput ............. 2,172,518 auth/sec

Both FHE and secure enclaves have their place in the privacy-preserving computation landscape. The right choice depends on your threat model, performance requirements, and time horizon. For workloads where data must remain confidential over years or decades—biometrics, medical records, financial identities—FHE provides a guarantee that no hardware vulnerability can revoke. For workloads that demand arbitrary computation at native speed with acceptable hardware trust, enclaves remain a practical tool. Understand their trade-offs to make the right choice for your application.

Ready to Go Quantum-Secure?

Start protecting your users with post-quantum authentication today. 1,000 free auths, no credit card required.

Get Free API Key →

Build With Post-Quantum Security

Enterprise-grade FHE, ZKP, and post-quantum cryptography. One API call. Sub-millisecond latency.

Get Free API Key → Read the Docs
Free tier · 10,000 API calls/month · No credit card required
Verify It Yourself