Skip to main content
Post Closed as "Not suitable for this site" by Emil Jeřábek, user1073, user44191, David Handelman, Henry Cohn
edited title
Link
user64494
  • 3.5k
  • 14
  • 22

How to find modulo inverse if two Numbernumber are not relatively Primeprime for Hill Ciphercipher?

Multiplicative Inverse Symbol Changed
Source Link
Gaurav
  • 111
  • 3

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}$$ |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?

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?

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?

Source Link
Gaurav
  • 111
  • 3

How to find modulo inverse if two Number are not relatively Prime for Hill Cipher?

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?