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.

  • $\begingroup$ I am not 100% sure what you are asking for, could you please state the equation that relates the input and the inverse? $\endgroup$ – SEJPM Aug 15 '17 at 18:57
  • 3
    $\begingroup$ @SEJPM I think it is: "When is the map $\mathbb Z/n\to\mathbb Z/n$ given by $x\mapsto x^e$ a bijection?" $\endgroup$ – yyyyyyy Aug 15 '17 at 18:59
  • $\begingroup$ 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. $\endgroup$ – fgrieu Aug 16 '17 at 13:47

Browse other questions tagged or ask your own question.