arXiv:2610.18391cs.CROct 2026

Manuscript Offprint

arXiv:2610.18391

HULK: An Efficient Algorithm for Enabling Fast Bulk Bitwise Operations on Homomorphically Encrypted Data

Mayank Kabra, Phillip Widdowson, Harshita Gupta, Rakesh Nadig, Nisa Bostancı, Eirini Tzermpou, Rakesh Kumar, Spiros Galanopoulos, Ataberk Olgun, Abdullah Giray Yağlıkçı, Mohammad Sadrosadati, Onur Mutlu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Mayank Kabra 1^{1} Phillip Widdowson 1^{1} Harshita Gupta 1^{1} Rakesh Nadig 1^{1} Nisa Bostanci 1^{1}

Eirini Tzermpou 1^{1} Rakesh Kumar 2^{2} Spiros Galanopoulos 1^{1} Ataberk Olgun 1^{1}

Abdullah Giray Yağlıkçı 3^{3} Mohammad Sadrosadati 1^{1} Onur Mutlu 1^{1}

1^{1}ETH Zürich 2^{2}NTNU 3^{3}CISPA

A wide range of important cloud applications, e.g., database analytics, graph analytics, and genome analysis, spend a considerable amount of time performing bulk bitwise operations (e.g., AND, OR, XOR). These applications often operate on highly sensitive data, making data privacy a critical concern. Homomorphic encryption (HE) enables secure computation on encrypted data without requiring decryption, ensuring privacy in untrusted and shared environments. We analyze 13 end-to-end applications across three domains (healthcare, graph, and database analytics) and observe that bulk bitwise operations take 62–100% of the execution time of the healthcare and graph workloads. The key problem is that existing HE approaches perform them with high-latency homomorphic operations (e.g., multiplication or lookup tables) and significantly increase the data size.

Our goal is to enable fast bulk bitwise operations on homomorphically encrypted data by designing an efficient HE algorithm that reduces the use of these costly operations in end-to-end applications. To this end, we propose HULK, a new algorithm for fast bulk bitwise operations on homomorphically encrypted data. HULK performs two key steps: (1) it constructs bulk bitwise operations using low-cost homomorphic additions, which compute the Hamming weight of the encrypted operand bits in every slot of a packed ciphertext without any homomorphic multiplication, and (2) it decodes the result of an AND, OR, or XOR from the Hamming weight with a single indicator polynomial, keeping the result in the standard encoding.

We evaluate HULK on 13 real-world end-to-end applications against the arithmetic approach used by prior works. Across three application domains (i.e., encrypted healthcare, graph, and database analytics), HULK improves performance by up to 7.26×7.26 \times (CPU) and 6.65×6.65 \times (GPU), and on average by 2.32×/1.78×/1.45×2.32 \times /1.78 \times /1.45 \times (CPU) and 2.08×/1.70×/1.51×2.08 \times /1.70 \times /1.51 \times (GPU) for healthcare/graph/database analytics. We further study the scalability of HULK, increasing the reduction depth in a representative end-to-end application. We demonstrate that HULK's performance scales, achieving up to a 10.10×10.10 \times speedup over the state-of-the-art GPU baseline.

1. Introduction

A wide range of cloud applications (e.g., data analytics [1–39], graph processing [40–59], and genome analysis [60–96]) often operate on highly sensitive data, such as personal health records and financial information, making data privacy a critical concern. In conventional systems, data is generally stored in an encrypted format (e.g., using AES [97]) but must be decrypted before computation, exposing sensitive information in untrusted or shared environments [97–109]. Homomorphic encryption (HE) [110–142] addresses this limitation by enabling computations directly on encrypted data without decryption (§2). HE performance depends on which homomorphic operations an application uses, whose latencies differ by orders of magnitude (e.g., addition vs. multiplication). Prior works (e.g., [143–145]) propose new HE algorithms and data encodings for improving the performance of these cloud applications. Several works (e.g., [146–148]) propose efficient HE-based string matching via improved data encodings, while other works such as ArcEDB [149], HE3DB [150], NSHEDB [151], and Engorgio [152] optimize homomorphic sorting and comparison for operators such as sort/join (§3).

Despite these algorithmic advances, we identify a key problem that highlights an opportunity for further performance improvement. Our analysis of 13 workloads across three application classes (database, healthcare, and graph analytics) shows that these applications spend a considerable amount of time (62.0–100% of the execution time of the healthcare and graph workloads) performing bulk bitwise operations on homomorphically encrypted data, which remains a major overhead. A bulk bitwise operation applies one wide Boolean function (e.g., an AND, OR, XOR, or threshold over many input bits) independently to every record of a large dataset, which maps directly onto the SIMD slots of batched ciphertexts. For example, genome analysis such as private k-mer based pathogen screening [153] encodes each DNA base in two bits, so matching a 31-base sequencing read against a reference k-mer is one wide bulk bitwise AND over all 2×31=622 \times 31 = 62 homomorphically encrypted bits (AND-62); the test is repeated for each of 16 reference k-mers and the results are combined with an OR-16. With one read per ciphertext slot 1^{1}, a single evaluation screens 32,768 reads against all 16 references, where the arithmetic approach spends 991 HMuls (Table 4).

Key Problem. Unfortunately, existing HE schemes express bitwise operations using expensive homomorphic operations (e.g., lookup table (LUT) evaluation or multiplication), resulting in high latency when executed in bulk. Existing HE schemes ex-

1^{1}A B/FV ciphertext packs N values into N independent slots, and each homomorphic operation acts on all slots at once ( §2.1.2§2.1.2).

