Score:1

# How to write a Zero-Knowledge Proof of Knowledge of input to a one-way function?

I'm having a bit of difficulty understanding how to construct Zero-Knowledge proofs. So given a one-way function $$f$$ and a secret message $$x$$ so that $$f(x)=y$$, $$f$$ and $$y$$ being public, how could one construct a simple Zero-Knowledge Proof of Knowledge algorithm proving that one knows $$x$$?

I think I understand how this could be done if the verifier also knows $$x$$, because then they should be able to send random bits to each other and both run them through $$f$$. For example: the prover generates a random message $$r$$ and shares it with the verifier, they both calculate $$f(x+r)=y_r$$, the prover generates a random number $$n$$ and asks if the $$n$$:th bit of $$y_r$$ is a one or a zero. And then repeat all of that until satisfied.

I have no idea, however, how one would start to construct a proof for a verifier without knowledge of $$x$$.

I sit in a Tesla and translated this thread with Ai: