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.
翻译:全同态加密(FHE)技术承诺能够在不解密的情况下对加密数据进行计算,从而避免敏感内容泄露。然而,由于难以承受的性能开销以及可变数据库记录与静态密文之间的结构不匹配,将其集成到实际的关系型数据库中仍面临挑战。本文提出Hermes系统,该系统能够在标准SQL引擎内部直接执行同态加密的向量化关系查询。为弥合关系型与代数抽象之间的差异,Hermes引入了一种支持SIMD操作的数据模型,将多条记录打包至单个密文中。通过在数据槽旁嵌入预计算的聚合统计信息,系统实现了无需旋转操作的高效聚合计算。此外,为克服密文不可变性,我们基于槽掩码与移位技术开发了数据不可知的同态算法,从而支持安全的原地记录修改。Hermes以原生可加载函数的形式在MySQL中实现,标志着FHE首次被实际集成至工业级关系型数据库引擎。在多类数据集上的广泛实验表明,与传统标量FHE实现相比,系统在加密吞吐量上提升超过3400倍,元组插入操作加速超过4000倍,删除操作加速达300倍。