Sorry, I know there are several threads about RSA encryption and how to calculate $d$. But there is a thing I still don't understand. So you calculate $d$ by using the following expression (see here): $$ e \cdot d\equiv 1(mod\ \varphi(N)) $$ The the usual way to proove this (based on $e^{\varphi(N)}\equiv1 (mod\ N)$) is:
$$ m \equiv m^{k\cdot\varphi(N)+1} \equiv (m^{\varphi(N)})^k\cdot m \equiv 1^k\cdot m (mod\ N) $$
There are serveral things I don't understand:
- The Euler theorem only applies, if $m$ and $\varphi(N)$ are coprime (which is not the case here)
- $m^{\varphi(N)} (mod\ N)$ is defnitly not $1$
- Nonetheless: For a defined $k$ the equation $m^{k\cdot \varphi(N)} \equiv 1 (mod\ N)$ seems to be correct. But why is that? And why can you just write $(m^{\varphi(N)})^k \equiv 1 (mod\ N)$, if $k$ can't be an arbitrary number?