press bitwise operations either using (1) the Boolean [154–156], or (2) the arithmetic [157–159] approach. The Boolean approach supports bit-level logic and arbitrary Boolean circuits via LUT evaluation. The arithmetic approach supports homomorphic addition and multiplication, which are used to construct homomorphic bitwise operations. For example, the AND can be implemented as a⋅ba \cdot b and OR as a+b−a⋅ba + b - a \cdot b, where ⋅\cdot is homomorphic multiplication and ++, −- are homomorphic addition/subtraction ( §5\S5). LUT evaluation and homomorphic multiplication incur significant latency overheads, i.e., they are 104−105×10^{4}-10^{5} \times slower than unencrypted CPU execution [160] due to their high computational cost and large memory footprint ( §5\S5), whereas homomorphic addition is orders of magnitude cheaper.

Our goal is to enable fast bulk bitwise operations on homomorphically encrypted data by designing an efficient algorithm that reduces reliance on high-latency homomorphic operations in end-to-end applications. To this end, we propose HULK, 2^{2} whose key idea is to construct the bulk bitwise operations, which are prevalent in many applications, as a sequence of low-cost homomorphic additions that reduces the need for costly homomorphic operations (e.g., homomorphic multiplications), thereby improving the performance of HE-based applications.

The key insight behind HULK is that in many applications, bulk bitwise operations follow a sequence of the form a1⋆a2⋆…⋆ana_1 \star a_2 \star \ldots \star a_n, where ⋆\star is a bitwise operation (AND/OR/XOR). This form constitutes the class of symmetric Boolean functions [99] whose output depends only on the Hamming weight of the inputs (i.e., the number of 1s), not on their arrangement. As such, for bits a,b∈{0,1}a, b \in \{0, 1\}, the sum a+b∈{0,1,2}a + b \in \{0, 1, 2\} places a⊕ba \oplus b (XOR) in its low-order bit and a⋅ba \cdot b (AND) in its high-order (carry) bit. For example, a&b&c&da \& b \& c \& d is computed as a+b+c+da + b + c + d: the sum reaches 4 only when all four bits are 1, which for four inputs is exactly its most-significant bit ( §6\S6).

Key Mechanisms. HULK leverages the above key insight in two steps. First, HULK encodes each bitvector using one bit per ciphertext slot and adds the encrypted operands with homomorphic addition, which computes the Hamming weight in every slot without any homomorphic multiplication ( §6.1§6.1 and §6.1.1§6.1.1). Second, HULK decodes the Boolean result from the Hamming weight with a single indicator polynomial, which the server evaluates under encryption, so that the result returns to the standard arithmetic encoding and supports applications with mixed bitwise and arithmetic operations (e.g., aggregation or popcount) ( §6.2.2§6.2.2). This indicator is cheap because it evaluates one polynomial of the sum, which needs only O(K)O(\sqrt{K}) HMuls instead of the K−1K-1 of the product tree (e.g., 3 instead of 7 for K=8K=8). When revealing the Hamming weight is acceptable, the client can read the result directly ( §6.2.1§6.2.1).

Key Results. We compare HULK against the arithmetic approach implemented with Microsoft SEAL [161] (CPU) and HEonGPU [162] (GPU) (§7). First, across 13 end-to-end applications, HULK improves performance by up to 7.26×7.26 \times (CPU) and 6.65×6.65 \times (GPU), and on average by 2.32×/1.78×/1.45×2.32 \times /1.78 \times /1.45 \times (CPU) and 2.08×/1.70×/1.51×2.08 \times /1.70 \times /1.51 \times (GPU) for healthcare/graph/database analytics (§8.2). The six database filter-and-aggregate queries gain only 1.01−1.31×1.01 - 1.31 \times (CPU), because homomorphic comparison, which both approaches share, dominates them, whereas encrypted top-10 ranking gains 2.00×2.00 \times (CPU). Second, when the client may learn the Hamming weight, client-side decoding removes the indicator entirely: on a microbenchmark that isolates one bulk AND, HULK improves performance by 390.6−2002.2×390.6 - 2002.2 \times (CPU) as the reduction depth increases (§8.1); this microbenchmark is not an end-to-end speedup. Third, a sensitivity study of bit-sliced PSI [163, 164] shows that HULK's speedup grows with the reduction depth, up to 10.10×10.10 \times on the GPU (§8.3). Fourth, two further optimizations extend these gains: memory-efficient data packing accelerates addition-only bulk bitwise kernels by 58.9−227.0×58.9 - 227.0 \times (CPU), because it converts the bulk of the bitwise logic into a sequence of low-cost homomorphic additions, and on top of encrypted bitmap indices used in databases, HULK accelerates database queries by a further 1.32×1.32 \times on average (§9).

This work makes the following key contributions:

○ We propose HULK, which significantly accelerates applications that use HE-based bulk bitwise operations.

To our knowledge, HULK is the first work to evaluate wide bit-sliced AND, OR, and XOR reductions in packed B/FV by adding the operand bits slot-wise and decoding their Hamming weight with a single indicator, which keeps the result in the standard slot encoding and reduces the use of homomorphic multiplication across end-to-end applications ( §4.2§4.2 shows that our baseline, the product tree of packed arithmetic B/FV, is faster than four families of prior approaches).

HULK supports efficient conversion between its encoding and the standard arithmetic HE encoding using indicator evaluation (i.e., bit-extraction), enabling integration into end-to-end applications and improving overall performance.

We evaluate HULK on 13 end-to-end applications on real CPU and GPU systems, where it improves performance by up to 7.26×7.26\times. We further show its benefit with client-side decoding, its scaling with the reduction depth in a PSI sensitivity study, and two further optimizations: memory-efficient data packing and encrypted bitmap indices. 3^{3}

References (100)

Couldn't load all references. Reload the page to try again.