High Quality Content by WIKIPEDIA articles! In computer science, a one-way function is a function that is easy to compute on every input, but hard to invert given the image of a random input. Here "easy" and "hard" are to be understood in the sense of computational complexity theory, specifically the theory of polynomial time problems. The existence of such one-way functions is still an open conjecture. In fact, their existence would prove that the complexity classes P and NP are distinct, thus resolving the foremost unsolved question of theoretical computer science.