Caesar Chiper, A Solution For Keeping Our Secret
………. 6 4 17_28 18 24_21 8 4 7_16 28_16 8 22 22 4 10 8 ?
……….15 8 23 22_14 8 8 19_18 24 21_22 8 6 21 8 23_22 4 9 8……
Have you ever read ‘Digital Fortress’, a book writen by Dan Brown (the author of well known book, The Da Vinci Code, which already be filmed in Hollywood). The ‘Digital Fortress’ tell us about an organisation called National Security Agent (NSA) which has responsibility in encrypting and decrypting secret codes. However, I will not tell you about the ‘Digital Fortress’. I just want to share with you about simple encryption and decryption.
I think cryptography is so common for you who have learnt Algebra or computer, in Algebra we can learn about simpel cryptography (which is widely used in computer and information technology). Now I will share with you about Caesar Chiper, a calassic cryptography which is used by Julius Caesar in his wars. When sending the messages (about the strategy of the war), Julius Caesar always encrypted his messages to keep them safe from his enemies.
Caesar Chiper is a (quite) simple cryptography. It is not so complicated because it just uses translasion (a part of transformation in Mathematics) of the alphabet (A, B, C, … ). We just need to move the alphabet ‘n’ steps to the right or to the left. Next, the number of the steps is called shift code. For instance, if we move the letters 3 steps to right we call it Caesar Chiper Shift R3. Is it difficult? I hope it will be (quite) easy after I give you an example, here it is …..
- We start from an array of alphabets : A B C D E F G H ….
- For instance we will use Caesar Chiper Shift 3 so move the alphabet 3 steps to right and we will get the new array of alphabets : D E F G H I J K ….
- I will give you an example of words to make it easier to learn :
- Before encryption we have : ‘Digital Fortress’
- Move ‘D’ 3 steps to right and we will get ‘G’
- Move ‘I’ 3 steps to right and we will get ‘L’
- And so on….
- After encryption we will obtain : Gljlwdo Iruwugvv
It is easy to ‘play’ Caesar Chiper, isn’t it? Of course it is free for us to choose the shift code (the number and the direction of the steps). We can move the letters to the right or to the left but we have to give a special code if we move letters to the left and the special code is L (for Left), for instance if we move the alphabet 4 steps to the left so it is called the Caesar Chiper shift L4.
Decrypting codes is as easy as encrypting codes. To decrypt the codes we move the alphabet in the same number of steps we took when we encrypted the codes, but we have to move them to the opposite direction.
Caesar Chiper not only uses alphabetical code but also use numerical code. We can use numbers from zero until 25. Why 25? Because we have 26 letters from A to Z so we use modulo 26, usually written as mod(26).
First we have to change alphabetical codes to first numerical codes, for instances A = 0, B = 1, C = 2 …and so on. The next step is doing the encryption and decryption using the ‘formula’:
- Encryption : En(x)=(x+n)mod 26
- Decryption : Dn(x)=(x-n)mod 26
We choose n = 3 and the first code A = 0, B = 1, C = 2 …
And then we code the letter A (remember the formula for encryption…En(x)=(x+n)mod 26 )
E3(0)=3 mod 26
Finally we get A = 3 (not zero anymore), 3 is the new code for A. For the the codes of the other letters we just continue the list of alphabet (B=4, C=5, … , W=25, X=0, Y=1, Z=2).
We have a number ‘4’ and we know the code is E3.
So what does ‘3’ mean?
Let’s find it out!
We use the formula Dn(x)=(x-n)mod 26
D3(4)=1 mod 26
Because in the first code 1 means B so finally we know that ‘4’ in E3 means B.
Now, I will challenge you!
17 5 24 9 17 5 24 13 15 5 _5 8 5 16 5 12_20 9 22 17 5 13 18 5 18_3 5 18 11_17 9 18 11 5 23 3 13 15 15 5 18
The ‘sentence’ above uses E5. Can you tell me about what that ‘sentence’ is talking about?
Finally, what does the code in the beginning of this ‘story’ mean?
I am sorry because i can not use mic equation here so i write the formulas manually (maybe it make them harder to read)
This story was finished in 15 December 2006 in The Netherlands