Cracking the Hill Cipher: Finding the Decryption Key

  • Thread starter Thread starter sfskseg32
  • Start date Start date
  • Tags Tags
    Hill
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
sfskseg32
Messages
2
Reaction score
0

Homework Statement



I cannot figure out how to find the decryption key for a hill cypher. My textbook and a bunch of websites say that is just the inverse of the encryption key, but that is not working for me.

Homework Equations



A =
[1,2,3]
[4,5,6]
[7,8,10]

The Attempt at a Solution



A^(-1) =
[-2/3, -4/3, 1]
[-2/3, 11/3, -2]
[1, -2, 1]

But this does not properly decrypt my message. Anyone know what I'm missing?
 
Physics news on Phys.org
Seems to work just fine

>> [1 2 3; 4 5 6; 7 8 10]*[0;2;19]

ans =

61
124
206

>> inv([1 2 3; 4 5 6; 7 8 10])*[61;124;206]

ans =

0.0000
2.0000
19.0000


Perhaps you simply forgot to take the mod of the encrypted text, and then take the mod of the decrypted text again. What is the 'message' to encrypt here?