USENIX Security2025Top-tier venue
Efficient Ranking, Order Statistics, and Sorting under CKKS
Federico Mazzone, Maarten H. Everts, Florian Hahn, Andreas Peter
Abstract
Fully Homomorphic Encryption (FHE) enables operations on encrypted data, making it extremely useful for privacy-preserving applications, especially in cloud computing environments. In such contexts, operations like ranking, order statistics, and sorting are fundamental functionalities often required for database queries or as building blocks of larger protocols. However, the high computational overhead and limited native operations of FHE pose significant challenges for an efficient implementation of these tasks. These challenges are exacerbated by the fact that all these functionalities are based on comparing elements, which is a severely expensive operation under encryption. Previous solutions have typically based their designs on swap-based techniques, where two elements are conditionally swapped based on the results of their comparison. These methods aim to reduce the primary computational bottleneck: the comparison depth, which is the number of non-parallelizable homomorphic comparisons in the algorithm. The current state of the art solution for sorting by Hong et al. (IEEE TIFS 2021), for instance, achieves a comparison depth of k log_k^2 N. In this paper, we address the challenge of reducing the comparison depth by shifting away from the swap-based paradigm. We present solutions for ranking, order statistics, and sorting, that achieve a comparison depth of up to 2 (constant), making our approach highly parallelizable and suitable for hardware acceleration. Leveraging the SIMD capabilities of the CKKS FHE scheme, our approach re-encodes the input vector under encryption to allow for simultaneous comparisons of all elements with each other. Experimental results show that our approach ranks a 128-element vector in approximately 5.76s, computes its argmin/argmax in 12.83s, and sorts it in 78.64s.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8fc3b87d-664a-460a-9783-bf2b04c63431Cited by top-tier papers3
- Reliable Non-Leveled Homomorphic Encryption for Web ServicesBaigang Chen, Dongfang ZhaoWWW 2026 · 1 citation
- Hyperion: Private Token Sampling with Homomorphic EncryptionLawrence Lim, Jiaming Liu, Vikas Kalagi, Divyakant Agrawal et al.ACL 2026 · 1 citation
- Revisiting ML Training under Fully Homomorphic Encryption: Convergence Guarantees, Differential Privacy, and Efficient AlgorithmsYvonne Zhou, Mingyu Liang, Ivan Brugere, Danial Dervovic et al.ICML 2026
Builds on4
- PEGASUS: Bridging Polynomial and Non-polynomial Evaluations in Homomorphic EncryptionWen-jie Lu, Zhicong Huang, Cheng Hong, Yiping Ma et al.S&P 2021 · 139 citations
- Using Fully Homomorphic Encryption for Statistical Analysis of Categorical, Ordinal and Numerical DataWenjie Lu, Shohei Kawasaki, Jun SakumaNDSS 2017 · 105 citations
- Private and Reliable Neural Network InferenceNikola Jovanovic, Marc Fischer, Samuel Steffen, Martin T. VechevCCS 2022 · 16 citations
- Secure Transformer Inference Made Non-interactiveJiawen Zhang, Xinpeng Yang, Lipeng He, Kejia Chen et al.NDSS 2025
Related papers
- EFFACT: A Highly Efficient Full-Stack FHE Acceleration PlatformYi Huang, Xinsheng Gong, Xiangyu Kong, Dibei Chen et al.HPCA 2025 · 10 citations
- HE3DB: An Efficient and Elastic Encrypted Database Via Arithmetic-And-Logic Fully Homomorphic EncryptionSong Bian, Zhou Zhang, Haowen Pan, Ran Mao et al.CCS 2023 · 46 citations
- Efficient Arithmetic-and-Comparison Homomorphic Encryption with Space SwitchingErwin Eko Wahyudi, Yan Solihin, Qian LouS&P 2026
- BitPacker: Enabling High Arithmetic Efficiency in Fully Homomorphic Encryption AcceleratorsNikola Samardzic, Daniel SánchezASPLOS 2024 · 19 citations
- Engorgio: An Arbitrary-Precision Unbounded-Size Hybrid Encrypted Database via Quantized Fully Homomorphic EncryptionSong Bian, Haowen Pan, Jiaqi Hu, Zhou Zhang et al.USENIX Security 2025
