I am trying to get a better understanding of RSA. At the moment I am unable to understand the difference between the correctly chosen value of the public exponent $e$ and other possibilities (preferably with a intuitive concept behind rather than only a proof)
We have $p$ and $q$ which are prime and produce the product $n=pq$. Then the number $\phi = (p-1)(q-1)$ is generated. The public exponent $e$ is chosen so that $\text{gcd}(e,\phi) = 1$ ($e$ must not be a number that divides neatly into e and into (p-1)(q-1), except for 1). Why do we use $\phi$ and not $n$? Where does the need for this new number arise and $n$ is not supposed to be used? And why must $e$ not be a factor of $\phi$? What would result if we did choose $e$ as another number?
I don't understand where this constraint comes from. What is the property of $\phi$ that is created by this restriction? Is there an easy to understand intuition behind it?
$\newcommand{\Z}{\mathbb{Z}}$$\renewcommand{\phi}{\varphi}$I am expanding on the comment of @mixedmath
If $\gcd(e, \phi(n)) > 1$, then the function $\Z_{n} \to \Z_{n}$ given by $x \mapsto x^{e}$ is not injective. Thus there are two different messages $x \ne y$ that are mapped onto the same $x^{e} = y^{e}$, and there it goes any possibility of (uniquely) recovering the orginal message.
To see this, suppose $r$ is a prime divisor of $\gcd(e, \phi(n)) > 1$. Then $r$ divides the order $\phi(n)$ of the group $G$ of invertible elements of $\Z_{n}$. Take $x$ to be an element of order $r$ in $G$. Then $x \ne 1$, but $x^{r} = 1$. Since $r$ also divides $e$, we have $x^{e} = 1 = 1^{e}$.