BoostCom: Towards Efficient Universal Fully Homomorphic Encryption by Boosting the Word-wise Comparisons

Ardhi Wiratama Baskara Yudha, Jiaqi Xue, Qian Lou, Huiyang Zhou, Yan Solihin

Abstract

Fully Homomorphic Encryption (FHE) allows for the execution of computations on encrypted data without the need to decrypt it first, offering significant potential for privacy-preserving computational operations. Emerging arithmetic-based FHE schemes (ar-FHE), like BGV, demonstrate even better performance in word-wise comparison operations over non-arithmetic FHE (na-FHE) schemes, such as TFHE, especially for basic tasks like comparing values, finding maximums, and minimums. This shows the universality of ar-FHE in effectively handling both arithmetic and non-arithmetic operations without the expensive conversion between arithmetic and non-arithmetic FHEs. We refer to universal arithmetic Fully Homomorphic Encryption as uFHE. The arithmetic operations in uFHE remain consistent with those in the original arithmetic FHE, which have seen significant acceleration. However, its non-arithmetic comparison operations differ, are slow, and have not been as thoroughly studied or accelerated. In this paper, we introduce BoostCom, a scheme designed to speed up word-wise comparison operations, enhancing the efficiency of uFHE systems. BoostCom involves a multi-prong optimizations including infrastructure acceleration (Multi-level heterogeneous parallelization and GPU-related improvements), and algorithm-aware optimizations (slot compaction, non-blocking comparison semantic). Together, BoostCom achieves an end-to-end performance improvement of more than an order of magnitude (11.1x faster) compared to the state-of-the-art CPU-based uFHE systems, across various FHE parameters and tasks.

Introduction

Fully Homomorphic Encryption (FHE) is often considered the "holy grail" of data privacy, enabling servers to process encrypted data without ever seeing the underlying content. Historically, FHE schemes were categorized as either arithmetic-based (optimized for addition and multiplication) or non-arithmetic (optimized for logic operations like comparisons). Recent advancements in the BGV scheme have enabled "word-wise" comparisons, creating a Universal FHE (uFHE) capable of both types of operations.

However, a significant bottleneck remains: word-wise comparisons in uFHE are exceptionally slow—often orders of magnitude slower than basic arithmetic. This inefficiency hinders real-world applications such as sorting, private database queries, and neural networks (e.g., ReLU layers). BoostCom addresses this challenge through a combination of multi-level CPU/GPU parallelization and algorithmic optimizations, achieving an average 11.1× end-to-end speedup over existing CPU-based systems.

Methodology

BoostCom employs a multi-prong strategy to accelerate uFHE comparisons, focusing on both infrastructure and algorithm-level enhancements.

Multi-Level Heterogeneous Parallelization

Rather than offloading all tasks to the GPU, BoostCom utilizes a hierarchical approach. Multicore CPUs manage high-level "digit-level" parallelism, while the GPU is reserved for granular, computationally intensive "polynomial-level" operations. This prevents the GPU from being underutilized or bogged down by serial logic.

Multi-level heterogeneous parallelization architecture

GPU-Specific Optimizations

To further boost performance, the authors implemented several GPU-centric improvements:

  • Branch Removal: The BluesteinNTT algorithm was restructured into "offline" and "online" phases to eliminate loop-carried dependencies, enabling massive parallel execution.
  • Plan Reuse: Execution plans for the cuFFT library are created once and reused to minimize overhead.
  • Layout Transformation: A custom mapping technique converts non-contiguous memory into contiguous buffers, maximizing CPU-GPU data transfer speeds.

Algorithm-Aware Enhancements

BoostCom introduces optimizations that leverage the specific structure of FHE data:

  • Slot Compaction: FHE uses Single Instruction, Multiple Data (SIMD) "slots" for parallel processing. Previous operations often leave these slots underutilized. BoostCom’s Slot Manager tracks and "packs" useful data into fewer ciphertexts before comparisons, significantly reducing the total workload.
  • Non-Blocking Semantics: Comparisons can be initiated on helper threads while the main thread continues other tasks, effectively hiding latency through overlapping execution.
Naive vs Optimized Digit Decomposition using the Slot Manager

Evaluation and Results

The framework was evaluated against five diverse benchmarks: sorting 32-bit integers, finding minimum values, a 3-layer MLP for MNIST classification, image recoloring (Img_col), and private database queries (Private_q).

Key Performance Metrics

  • Speedup: BoostCom achieved a geometric mean speedup of 11.1× (peaking at 26.7×) compared to the industry-standard HElib on a 16-core CPU. It also outperformed HE-Booster, a prior GPU accelerator, by 553%.
  • Memory Efficiency: The slot compaction technique reduced memory usage by an average of 29.3%.
  • Scalability: The performance gains became more pronounced as the complexity of encryption parameters increased.

Discussion and Insights

A key finding of this research is the advantage of non-power-of-two (non-PoT) rings. While PoT rings are common in FHE research, non-PoT rings allow for more efficient cyclic slot permutations, which are critical for comparisons. Furthermore, the study highlights that a heterogeneous CPU-GPU split is superior to full GPU offloading, as it avoids the overhead of copying small, serial tasks to the GPU.

Limitations and Future Work

Current limitations include the lack of GPU support for the big-integer libraries required by the Chinese Remainder Theorem (CRT) components of BGV. Additionally, while BoostCom optimizes efficiency, it does not increase the "noise budget" of the underlying FHE scheme. Future work may explore specialized ASIC hardware or further refine the Slot Manager for complex deep learning data flows.

Summary updated

Abstract

Fully Homomorphic Encryption (FHE) allows for the execution of computations on encrypted data without the need to decrypt it first, offering significant potential for privacy-preserving computational operations. Emerging arithmetic-based FHE schemes (ar-FHE), like BGV, demonstrate even better performance in word-wise comparison operations over non-arithmetic FHE (na-FHE) schemes, such as TFHE, especially for basic tasks like comparing values, finding maximums, and minimums. This shows the universality of ar-FHE in effectively handling both arithmetic and non-arithmetic operations without the expensive conversion between arithmetic and non-arithmetic FHEs. We refer to universal arithmetic Fully Homomorphic Encryption as uFHE. The arithmetic operations in uFHE remain consistent with those in the original arithmetic FHE, which have seen significant acceleration. However, its non-arithmetic comparison operations differ, are slow, and have not been as thoroughly studied or accelerated. In this paper, we introduce BoostCom, a scheme designed to speed up word-wise comparison operations, enhancing the efficiency of uFHE systems. BoostCom involves a multi-prong optimizations including infrastructure acceleration (Multi-level heterogeneous parallelization and GPU-related improvements), and algorithm-aware optimizations (slot compaction, non-blocking comparison semantic). Together, BoostCom achieves an end-to-end performance improvement of more than an order of magnitude (11.1x faster) compared to the state-of-the-art CPU-based uFHE systems, across various FHE parameters and tasks.
BibTeX
@inproceedings{yudha2024boostcom,
  author = {Ardhi Wiratama Baskara Yudha and Jiaqi Xue and Qian Lou and Huiyang Zhou and Yan Solihin},
  title = {{BoostCom: Towards Efficient Universal Fully Homomorphic Encryption by Boosting the Word-wise Comparisons}},
  booktitle = {PACT},
  year = {2024},
  url = {https://openreview.net/forum?id=BR6p9zYx87},
}
Figure