I am learning mathematics for computer science on OpenCourseWare.
Encryption: The message m can be any integer in the set $\{0,1,2,\dots,p−1\}$; in particular, the message is no longer required to be a prime. The sender encrypts the message $m$ to produce $m^∗$ by computing: $$m^∗ = \operatorname{remainder}(mk,p).$$
Multiplicative inverses are the key to decryption in Turing’s code. Specfically, we can recover the original message by multiplying the encoded message by the inverse of the key: \begin{align*} m*k^{-1} &\cong \operatorname{remainder}(mk,p) k^{-1} && \text{(the def. (14.8) of $m^*$)} \\ &\cong (mk) k{^-1} \pmod p && \text{(by Cor. 14.5.2)} \\ &\cong m \pmod p. \end{align*} This shows that $m*k^{-1}$ is congruent to the original message $m$. Since $m$ was in the range $0,1,\dots,p-1$, we can recover it exactly by taking a remainder
Second last step with how $k$ and $k^{-1}$ is 1 since $k$ and $k^{-1}$ are not multiplicative inverse but modulo $p$ inverse.
$p|(k-k^{-1})-1$, hence you cant just write $k*k^{-1}$ as $1$.
Is there anything that I am missing?
Thanks. P.S. Sorry i had to copy parts of text from a different question.
You are working in the ring of integers $\bmod p$. Although the message need not be prime, the modulus should be. In that case every integer not divisible by $p$ has an inverse-the ring is actually a field. In that ring (field) $kk^{-1}$ does equal $1$