Hill Cipher for the Holidays 2.

Level pending

Given the matrix A = 4 2 3 1 6 5 3 1 2 m o d 26 A= \begin{vmatrix}{4} && {2} && {3} \\ {1} && {6} && {5} \\ {3} && {1} && {2}\end{vmatrix} \bmod{26} , use a Hill cipher to decipher the message V E Z Z M F Y Q R G T F N R W S S Z Q I L VEZZMFYQRGTFNRWSSZQIL using modulo 26, where A 0 , B 1 , , Z 25 , A \rightarrow 0, B \rightarrow 1, \ldots , Z \rightarrow 25, and enter the result as a string of integers.

What does the deciphered message state?

Hill cipher


The answer is 701515247141183024184214172414134.

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
Dec 26, 2017

Note: det ( A ) = 3 \: \det(A) = 3 and gcd ( 3 , 26 ) = 1 \gcd(3,26) = 1 , so for each block X j X_{j} the system A X j = B j m o d 26 A X_{j} = B_{j} \bmod{26} has a unique solution X j = A 1 B j m o d 26 X_{j} = A^{-1} B_{j} \bmod{26} , where ( 1 < = j < = 7 ) (1 <= j <= 7) .

Using seven blocks for V E Z Z M F Y Q R G T F N R W S S Z Q I L VEZZMFYQRGTFNRWSSZQIL we obtain:

21 4 25 21\: 4 \: 25

25 12 5 25 \: 12 \: 5

24 16 17 24 \: 16 \: 17

6 19 5 6 \: 19 \: 5

13 17 22 13 \: 17 \: 22

18 18 25 18 \: 18 \: 25

16 8 11 16 \: 8 \: 11

Begin: Find A 1 A^{-1} .

B = A I = [ 4 2 3 1 0 0 1 6 5 0 1 0 3 1 2 0 0 1 ] m o d 26 B = A|I = \left[ \begin{array}{ccc|ccc} 4 & 2 & 3 & 1 & 0 & 0 \\ 1 & 6 & 5 & 0 & 1 & 0 \\ 3 & 1 & 2 & 0 & 0 & 1 \\ \ \end{array} \right] \mod{26}

R 1 R 2 R_{1} \leftrightarrow R_{2} \rightarrow

[ 1 6 5 0 1 0 4 2 3 1 0 0 3 1 2 0 0 1 ] m o d 26 \left[ \begin{array}{ccc|ccc} 1 & 6 & 5 & 0 & 1 & 0 \\ 4 & 2 & 3 & 1 & 0 & 0 \\ 3 & 1 & 2 & 0 & 0 & 1 \\ \ \end{array} \right] \mod{26}

22 R o w 1 + R o w 2 22 * Row_{1} + Row_{2} and 23 R o w 1 + R o w 3 23 * Row_{1} + Row_{3} \rightarrow

B = [ 1 6 5 0 1 0 0 4 9 1 22 0 0 9 13 0 23 1 ] m o d 26 B = \left[ \begin{array}{ccc|ccc} 1 & 6 & 5 & 0 & 1 & 0 \\ 0 & 4 & 9 & 1 & 22 & 0 \\ 0 & 9 & 13 & 0 & 23 & 1 \\ \ \end{array} \right] \mod{26}

R o w 2 R o w 3 Row_{2} \leftrightarrow Row_{3} \rightarrow

B = [ 1 6 5 0 1 0 0 9 13 0 23 1 0 4 9 1 22 0 ] m o d 26 B = \left[ \begin{array}{ccc|ccc} 1 & 6 & 5 & 0 & 1 & 0 \\ 0 & 9 & 13 & 0 & 23 & 1 \\ 0 & 4 & 9 & 1 & 22 & 0 \\ \ \end{array} \right] \mod{26}

3 R o w 2 3 * Row_{2} \rightarrow

B = [ 1 6 5 0 1 0 0 1 13 0 17 3 0 4 9 1 22 0 ] m o d 26 B = \left[ \begin{array}{ccc|ccc} 1 & 6 & 5 & 0 & 1 & 0 \\ 0 & 1 & 13 & 0 & 17 & 3 \\ 0 & 4 & 9 & 1 & 22 & 0 \\ \ \end{array} \right] \mod{26}

