Zk-SNARK for String Match

📅 2025-05-20
📈 Citations: 0
Influential: 0
📄 PDF
🤖 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.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Detect sensitive data leaks without revealing private strings
Improve string-matching efficiency using sliding window and hashing
Enable scalable privacy-preserving verification with zk-SNARK proofs
Innovation

Methods, ideas, or system contributions that make the work stand out.

zk-SNARKs for privacy-preserving string matching
Sliding window with Rabin-Karp and Rabin Fingerprint
gnark library for high-performance zk-SNARK proofs
🔎 Similar Papers
No similar papers found.
T
Taobo Liao
Siebel School of Computing and Data Science, University of Illinois Urbana-Champaign
Taoran Li
Taoran Li
Master student, University of Illinois Urbana-Champaign
Trustworthy MLAI Safety