Table of Contents
Fetching ...

Hermes: Bridging Relational and Algebraic Abstractions in Homomorphically Encrypted Databases

Dongfang Zhao

Abstract

Fully Homomorphic Encryption (FHE) promises the ability to compute over encrypted data without revealing sensitive contents. Yet, integrating it into real-world relational databases remains elusive due to prohibitive performance overhead and the structural mismatch between mutable database records and static ciphertexts. This paper presents Hermes, a system that enables homomorphically encrypted vectorized relational queries directly inside a standard SQL engine. To bridge the relational and algebraic abstractions, Hermes introduces a SIMD-aware data model that packs multiple records per ciphertext. By embedding precomputed aggregate statistics alongside data slots, the system supports efficient rotation-free aggregations. Furthermore, to overcome ciphertext immutability, we develop data-oblivious homomorphic algorithms based on slot masking and shifting, enabling secure in-place record modifications. Hermes is implemented as native loadable functions in MySQL, marking the first practical integration of FHE into an industrial-grade relational database engine. Extensive evaluations across diverse datasets demonstrate an over 3400x increase in encryption throughput, an over 4000x speedup for tuple insertions, and a 300x acceleration for deletions when compared to conventional scalar FHE implementations.

Hermes: Bridging Relational and Algebraic Abstractions in Homomorphically Encrypted Databases

Abstract

Fully Homomorphic Encryption (FHE) promises the ability to compute over encrypted data without revealing sensitive contents. Yet, integrating it into real-world relational databases remains elusive due to prohibitive performance overhead and the structural mismatch between mutable database records and static ciphertexts. This paper presents Hermes, a system that enables homomorphically encrypted vectorized relational queries directly inside a standard SQL engine. To bridge the relational and algebraic abstractions, Hermes introduces a SIMD-aware data model that packs multiple records per ciphertext. By embedding precomputed aggregate statistics alongside data slots, the system supports efficient rotation-free aggregations. Furthermore, to overcome ciphertext immutability, we develop data-oblivious homomorphic algorithms based on slot masking and shifting, enabling secure in-place record modifications. Hermes is implemented as native loadable functions in MySQL, marking the first practical integration of FHE into an industrial-grade relational database engine. Extensive evaluations across diverse datasets demonstrate an over 3400x increase in encryption throughput, an over 4000x speedup for tuple insertions, and a 300x acceleration for deletions when compared to conventional scalar FHE implementations.

Paper Structure

This paper contains 47 sections, 6 theorems, 18 equations, 5 figures.

Key Result

lemma 1

Let $\mathcal{C}$ be the set of ciphertexts generated and manipulated by Hermes. Then under the assumption that the base FHE scheme (BFV) is IND-CPA secure, the ciphertext $c \in \mathcal{C}$ remains IND-CPA secure throughout all operations in Hermes.

Figures (5)

  • Figure 1: Encryption throughput and absolute time comparison across three datasets.
  • Figure 2: Amortized in-place insertion latency per tuple across three evaluation datasets.
  • Figure 3: Amortized in-place deletion latency per tuple across three evaluation datasets.
  • Figure 4: Cryptographic query microbenchmarks.
  • Figure 5: Performance scalability of Hermes across varying packing scales from 128 to 4096 slots.

Theorems & Definitions (8)

  • definition 1: IND-CPA Security
  • lemma 1
  • definition 2: Slot Update Indistinguishability Game
  • theorem 1
  • theorem 2
  • lemma 2
  • theorem 3
  • theorem 4