A Prefix-Based Homomorphic Encryption Protocol for Efficient Secure Comparison
摘要
Secure comparison protocols are a cornerstone of privacy-preserving computation, with critical applications in e-voting, federated learning, and financial analytics. However, the efficiency of classical protocols like DGK is often hampered by high computation and communication costs. This paper introduces an efficient two-party secure comparison protocol, termed the PSC (Prefix-based Secure Comparison) protocol, based on a variant of the ElGamal homomorphic cryptosystem. The core innovation of PSC is to process each prefix bit string of the input as a single encrypted unit, bypassing the need for costly bit-wise equality checks found in traditional approaches. The protocol determines the comparison result by constructing and analyzing an obfuscated comparison vector for zero-value occurrences. If we denote the bit string length by \(l\) , this method reduces the computational complexity by approximately \(\mathcal {O}(l)\) and minimizes interaction rounds. Experimental evaluations confirm that PSC achieves a significantly lower average running time compared to the DGK protocol and its variants. The results demonstrate that reorganizing the encrypted data model enables substantial efficiency gains in secure comparison without sacrificing security, offering a practical solution for large-scale privacy-preserving tasks.