---
title: Direct Homomorphic Computation
url: https://www.emergentmind.com/topics/direct-homomorphic-computation
type: topic
---

# Direct Homomorphic Computation

Direct homomorphic computation denotes the ability to perform arbitrary computations on encrypted data without intermediate decryption, relying solely on the algebraic structure of homomorphic encryption (HE) schemes. Computation proceeds entirely in the ciphertext domain, with decryption only of the final result. Such protocols enable non-interactive, privacy-preserving server-side computing for applications in machine learning, statistical analysis, secure outsourcing, and even quantum architectures.

## 1. Mathematical Foundations and Scheme Taxonomy

Homomorphic encryption schemes enable algebraic operations—addition, multiplication, often comparison—on ciphertexts such that the decrypted result matches that of the operation performed on plaintexts. Formally, for HE = (KeyGen, Encrypt, Eval, Decrypt) and circuit $f$ over plaintexts $m_1,\ldots,m_n$:
$$
\mathrm{Decrypt}_{\mathsf{sk}}\bigl(\mathrm{Eval}(\mathsf{pk},f,\mathrm{Encrypt}(\mathsf{pk},m_1),\ldots)\bigr) = f(m_1,\ldots)
$$
Schemes are classified as:

- **Partially Homomorphic Encryption (PHE):** Supports only repeated addition or multiplication, e.g. RSA, Paillier.
- **Somewhat Homomorphic Encryption (SWHE):** Supports both operations to bounded depth due to noise accumulation; e.g. BGN, early Gentry constructs.
- **Leveled FHE:** Parameter tuning for circuit depth $L$ without bootstrapping.
- **Fully Homomorphic Encryption (FHE):** Unlimited depth via bootstrapping that refreshes noise [2305.05904].

Noise growth under homomorphic addition is linear; under multiplication it is superlinear, and across multiple operations can threaten correctness unless mitigated via bootstrapping. In LWE/RLWE-based schemes (BGV, BFV, CKKS), ciphertexts are vector or polynomial representations, and operations translate to number-theoretic transforms or modular arithmetic.

## 2. Minimal Universal Operations and Turing Completeness

Direct homomorphic computation of arbitrary programs requires a minimal set of encrypted operations. According to Bohm–Jacopini and circuit universality:
- **Addition** and **Multiplication**
- **Comparison:** Encrypted evaluation of “sign” or threshold functions, producing an encrypted Boolean/comparison result.
- **Selection (Multiplexer):** Encrypted branch decision based on encrypted comparison [1810.12380].

Comparison in most schemes relies on polynomial or functional approximations. For example, the encrypted sign function approximated as $H(z) = (1+\mathrm{sgn}(z))/2 \approx ½(1+\tanh(kz))$ is implemented in leveled FHE via fixed-point iterated polynomials and division circuits. Selection is realized as weighted ciphertext sums conditioned on comparison outputs.

This suite enables direct representation of sequence, conditionals, and iteration—an encrypted analog of Turing completeness. Algorithms for comparison and selection are provably correct (via circuit error bounds), preserve semantic security (no plaintext leakage), and introduce controlled overheads in multiplicative depth and ciphertext expansion.

## 3. Direct Homomorphic Computation in Practice: Schemes and Algorithms

### RLWE/BGV/BFV/CKKS Schemes

- **BFV** and **BGV** support exact polynomial integer arithmetic and batching; ciphertexts are pairs of polynomials over large moduli [2309.06545], [2305.05904]. Homomorphic addition and multiplication correspond to coefficient-wise ring operations, with multiplication requiring relinearization back to the base ciphertext size.
- **CKKS** supports approximate real-number arithmetic, scaling, and batching over polynomials. The scale parameter $\Delta$ enables fixed-point semantics; proper management via rescaling and modulus switching is required for correctness [2503.16080], [1912.11951].

Compiler frameworks (EVA, VERITAS) automate insertion of rescale, modswitch, and relinearize steps, enabling direct encrypted vector and matrix arithmetic to be expressed in familiar SIMD or BLAS idioms, with efficiency loss of only $4$–$12\times$ over double precision BLAS [2503.16080].

### Boolean/Bitwise FHE: TFHE and Bridging

- **TFHE** operates directly on encrypted bits, supporting arbitrary Boolean gates (AND, MUX, CMux, etc.), comparison, and conditional execution. Circuits are compiled to gate sequences with bootstrapping after each gate, yielding high per-gate latency but universal expressivity [2203.02547].
- **Bridging Modular and Bit-Level Arithmetic** augments efficient modular arithmetic (for linear algebra, polynomial ops) with bit-level gates for comparison and control, offering 1–2 orders of magnitude speedup over bit-level computation alone by immediate conversion post-comparison [2204.12201].

### Specialized Primitives for Efficiency

- **Three-Input Multiplication:** Extends two-input multiplication/relinearization in CKKS to three ciphertexts, halving latency and reducing hardware area by $29\%$ with lower noise [2410.13545].
- **Homomorphic Permutation:** Optimization of batch rotations via ideal decomposition reduces key and rotation cost from $O(n)$ to $O(\log n)$ for matrix and neural-network components [2410.21840].

