I have a follow-up question about the extended Euclidean algorithm, as applied to RSA key generation, described in this answer.
Let us say we have $p=5$, $q=11$ and $e=17$, so that $N=55$ and $φ(N)=40$.
We can verify that $\gcd(e, φ(N)) = 1$, so $e$ is a valid encryption exponent.
Now the answer says we should use the extended Euclidean algorithm to find $x$ and $y$ such that $e \cdot x + φ(N) \cdot y = 1$, so that $e \cdot x \equiv 1 \pmod{φ(N)}$, and then let the decryption exponent be $d = x$.
By applying the extended Euclidean algorithm, we find that $x = -7$.
My first question is, how come $17 \cdot (-7) \equiv 1 \pmod{φ(N)}$?
Also, in the answer I linked to above, it says:
"The value of $y$ does not actually matter, since it will get eliminated modulo $φ(n)$ regardless of its value. The EED will give you that value, but you can safely discard it."
I'm not sure what this is supposed to mean. Could someone please explain it more clearly?