Extending homomorphic algorithms for encrypted text comparison
摘要
Fully Homomorphic Encryption (FHE) enables computation on encrypted data without revealing its content, offering strong privacy guarantees for sensitive applications. Despite its potential, current FHE libraries lack native support for string operations, limiting their applicability in domains where textual data is prevalent. This paper introduces a novel algorithm for encrypted string comparison that allows the detection of matches between a query string and a target string, both encrypted under an FHE scheme. The ability to perform private string search is crucial in scenarios where sensitive identifiers must be searched without exposing either the query or the database contents. The proposed algorithm operates entirely within the encrypted domain, preserving data confidentiality throughout the process and avoiding leakage through access patterns or interaction. This work describes the design of the algorithm, proposes an implementation compatible with existing FHE frameworks, and validates its correctness and performance through experimental evaluation. The results obtained demonstrate the feasibility of secure and efficient string matching in homomorphically encrypted environments, addressing a critical limitation in current FHE-based solutions and paving the way for privacy-preserving search capabilities in real-world applications.