20 R o w 2 + R o w 1 20 * Row_{2} + Row_{1} and 22 R o w 2 + R o w 3 22 * Row{2} + Row_{3} \rightarrow

B = [ 1 0 5 0 3 8 0 1 13 0 17 3 0 0 9 1 6 14 ] m o d 26 B = \left[ \begin{array}{ccc|ccc} 1 & 0 & 5 & 0 & 3 & 8 \\ 0 & 1 & 13 & 0 & 17 & 3 \\ 0 & 0 & 9 & 1 & 6 & 14 \\ \ \end{array} \right] \mod{26}

3 R o w 3 3 * Row_{3} \rightarrow

B = [ 1 0 5 0 3 8 0 1 13 0 17 3 0 0 1 3 18 6 ] m o d 26 B = \left[ \begin{array}{ccc|ccc} 1 & 0 & 5 & 0 & 3 & 8 \\ 0 & 1 & 13 & 0 & 17 & 3 \\ 0 & 0 & 1 & 3 & 18 & 6 \\ \ \end{array} \right] \mod{26}

13 R o w 3 + R o w 2 13 * Row_{3} + Row_{2} and 21 R o w 3 + R o w 1 21 * Row{3} + Row_{1} \rightarrow

B = [ 1 0 0 11 17 6 0 1 0 13 17 3 0 0 1 3 18 6 ] m o d 26 B = \left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & 11 & 17 & 6 \\ 0 & 1 & 0 & 13 & 17 & 3 \\ 0 & 0 & 1 & 3 & 18 & 6 \\ \ \end{array} \right] \mod{26}

\implies

A 1 = 11 17 6 13 17 3 3 18 16 m o d 26 A^{-1} = \begin{vmatrix}{11} && {17} && {6} \\ {13} && {17} && {3} \\ {3} && {18} && {16}\end{vmatrix} \bmod{26} .

Deciphering the first block [ 21 4 25 ] : \left [\begin{array}{ccc|c} 21 \\ 4 \\ 25 \\ \ \end{array} \right] \textbf{:}

X 1 = A 1 B 1 m o d 26 = [ 11 17 6 13 17 3 3 18 16 ] [ 21 4 25 ] m o d 26 = [ 7 0 15 ] m o d 26 X_{1} = A^{-1} * B_{1} \bmod{26} = \left [\begin{array}{ccc|c} 11 & 17 & 6\\ 13 & 17 & 3\\ 3 & 18 & 16\\ \ \end{array} \right] * \left [\begin{array}{ccc|c} 21 \\ 4 \\ 25 \\ \ \end{array} \right] \bmod{26} = \left [\begin{array}{ccc|c} 7 \\ 0 \\ 15 \\ \ \end{array} \right] \bmod{26} :

Deciphering the second block [ 25 12 5 ] : \left [\begin{array}{ccc|c} 25 \\ 12 \\ 5 \\ \ \end{array} \right] \textbf{:}

X 2 = A 1 B 2 m o d 26 = [ 11 17 6 13 17 3 3 18 16 ] [ 25 12 5 ] m o d 26 = [ 15 24 7 ] m o d 26 X_{2} = A^{-1} * B_{2} \bmod{26} = \left [\begin{array}{ccc|c} 11 & 17 & 6\\ 13 & 17 & 3\\ 3 & 18 & 16\\ \ \end{array} \right] * \left [\begin{array}{ccc|c} 25 \\ 12 \\ 5 \\ \ \end{array} \right] \bmod{26} = \left [\begin{array}{ccc|c} 15 \\ 24 \\ 7 \\ \ \end{array} \right] \bmod{26} :

Repeating the same procedure for the remaining blocks we obtain:

14 11 18 14 \: 11 \: 18

3 0 24 3 \: 0 \: 24

18 4 21 18 \: 4 \: 21

4 17 24 4 \: 17 \: 24

14 13 4 14 \: 13 \: 4

The plain text message is:

H A P P Y H O L I D A Y S E V E R Y O N E HAPPYHOLIDAYSEVERYONE

As a string of integers we obtain: 701515247141183024184214172414134 \boxed{701515247141183024184214172414134}

H A P P Y H O L I D A Y S E V E R Y O N E ! HAPPY \:\ HOLIDAYS \:\ EVERYONE \:\ !

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...