Results 1 to 6 of 6

Math Help - Encryption (Caesar cipher)

  1. #1
    Newbie
    Joined
    Jul 2008
    Posts
    10

    Encryption (Caesar cipher)

    Hello all

    I have been out sick for the last four weeks and came back to a world of headaches and catching up.

    Having a problem with this question.

    The Following message was encrypted using a modular encryption which takes the form : y = (ax +b) mod 26

    NJIVI YVI CUVI NJYL Y JWLZVIZ HSTTSUL AYTYXSIE SL NJI UHEIVFYHTI WLSFIVEI


    Decipher the message:

    I think its the Caesar cipher.
    Last edited by Ciachyou; November 2nd 2008 at 07:02 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member Maccaman's Avatar
    Joined
    Sep 2008
    Posts
    85
    I did a cryptogrpahy course ages ago, so I cannot exactly remember how to do these exactly, but perhaps you could try downloading this program called cryptool. If I remember correctly this little piece of gold can decipher your encrypted message with relative ease.

    You can get it from

    Cryptool - Download

    You might need to spend sometime working out how to use it, but its not that difficult.
    Hope that helps.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor

    Joined
    Aug 2008
    From
    Paris, France
    Posts
    1,174
    Quote Originally Posted by Ciachyou View Post
    The Following message was encrypted using a modular encryption which takes the form : y = (ax +b) mod 26

    NJIVI YVI CUVI NJYL Y JWLZVIZ HSTTSUL AYTYXSIE SL NJI UHEIVFYHTI WLSFIVEI
    I deciphered it. Here is how:
    1) notice there is a one letter long word (Y), so it must be "a" (it could have been "s", from " 's ", but it is less likely in this context because of the apostrophe)
    2) notice there are two consecutive T, so there aren't many possibilities. Any other remark/guess could have helped.

    As a consequence of 1), 24a+b\equiv 0 modulo 26. (I code a by 0, b by 2, etc., until z coded by 25), hence b\equiv -24 a\, ({\rm mod}\, 26).
    It remains 26 possibilities for a. Each of them gives a corresponding b and a possible deciphering of the message.

    First option: write a (very short) computer program to list them all and see which one is the right one. Anyway, you'll be glad to have it when it comes to deciphering the whole message, so you should think about giving it a try if you have some programming knowledge. I wrote a two or three line long program with Scilab that deciphers with given parameters a and b, and this spares much time. It should be very simple in any programming language.

    Second option: use remark 2) to find a. If like me you're lucky enough to guess that the double letter is an L, then you get the equation: 19a+b\equiv 11, hence -5a\equiv 11, or 21a\equiv 11 (modulo 26). From there you can deduce a: it is a matter of inverting 21 modulo 26. These numbers are relatively prime, so this is possible, and Euclid's algorithms gives: 1=5\cdot 21-4\cdot 26, hence 5\cdot 21\equiv 1\,({\rm mod}\,26), and finally: a\equiv 5\cdot 21a\equiv 5\cdot 11\equiv 3\,({\rm mod}\,26).

    As a conclusion, the coding is y=3x+6\,({\rm mod}\, 26). I let you discover the hidden message...
    Last edited by Laurent; October 22nd 2008 at 02:25 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jul 2008
    Posts
    10
    Thanks,

    I really hate to ask but how would you use the

    .

    x = position of letter

    So its I = 9 => y=3(9) + 6 (mod 26).

    => y=27(mod 26)
    27 - 26 = 1 => A
    Am i close?

    Also you started at 0, i uploaded an attachment which starts off as 1 = a .
    Its the one they gave us , i dont know if it matters.
    Any chance of a few examples.
    Attached Files Attached Files
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor

    Joined
    Aug 2008
    From
    Paris, France
    Posts
    1,174
    Quote Originally Posted by Ciachyou View Post
    Thanks,

    I really hate to ask but how would you use the

    .

    x = position of letter
    Feel welcome to ask! What you wrote is correct, with A=0, B=1,..., Z= 25.
    Then V (number 21) becomes 3\cdot 21 + 6=69 =2\cdot 26+17\equiv 17\,({\rm mod}\,26), which is an R.

    If you want to use your table, you can let x'=x+1 and y'=y+1; this gives y'=y+1=3(x'-1)+6+1=3x'+4\,({\rm mod}\,26).
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Jul 2008
    Posts
    10


    Estimates show that there are around one hundred billion stars in a galaxy.




    Thanks Laurent you save me : D.
    Used y = 3x + 4(mod 26).
    Last edited by Ciachyou; October 22nd 2008 at 12:08 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Rabin cipher encryption
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: May 2nd 2011, 06:32 PM
  2. Affine Cipher Encryption
    Posted in the Number Theory Forum
    Replies: 7
    Last Post: March 6th 2011, 05:08 PM
  3. encryption vig
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: May 11th 2010, 10:31 PM
  4. RSA Encryption
    Posted in the Number Theory Forum
    Replies: 3
    Last Post: October 18th 2006, 10:28 AM
  5. RSA encryption
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: April 27th 2006, 06:24 PM

Search Tags


/mathhelpforum @mathhelpforum