Part 1
How can Bob decrypt the message?
Bob can decrypt the message by multiplying the inverse of the 3-by-3 secret matrix with the coded message.
Part 2
Can Eve decrypt the message without finding the inverse of the secret matrix?
The asnwer is "no." She can find the inverse of the secret matrix from the intercepted message.
The coded and decrypted message can be arranged in a 3-by-3 matrix form.
- $ Coded = \begin{bmatrix} 1 & 0 & 4 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \\ \end{bmatrix} \ $
- $ Decrypted = \begin{bmatrix} 2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 3 \\ \end{bmatrix} \ $
Thus
$ Coded * A\ = Decrypted $
Or (A is the Secret Matrix)
$ \begin{bmatrix} 1 & 0 & 4 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \\ \end{bmatrix}\ * A = \begin{bmatrix} 2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 3 \\ \end{bmatrix} $
- $ \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \\ \end{bmatrix}^{-1} = \frac{1}{ad - bc} \begin{bmatrix} \,\,\,d & \!\!-b \\ -c & \,a \\ \end{bmatrix}. $