# Encryption (Caesar cipher)

• Oct 15th 2008, 03:06 AM
Ciachyou
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.
• Oct 15th 2008, 10:25 AM
Maccaman
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

You might need to spend sometime working out how to use it, but its not that difficult.
Hope that helps.
• Oct 16th 2008, 07:23 AM
Laurent
Quote:

Originally Posted by Ciachyou
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), $\displaystyle 24a+b\equiv 0$ modulo 26. (I code a by 0, b by 2, etc., until z coded by 25), hence $\displaystyle b\equiv -24 a\, ({\rm mod}\, 26)$.
It remains 26 possibilities for $\displaystyle a$. Each of them gives a corresponding $\displaystyle 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 $\displaystyle a$. If like me you're lucky enough to guess that the double letter is an L, then you get the equation: $\displaystyle 19a+b\equiv 11$, hence $\displaystyle -5a\equiv 11$, or $\displaystyle 21a\equiv 11$ (modulo 26). From there you can deduce $\displaystyle a$: it is a matter of inverting 21 modulo 26. These numbers are relatively prime, so this is possible, and Euclid's algorithms gives: $\displaystyle 1=5\cdot 21-4\cdot 26$, hence $\displaystyle 5\cdot 21\equiv 1\,({\rm mod}\,26)$, and finally: $\displaystyle a\equiv 5\cdot 21a\equiv 5\cdot 11\equiv 3\,({\rm mod}\,26)$.

As a conclusion, the coding is $\displaystyle y=3x+6\,({\rm mod}\, 26)$. I let you discover the hidden message...
• Oct 20th 2008, 03:40 AM
Ciachyou
Thanks,

I really hate to ask but how would you use the

http://www.mathhelpforum.com/math-he...4cabc482-1.gif.

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. (Wink)
• Oct 20th 2008, 04:24 AM
Laurent
Quote:

Originally Posted by Ciachyou
Thanks,

I really hate to ask but how would you use the

http://www.mathhelpforum.com/math-he...4cabc482-1.gif.

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 $\displaystyle 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 $\displaystyle x'=x+1$ and $\displaystyle y'=y+1$; this gives $\displaystyle y'=y+1=3(x'-1)+6+1=3x'+4\,({\rm mod}\,26)$.
• Oct 22nd 2008, 10:56 AM
Ciachyou
(Party)

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

(Party)
(Party)
(Party)
Thanks Laurent you save me : D.
Used y = 3x + 4(mod 26).