# Modulo exponentiation invertibility [duplicate]

Under which condition is $f : x \mapsto x^e \mod n$ invertible?

I mean, for each distinct $x \in \{0, 1, 2, \ldots, n-1\}$ the result is distinct?

Is that $e$ must be coprime with the totient of $n$ ($\varphi(n)$)?

I read several articles on RSA, but this point is still not clear to me.

• I am not 100% sure what you are asking for, could you please state the equation that relates the input and the inverse? – SEJPM Aug 15 '17 at 18:57
• @SEJPM I think it is: "When is the map $\mathbb Z/n\to\mathbb Z/n$ given by $x\mapsto x^e$ a bijection?" – yyyyyyy Aug 15 '17 at 18:59
• I disagree this is an exact duplicate. In particular, the condition thought is NOT that $e$ must be coprime with the totient of $n$. We also need that $n$ is squarefree. – fgrieu Aug 16 '17 at 13:47