Substring Matching Solution 1
This is a solution to a problem discussed at the 2025 research workshop. The goal is to prove that contains as substrings.
Complexity: The number of wires is proportional to:
Let be a random challenge.
Define
and for any string ,
Then for any substring ,
Idea
We have the values . For each , we are given and , and must check:
If we could guarantee that all these come from , we could use a permutation check:
for random .
Problem
There is no guarantee that the “accessed” values are actually among .
You can use merkle tree, and it results in . but we want .
Solution
The idea is to use the same trick as this paper. Maintain version numbers for each .
- Initialize:
-
When accessing :
- Append to write.
- Append to read.
- Increment by 1.
-
At the end, append for each to read.
If the prover is honest, write will be a permutation of read.
Permutation check with versioning
Choose random . Verify:
Since are chosen after the prover commits to read and write, the probability that a malicious prover passes this check without read being a true permutation of write is negligible.
Complexity: The number of wires is proportional to: