If I understand this relation correctly is, that any function whose inverse can be found in polynomial time is not a one way function. The $P = NP$ proved would cause that any candidate for a one-way function could be computed in polynomial time (so $O(n^k))$, thus it would make one-way functions non existent?
Does that mean that a one way function would be such a function whose inverse would be found in $NP$ time ?
Is my understanding correct?
If f is a one-way function, then the inversion of f would be a problem whose output is hard to compute (by definition) but easy to check (just by computing f on it). Thus, the existence of a one-way function implies that FP≠FNP, which in turn implies that P≠NP. However, P≠NP does not imply the existence of one-way functions.
$\endgroup$Note that, by this definition, the function must be "hard to invert" in the average-case, rather than worst-case sense. This is different from much of complexity theory (e.g., NP-hardness), where the term "hard" is meant in the worst-case. That is why even if some candidates for one-way functions (described below) are known to be NP-complete, it does not imply their one-wayness. The latter property is only based on the lack of known algorithm to solve the problem.
$\endgroup$