Q1: Use the matrix
9 1
7 2
(a) Obtain the Hill cipher for the plaintext message
PAK ARMY
by letting A=1,B=2,C=3,.......,Y=25 and Z=26
(b) Decode Hill 2- cipher which was encrypted by this matrix.
To encrypt a message, each block of n letters (considered as an n-component vector) is multiplied by an invertible n × n matrix, against modulus 26. To decrypt the message, each block is multiplied by the inverse of the matrix used for encryption.
a)
"PAK\\ ARMY\\to \\begin{pmatrix}\n P \\\\\n A\n\\end{pmatrix}, \\begin{pmatrix}\n K \\\\\n A\n\\end{pmatrix}, \\begin{pmatrix}\n R \\\\\n M\n\\end{pmatrix}, \\begin{pmatrix}\n Y \\\\\n X\n\\end{pmatrix}\\to\\begin{pmatrix}\n 16 \\\\\n 1\n\\end{pmatrix}, \\begin{pmatrix}\n 11 \\\\\n 1\n\\end{pmatrix}, \\begin{pmatrix}\n 18 \\\\\n 13\n\\end{pmatrix}, \\begin{pmatrix}\n 25 \\\\\n 24\n\\end{pmatrix}"
"\\begin{pmatrix}\n 9 & 1 \\\\\n 7 & 2\n\\end{pmatrix}\\begin{pmatrix}\n 16 \\\\\n 1\n\\end{pmatrix}=\\begin{pmatrix}\n 145 \\\\\n 114 \n\\end{pmatrix}=\\begin{pmatrix}\n 15 \\\\\n 10 \n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 9 & 1 \\\\\n 7 & 2\n\\end{pmatrix}\\begin{pmatrix}\n 11 \\\\\n 1\n\\end{pmatrix}=\\begin{pmatrix}\n 100 \\\\\n 79 \n\\end{pmatrix}=\\begin{pmatrix}\n 22 \\\\\n 1 \n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 9 & 1 \\\\\n 7 & 2\n\\end{pmatrix}\\begin{pmatrix}\n 18 \\\\\n 13\n\\end{pmatrix}=\\begin{pmatrix}\n 175 \\\\\n 152 \n\\end{pmatrix}=\\begin{pmatrix}\n 19 \\\\\n 22 \n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 9 & 1 \\\\\n 7 & 2\n\\end{pmatrix}\\begin{pmatrix}\n 25 \\\\\n 24\n\\end{pmatrix}=\\begin{pmatrix}\n 249 \\\\\n 199 \n\\end{pmatrix}=\\begin{pmatrix}\n 15 \\\\\n 17\n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 15 \\\\\n 10\n\\end{pmatrix}, \\begin{pmatrix}\n 22 \\\\\n 1\n\\end{pmatrix}, \\begin{pmatrix}\n 19 \\\\\n 22\n\\end{pmatrix}, \\begin{pmatrix}\n 15 \\\\\n 17\n\\end{pmatrix}\\to \\begin{pmatrix}\n O \\\\\n J\n\\end{pmatrix}, \\begin{pmatrix}\n V \\\\\n A\n\\end{pmatrix}, \\begin{pmatrix}\n R \\\\\n M\n\\end{pmatrix}, \\begin{pmatrix}\n X \\\\\n Y\n\\end{pmatrix}"
b)
"\\begin{pmatrix}\n 9 & 1 \\\\\n 7 & 2\n\\end{pmatrix}^{-1}=\\frac{1}{11}\\begin{pmatrix}\n 2 & -1 \\\\\n -7 & 9\n\\end{pmatrix}\\equiv 19\\begin{pmatrix}\n 2 & -1 \\\\\n -7 & 9\n\\end{pmatrix}=\\begin{pmatrix}\n 12 & 25 \\\\\n 19 & 15\n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 12 & 25 \\\\\n 19 & 15\n\\end{pmatrix}\\begin{pmatrix}\n 15 \\\\\n 10\n\\end{pmatrix}=\\begin{pmatrix}\n 430 \\\\\n 435\n\\end{pmatrix}=\\begin{pmatrix}\n 16 \\\\\n 1\n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 12 & 25 \\\\\n 19 & 15\n\\end{pmatrix}\\begin{pmatrix}\n 22 \\\\\n 1\n\\end{pmatrix}=\\begin{pmatrix}\n 279 \\\\\n 433\n\\end{pmatrix}=\\begin{pmatrix}\n 11 \\\\\n 1\n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 12 & 25 \\\\\n 19 & 15\n\\end{pmatrix}\\begin{pmatrix}\n 19 \\\\\n 22\n\\end{pmatrix}=\\begin{pmatrix}\n 778 \\\\\n 691\n\\end{pmatrix}=\\begin{pmatrix}\n 18 \\\\\n 13\n\\end{pmatrix}(mod\\ 26)"
"\\begin{pmatrix}\n 12 & 25 \\\\\n 19 & 15\n\\end{pmatrix}\\begin{pmatrix}\n 15 \\\\\n 17\n\\end{pmatrix}=\\begin{pmatrix}\n 605 \\\\\n 540\n\\end{pmatrix}=\\begin{pmatrix}\n 25 \\\\\n 24\n\\end{pmatrix}(mod\\ 26)"
Comments
Leave a comment