Can a One way function also be its inverse? This is from my homework:


Prove that if there exists a one-way function, then there exists a one-way function f such that 

$f(0^n ) = 0^n$ for every $n$.

Note that now for infinitely many values $y$, it is trivial to compute $f^{−1}(y)$.


While I don't expect someone to spell the answer out for me, setting f as the inverse function, we can say the inverse exists. As a result, it is not a one-way function.
One-way function doesn't mean that it's impossible to reverse on EVERY output.
One-way function means that's it's hard to invert on an output picked at random over the set of the outputs.

You can read in more details the definitions given in the following link:

https://crypto.stanford.edu/pbc/notes/crypto/oneway.html