🤖 AI Summary
This paper addresses the privacy-sensitive problem of detecting whether a sensitive string appears on public platforms without revealing the string itself. We propose a zero-knowledge string matching scheme that enables verifiable, trustless privacy-preserving matching. Methodologically, we pioneer the integration of zk-SNARKs (implemented via gnark) with a sliding-window variant of the Rabin–Karp rolling hash—specifically employing Rabin fingerprints—to jointly achieve efficiency and soundness. Our key contribution lies in optimizing circuit size via hash rolling, drastically reducing zk-SNARK proof generation overhead; theoretically, the time complexity is reduced to *O(n)*, and experiments confirm millisecond-scale verification latency even on million-character texts. The scheme guarantees strong privacy (full zero-knowledge leakage protection for the input string), high efficiency, and excellent scalability—constituting the first practical zero-knowledge framework for string matching in data leak monitoring.
📝 Abstract
We present a secure and efficient string-matching platform leveraging zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) to address the challenge of detecting sensitive information leakage while preserving data privacy. Our solution enables organizations to verify whether private strings appear on public platforms without disclosing the strings themselves. To achieve computational efficiency, we integrate a sliding window technique with the Rabin-Karp algorithm and Rabin Fingerprint, enabling hash-based rolling comparisons to detect string matches. This approach significantly reduces time complexity compared to traditional character-by-character comparisons. We implement the proposed system using gnark, a high-performance zk-SNARK library, which generates succinct and verifiable proofs for privacy-preserving string matching. Experimental results demonstrate that our solution achieves strong privacy guarantees while maintaining computational efficiency and scalability. This work highlights the practical applications of zero-knowledge proofs in secure data verification and contributes a scalable method for privacy-preserving string matching.