# Quesstion:

Suppose Peggy claims to have a Turing Machine (TM) such that when the tape starts with I the machine will halt with tape O for one or more (I, O) pairs.

Peggy would like to prove to Victor that she know the TM, but would like to convince him via a Zero-Knowledge Proof (ZKP).

Is there an algorithm $$\Pi$$ that Peggy and Victor can run that will accomplish this? If so what is it?

# Example:

Let's say that I write a function $$f(x)$$ in some programming language. Now I would like to prove to you that $$\forall x f(x) = 2 x^2-x+5$$ but I don't want to disclose any information about the source code. (I know that this is a silly example but you could imagine that $$f(x)$$ is a much more complicated function)

# Ideas:

Maybe there is a way to convert this into another problem that we have a algorithm to proof in zero-knowledge

# Clarifications:

Let's start with an application for an example.

Peggy is a student and Victor is a teacher. Victor assigns a homework in which Peggy is supposed to design a TM to compute some function, $$f(x)$$. Peggy designs a very elegant solution and no longer wants to disclose her TM to Victor. (Maybe Peggy is afraid that Victor will steal her idea) Instead she wants to convince him that she did the assignment via a ZKP so she can get credit.

Another example is proprietary software. A company wants to convince its users that their software does what the users expects it to so. One popular solution is currently to release the software (e.g. open-source), but this allows anyone to easily steal the software. An alternate could be to provide a ZKP that the software satisfies certain properties.

What information do Peggy and Victor have?

• Peggy and Victor know all the (I,O) pairs.
• Peggy knows some TM such that $$\forall i \forall o ((i \in {\bf I} \wedge o \in {\bf O}) \rightarrow {\bf TM}(i) = o)$$
• Algorithm $$\Pi$$ should ideally run in polynomial time of the runtime of the TM
• Ideally Victor should not learn the number of states of the TM or the number of steps needed to compute the function, but if there is an algorithm that works except for these properties that would still be great.
• Learning some upper bound of the number of states or runtime is fine though
• If needed Peggy and Victor have access to a Random Oracle
• Victor hands Peggy several input combinations, and Peggy hands Victor the output that shows the TM halted. Peggy continues this exchange until Victor is satisfied. This probably isn't the best example, but hopefully it gives some context for those better able to answer than I. Also, please state whether this is a homework assignment or not, and please include the work you've done to try answering your own question. Commented Jun 8, 2017 at 18:51
• @floorcat: that is not a solution; it's not zero knowledge (in that Victor learns the output of several inputs), and in addition, there's nothing preventing Peggy from making up the outputs (rather than running the TM) Commented Jun 8, 2017 at 19:10
• If the list of (I, O) pairs is finite, and if the list is public (known to both Peggy and Victor), then Peggy needn't prove anything; it's trivial to put together a turing machine that does a fixed mapping, and so she needn't prove anything. So, how are you going to extend what Peggy needs to prove in order to make this nontrivial? Commented Jun 8, 2017 at 21:11
• @poncho I assumed Victor would know whether his input is valid or not, and what the expected output is. The analogy I'm working from is as if Victor hands Peggy two cans, one of coca cola and the other pepsi as a way to challenge if Peggy can taste the difference. Along these lines, Victor is able to give inputs to Peggy which he knows will not halt, as a way to test Peggy's claims. Commented Jun 8, 2017 at 21:19
• @floorcat: This is not an assignment, I came up with this on my own. Commented Jun 10, 2017 at 0:06

In principle, any language in NP can be proven in zero knowledge. Furthermore, any language in NP can be proven with a zero knowledge proof of knowledge. Thus, in order to answer your question, the only issue remaining is whether or not the language you have defined is in NP. In order to verify this, one needs to define a relation that can be verified in polynomial time. The way you have formalized the question is such that this is not the case. In particular, you have not included a requirement that the machine run in polynomial time. However, even if you do add this, it has to be done carefully. If you define: $(I,O)\in L$ iff there exists a polynomial time TM $M$ such that $M(I)=O$, then what you are really writing is $(I,O)\in L$ iff there exists a polynomial $q$ and a TM $M$ that runs in time $q(|x|)$ upon input $x$ such that $M(I)=O$. However, in this case there is no fixed polynomial-time upper bound on the running-time of the verifier (since the polynomial $q$ in the witness can be any polynomial). This can be solved by either defining the language $L_q$ to be $(I,O)\in L_q$ iff there exists a TM $M$ running in time $q$ such that $M(I)=O$. Alternatively, one can define $(I,O,1^t)\in L$ iff there exists a TM $M$ such that $M(I)$ outputs $O$ within $t$ steps. Since these languages are in NP, you can prove a zero-knowledge proof of knowledge and get what you want.
I note that in fact any language in $IP=PSPACE$ can be proven in zero knowledge, but then the proof isn't efficient.
• If Peggy needs to declare $q$, it's not zero-knowledge... Commented Jun 9, 2017 at 16:33
• If $q$ is part of the language definition then it is zero knowledge. Commented Jun 11, 2017 at 5:19