A one-way function is a function that can be calculated in polynomial time, but does not have the correct inverse, which can be calculated in polynomial time. If f is a one-way function, you can choose the argument x , the size of which is determined by the complexity setting, calculate y = fx and ask the user to constructively prove that y is in the image f .
It is not so easy. No one knows if there are any one-way functions. Most people believe that there is, but evidence that, if true, is known is at least as difficult as proving P /= NP . However, there is a ray of light! People managed to build functions with the strange property that if some functions are one-way, then it should be. Thus, you can choose such a function and be sure enough that you will offer quite complex problems. Unfortunately, I believe that all known universal one-way functions are pretty unpleasant. Therefore, it will most likely be difficult for you to code them, and your users will most likely find even the simplest proofs too complex. So, from a practical point of view, you might be better off choosing something like a cryptographic hash function that is not so complete as to be truly one-sided, but which will undoubtedly be difficult to crack a person.
source share