We present a method for secure pattern matching over encrypted texts using TFHE. Our approach realizes a fully secure binary search algorithm by leveraging two operational modes of integer-input TFHE.While the BGV-based method of Bonte and Iliashenko (CCSW’20) requires O(|P|·|T|) secure character comparisons to find a pattern P in a text T, our method reduces this to O(|P| log |T|) comparisons, achieving improved scalability for large texts. As a result, our method can find a pattern of length 100 in an encrypted text containing genomic data of one million characters in less than 5 min, where prior work would require approximately 5 days for the same task. These results highlight the practicality of TFHE and its potential for large-scale secure string search.



