0

While practicing for Hill Cipher I choose a random Key matrix of $ 2*2 $ given as follows : $ K = \begin{bmatrix}3&2\\1&0\\\end{bmatrix} $

Say the Text to Encrypt is ATTACK By using the Following Equation $ C=K * P \mod 26 $ I got the encrypted Text as MAFTAC, where

$C$ is Cipher Text Matrix

$K$ is Key Matrix

$P$ is Plain Text Matrix

Now while decrypting the Cipher text using equation $ P= K ^{-1} * C \mod 26 $.

I need to find $ K^{-1} = |K|^{-1} Adj A $ But The Multiplicative Inverse $ |K|^{-1}$ exist only if $ 26 $ and $|K|$ are relatively Prime. But In this case $|K|=-2= 24 \mod {26}$.

But 24 and 26 are not relatively Prime. Does That Mean The following Key Can't be used To Encrypt The Text?

Gaurav
  • 103
  • @Moo So Does that mean there is one more rule to be always observed that whether determinant of key matrix is coprime with 26 or not? which is not told usually in books. And this key matrix can't be used to find the key – Gaurav May 28 '19 at 03:04
  • Oh okay, thanks I will note it down. To use key matrix carefully otherwise you will stuck – Gaurav May 28 '19 at 03:23

1 Answers1

0

Your $K$ has determinant $-2$ which has a zero-divisor modulo $26$, hence $K$ has no inverse. It cannot be used as the key for a Hill cipher.

The function defined by $K$ is not injective: e.g. the plaintexts $\begin{bmatrix} 0 \\ 13\\ \end{bmatrix}$ and $\begin{bmatrix} 0 \\ 0\\ \end{bmatrix}$ give the same ciphertext, so we cannot go back to the plain text from the ciphertext.

Henno Brandsma
  • 242,131