2082 11

CSC327 ยท 2082

Decrypt the ciphertext 'HI' using Hill Cipher where the key is. Ciphertext: HI, Key:

Decrypt the ciphertext 'HI' using Hill Cipher where the key is. Ciphertext: HI, Key: $$\begin{bmatrix} 5 & 3 \ 4 & 3 \end{bmatrix}$$

CryptographyChapter 1: Introduction and Classical CiphersSubstitution TechniquesNumerical: Hill cipher decryption

Hill Cipher Decryption of Ciphertext 'HI'

Given Data

  • Ciphertext: HI
  • Key Matrix:

$$K = \begin{bmatrix} 5 & 3 \ 4 & 3 \end{bmatrix}$$

  • Alphabet mapping: A=0, B=1, ..., Z=25, modulus 26.

Step 1: Convert Ciphertext to Numbers

  • H = 7
  • I = 8

$$C = \begin{bmatrix} 7 \ 8 \end{bmatrix}$$


Step 2: Decryption Formula

$$P = K^{-1} C \pmod{26}$$


Step 3: Determinant of K

$$\det(K) = (5)(3) - (3)(4) = 15 - 12 = 3$$


Step 4: Inverse of Determinant mod 26

$$3 \cdot d^{-1} \equiv 1 \pmod{26}$$

$$3 \times 9 = 27 \equiv 1 \pmod{26} \Rightarrow d^{-1} = 9$$


Step 5: Adjugate of K

$$\text{adj}(K) = \begin{bmatrix} 3 & -3 \ -4 & 5 \end{bmatrix} \equiv \begin{bmatrix} 3 & 23 \ 22 & 5 \end{bmatrix} \pmod{26}$$


Step 6: Compute Kโปยน

$$K^{-1} = 9 \cdot \begin{bmatrix} 3 & 23 \ 22 & 5 \end{bmatrix} \pmod{26} = \begin{bmatrix} 27 & 207 \ 198 & 45 \end{bmatrix} \pmod{26}$$

  • $27 \bmod 26 = 1$
  • $207 \bmod 26 = 207 - 182 = 25$
  • $198 \bmod 26 = 198 - 182 = 16$
  • $45 \bmod 26 = 19$

$$K^{-1} = \begin{bmatrix} 1 & 25 \ 16 & 19 \end{bmatrix}$$

Check: $K^{-1}K \pmod{26}$:

  • $(1)(5)+(25)(4)=5+100=105 \equiv 1$
  • $(1)(3)+(25)(3)=3+75=78 \equiv 0$
  • $(16)(5)+(19)(4)=80+76=156 \equiv 0$
  • $(16)(3)+(19)(3)=48+57=105 \equiv 1$

Gives identity: inverse is correct.


Step 7: Multiply Kโปยน by C

$$P = \begin{bmatrix} 1 & 25 \ 16 & 19 \end{bmatrix}\begin{bmatrix} 7 \ 8 \end{bmatrix} \pmod{26}$$

  • Row 1: $7 + 200 = 207 \equiv 207 - 182 = 25$
  • Row 2: $112 + 152 = 264 \equiv 264 - 260 = 4$

$$P = \begin{bmatrix} 25 \ 4 \end{bmatrix}$$


Step 8: Convert to Letters

  • 25 = Z
  • 4 = E

Result

$$\boxed{\text{Plaintext} = \textbf{ZE}}$$

The ciphertext 'HI' decrypts to 'ZE'.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.