RSA attack excercise
You could check, if $e\cdot d\equiv 1 (\bmod z)$. [1] Since your $z=\phi(n)$ and you want to do something like $(m^e)^d \bmod n= m^{ed} \bmod n \overset{!}{\equiv} m$. Therefore, $ed\equiv 1 (\bmod z)$

For decryption check cryptool. [2]

[1] https://en.wikipedia.org/wiki/Fermat%27s_little_theorem#Generalizations
[2] https://www.cryptool.org/