Replacing words with other words

Number Theory Level pending

Someone suggested I use a Hill cipher to transform English words into other English words. I provided a very simple example.

Using a hill cipher, find the 2 × 2 2 \times 2 matrix A A modulo 26 that replaces the plaintext word T H A T THAT with the ciphertext word B L O B BLOB , where A 0 , B 1 , , Z 25 A \rightarrow 0, B \rightarrow 1, \ldots , Z \rightarrow 25 .

Express the answer as the det ( A ) \det(A) modulo 26.


The answer is 25.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Rocco Dalto
Jan 9, 2017

Let A A be the 2 X 2 2 \: X \: 2 Matrix.

A [ 19 0 7 19 ] [ 1 14 11 1 ] m o d 26 \ A * \left [\begin{array}{cc|c} 19 & 0\\ 7 & 19 \\ \ \end{array} \right] \equiv \left [\begin{array}{cc|c} 1 & 14\\ 11 & 1 \\ \ \end{array} \right] \mod{26}

Let B = [ 19 0 7 19 ] m o d 26 B = \left [\begin{array}{cc|c} 19 & 0\\ 7 & 19 \\ \ \end{array} \right] \mod{26}

To find the B 1 B^{-1} modulo 26 26 so that A [ 1 14 11 1 ] B 1 m o d 26 A \equiv \left [\begin{array}{cc|c} 1 & 14\\ 11 & 1 \\ \ \end{array} \right] * B^{-1} \mod{26}

C = B I = [ 19 0 1 0 7 19 0 1 ] m o d 26 C = B|I = \left [\begin{array}{cc|cc} 19 & 0 & 1 & 0\\ 7 & 19 & 0 & 1 \\ \ \end{array} \right] \mod{26}

R o w 1 + R o w 2 Row_{1} + Row_{2} \implies

C = [ 19 0 1 0 0 19 1 1 ] m o d 26 C = \left [\begin{array}{cc|cc} 19 & 0 & 1 & 0\\ 0 & 19 & 1 & 1 \\ \ \end{array} \right] \mod{26}

11 R o w 1 11 * Row_{1} and 11 R o w 2 11 * Row_{2} \implies

C = [ 1 0 11 0 0 1 11 11 ] m o d 26 C = \left [\begin{array}{cc|cc} 1 & 0 & 11 & 0\\ 0 & 1 & 11 & 11 \\ \ \end{array} \right] \mod{26}

B 1 [ 11 0 11 11 ] m o d 26 \implies B^{-1} \equiv \left [\begin{array}{cc|c} 11 & 0 \\ 11 & 11 \\ \ \end{array} \right] \mod{26}

A [ 1 14 11 1 ] [ 11 0 11 11 ] m o d 26 [ 9 24 2 11 ] m o d 26 \implies A \equiv \left [\begin{array}{cc|c} 1 & 14\\ 11 & 1 \\ \ \end{array} \right] * \left [\begin{array}{cc|c} 11 & 0\\ 11 & 11 \\ \ \end{array} \right] \mod{26} \equiv \left [\begin{array}{cc|c} 9 & 24\\ 2 & 11 \\ \ \end{array} \right] \mod{26}

det ( A ) = 51 m o d 26 25 m o d 26. \implies \det(A) = 51 \mod 26 \equiv 25 \mod 26.

det ( A ) 25 m o d 26 \therefore \boxed{\det(A) \equiv 25 \mod 26} .

Note: \textbf{Note:}

Using the plain text word T H A T THAT

[ 9 24 2 11 ] [ 19 7 ] = [ 1 11 ] m o d 26 \left [\begin{array}{cc|c} 9 & 24\\ 2 & 11 \\ \ \end{array} \right] * \left [\begin{array}{cc|c} 19\\ 7 \\ \ \end{array} \right] = \left [\begin{array}{cc|c} 1\\ 11 \\ \ \end{array} \right] \mod{26}

[ 9 24 2 11 ] [ 0 19 ] = [ 14 1 ] m o d 26 \left [\begin{array}{cc|c} 9 & 24\\ 2 & 11 \\ \ \end{array} \right] * \left [\begin{array}{cc|c} 0\\ 19 \\ \ \end{array} \right] = \left [\begin{array}{cc|c} 14\\ 1 \\ \ \end{array} \right] \mod{26}

we obtain the ciphered word B L O B BLOB .

An alternative answer format would be to enter an integer string of the 4 matrix elements, starting with the 1st row left to right, and then followed by the second row, i.e., a 11 a 12 a 21 a 22 a_{11}a_{12}a_{21}a_{22} . Since det A T = det A \det A^T = \det A , this alternative format would discriminate among solvers that erroneously found A T A^T instead of A A and didn't bother to check whether their solution gave the proper ciphertext block. Thanks for the problem.

Wesley Zumino - 3 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...