Results 1 to 6 of 6

Math Help - An Interesting Matrix Modulo 27 Problem

  1. #1
    Newbie
    Joined
    Mar 2006
    Posts
    7

    An Interesting Matrix Modulo 27 Problem

    This is a Hill Cipher implementation with 0=space, 1=a, 2=b, ... We have a message p that is encoded as c=pK where K is a 2x2 matrix with integer entries from 0 to 26 and both c and p are 1x2 vectors. The entries of c are reduced modulo 27. So p=cK^-1 where K^-1 is the inverse, modulo 27, of the matrix K. So I've found that the 2 most common vectors in the coded message are UJ and HF (which correspond to [21 10] and [8 6] respectively) and that these correspond to the uncoded message through parts of the word "the" and spaces before and after the word (ie. "space T"=[0 20], "TH"=[20 8], "HE"=[8 5], and "E space"=[5 0]). I'm not sure which these two specifically correspond to but I've tried all combinations in solving for K and can't seem to get a K that has all integer entries. Can anyone find this K or its inverse?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by evilpotato
    This is a Hill Cipher implementation with 0=space, 1=a, 2=b, ... We have a message p that is encoded as c=pK where K is a 2x2 matrix with integer entries from 0 to 26 and both c and p are 1x2 vectors. The entries of c are reduced modulo 27. So p=cK^-1 where K^-1 is the inverse, modulo 27, of the matrix K. So I've found that the 2 most common vectors in the coded message are UJ and HF (which correspond to [21 10] and [8 6] respectively) and that these correspond to the uncoded message through parts of the word "the" and spaces before and after the word (ie. "space T"=[0 20], "TH"=[20 8], "HE"=[8 5], and "E space"=[5 0]). I'm not sure which these two specifically correspond to but I've tried all combinations in solving for K and can't seem to get a K that has all integer entries. Can anyone find this K or its inverse?
    I can't find a K satisfying the conditions specified either. What is the source
    of your frequency data is it compiled from a ciphertext or given. What about
    the next most common plaintext digraphs? Do you know what they are?

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Mar 2006
    Posts
    7
    I know, it's weird. The frequency data is given and the next most common digraphs in the cryptotext are FH and ND ([6 8] and [14 4] respectively). I'm not really sure what the next most common digraphs in plaintext would be, but a frequency table suggests they may be ".A', "S.", or "D." ([0 1],
    [19 0], or [4 0]).
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by evilpotato
    I know, it's weird. The frequency data is given and the next most common digraphs in the cryptotext are FH and ND ([6 8] and [14 4] respectively). I'm not really sure what the next most common digraphs in plaintext would be, but a frequency table suggests they may be ".A', "S.", or "D." ([0 1],
    [19 0], or [4 0]).
    Now I have compiled a small digraph frequency table from a sentence of
    two of Moby Dick. I have done this because most digraph tables are for
    text with the spaces removed so are not applicable here.

    The top scorers are:

    (IN, 6), (.F, 5), (IS,4), (FI, 4), (N., 4), (ST,4), (.N, 3), (.P, 3), (.I, 3),
    (TI, 3), (TE,3), (SI, 3), (RS, 3), (PE,3), (NG, 3), (IG, 3), (G.,3), (ER, 3),
    (ED, 3), (D.,3)

    While this is a small table it is clear that, in this case at least, the most
    common digraphs do not derive from "THE". The above table suggests
    that you try IN as the plain text digraph corresponding to the ciphertext
    digraph UJ, and that HF might be the ciphertext for the plaintext .N or IS
    (because the ciphertext digraph FH is also common, as are the plaintext
    N. and SI).

    RonL
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Mar 2006
    Posts
    7
    Ok, thanks - that might change things. I thought the key was the modulo 27 thing. I don't have a lot of time at the moment so did you work it out to get an integer entry answer for K?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Angry

    Quote Originally Posted by evilpotato
    Ok, thanks - that might change things. I thought the key was the modulo 27 thing. I don't have a lot of time at the moment so did you work it out to get an integer entry answer for K?
    No it still does not work out (at least for the casesa I have tried)

    RonL
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Matrix determinants (modulo)
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: May 11th 2010, 04:40 PM
  2. Modulo of squares = modulo of roots
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: December 1st 2009, 10:04 AM
  3. Modulo problem
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: August 7th 2008, 01:25 PM
  4. Replies: 2
    Last Post: August 17th 2007, 03:24 PM
  5. Modulo problem
    Posted in the Number Theory Forum
    Replies: 5
    Last Post: November 29th 2006, 10:03 PM

Search Tags


/mathhelpforum @mathhelpforum