### Quantum Homomorphic Encryption

- **Quantum Annealing via Spin Reversal:** Masking Ising weights and solutions with random flip keys enables direct, full homomorphic computation of QUBO/Ising problems on quantum annealers with no performance penalty; correctness is established algebraically [2009.00111].
- **Quantum Circuits with Classical Keys:** Extension of leveled FHE with Pauli one-time-pad and encrypted gadget gates provides blindness and full-functional delegation for quantum circuits, implementable from LWE-based classical FHE primitives [1708.02130].

## 4. Application Workflows and Practical Implementations

Direct homomorphic computation is realized in numerous real-world pipelines:
- **Encrypted machine learning:** Secure inference, linear regression, decision trees, neural nets (e.g. VGG-9) are evaluated in the ciphertext domain, combining arithmetic and comparison [2504.11604].
- **Statistical analytics:** Mean, variance, and regression over encrypted populations, with additive/multiplicative parallelization exploiting batching and PIM acceleration [2309.06545].
- **Image and signal processing:** Encrypted vector arithmetic (EVA, CKKS) for filtering, feature extraction, and shape analysis.
- **Verifiable Analytics:** Authenticators built atop FHE encode redundancy and challenge slots, enabling client-side verification of outsourced computations (REP, PE encodings) [2207.14071].
- **Topological Data Analysis:** Persistence diagrams via encrypted boundary matrix reduction routines, employing approximate homomorphic comparison and selection [2307.01923].

Hybrid approaches blend modular and bit-level domains, switching at comparison boundaries. Compiler optimizations (EVA, VERITAS) insert cryptographic primitives as needed for noise and modulus alignment [1912.11951], [2207.14071]. Processing-in-memory platforms accelerate polynomial arithmetic, partitioning ciphertexts for massive parallelism; achieving $50–100\times$ speedups in addition-heavy workflows [2309.06545].

## 5. Performance, Complexity, and Trade-offs

Practical evaluation shows that computation universality and efficiency vary sharply by scheme and workload:

| Method              | Nonlinear support | SIMD efficiency | Typical cost scaling      |
|---------------------|------------------|-----------------|--------------------------|
| TFHE (bitwise)      | Full             | None            | $O(2^b)$ per $b$-bit op  |
| HEBridge (encoding-switch) | Full   | High            | $O(d^2\sqrt{p})$ (moderate)|
| CKKS (polynomial approx) | Approximate only | High       | $O(\text{poly degree})$  |

- Bitwise FHE is preferable for control-flow-heavy, non-parallel applications (e.g. sorting, masks).
- Encoding-switching (HEBridge) achieves exact universality with SIMD, dominating graph, tree, and database analytics.
- CKKS polynomial approximations are ideal for deep neural net workloads accepting small errors.

Bootstrapping is only required when circuit depth exceeds parameter bounds. In leveled FHE, correct result up to depth $L$ can be achieved without bootstrapping as long as noise stays below threshold [2305.05904]. Multiplicative depth and ciphertext expansion dictate parameter selection and key sizes.

## 6. Limitations, Controversies, and Research Directions

Challenges persist in:
- Efficient universal non-interactive computation: Exponential cost of scheme-switching and bitwise FHE for large $b$ [2504.11604].
- Encrypted comparison and branching induce ciphertext-size blowup, requiring management strategies for practical ML inference [1810.12380].
- Quantum homomorphic encryption: Key-recovery attacks for multi-use spin masks, leakage in ciphertext structures [2009.00111][1708.02130].
- Stochastic encoding achieves constant-depth arithmetic but is constrained by stream length and bootstrapping overhead in practice [2203.02547].
- Permutation optimization provides asymptotic speed-up but integration in full ML pipelines remains to be validated [2410.21840].
- Conversion between bit-level and modular arithmetic is costly in one direction, requiring workflow adaptation to minimize transitions [2204.12201].

Ongoing research explores function bootstrapping, polynomial LUT evaluation, hardware support for wide multipliers, and compiler-driven parameter scheduling for minimal noise and modulus chains. Increasing parallelism and memory co-location (PIM) are actively developed to accelerate core polynomial ops in practical deployments [2309.06545], [2503.16080].

## 7. Open-source Tools and Implementation Support

Leading libraries support a variety of schemes and API abstractions:
- **HElib:** BGV, GSW, CKKS with bootstrapping
- **SEAL:** BFV, CKKS
- **OpenFHE:** BGV, BFV, CKKS, DM, CGGI
- **TFHE:** fast bit-level gates, torus-based bootstrapping
- **HEAAN:** CKKS-style approximate arithmetic
Compiler frameworks (EVA, VERITAS) and performance benchmarks facilitate direct encrypted computation programming [1912.11951], [2207.14071].

Through judicious scheme selection, parameter tuning, and hybrid workflow adaptation, direct homomorphic computation is now practical for data analytics, AI inference, secure search, federated learning, and privacy-preserving outsourcing in diverse sectors.

Source: https://www.emergentmind.com/topics/direct-homomorphic-computation