1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Hill Cyphers

  1. Sep 6, 2010 #1
    1. The problem statement, all variables and given/known data

    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.

    2. Relevant equations

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

    3. 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?
     
  2. jcsd
  3. Sep 6, 2010 #2

    cronxeh

    User Avatar
    Gold Member

    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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook