Question is 1.42(c) of Introduction to Mathematical Cryptography, on page 56.
The encryption and decryption schemes are;
$$e_k(m)\equiv k_1.m + k_2, \mod p $$ $$d_k(m)\equiv k_1^{-1} (c-k_2), \mod p$$
You are asked to calculate $k_1$ and $k_2$ given the below plaintext/ciphertext pairs, and $p=11$.
$$(m_1,c_1)=(\begin{bmatrix}5\\4\end{bmatrix}, \begin{bmatrix}1\\8\end{bmatrix})$$ $$(m_2,c_2)=(\begin{bmatrix}8\\10\end{bmatrix}, \begin{bmatrix}8\\5\end{bmatrix})$$ $$(m_3,c_3)=(\begin{bmatrix}7\\1\end{bmatrix}, \begin{bmatrix}8\\7\end{bmatrix})$$
My attempt;
I found that via taking 3rd congruence away from the 2nd, that I get;
$$k_1\equiv 0 \mod 11$$, and $$9k_1 \equiv -2 \mod 11$$
Solving these two congruences I get
$$k_1\equiv 0 \mod 11$$
and hence
$$k_2 \equiv \begin{bmatrix}8\\-4\end{bmatrix} \mod 11$$.
However when using these values for $k_1$ and $k_2$ in the original 1st and 2nd congruences I find that the congruences are not satisfied.
Questions;
- Where am I going wrong?
- What is the correct solution with full working?
Get an understanding of the cipher first and foremost. (I'll work mod 11 everywhere.)
We fix an invertible matrix $k_1 = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ and a vector $k_2 = (u, v)^T$. Plain- and ciphertext messages are also vectors. Given a plaintext vector $\mathbf{p} = (x, y)^T$ we encrypt by $$ \mathbf{c} = k_1 \mathbf{p} + k_2 $$ which is again a 2-vector.
Note that you have 6 parameters: the 4 entries of $k_1$ and the 2 entries of $k_2$. You also have 6 known pieces of data: the 6 vectors in the plain/ciphertext pairs. Start doing the algebra...