From locuseducation.org

Blazing goIITian

Posted on
15 Mar 2008 20:14:37 IST
Posts: 1608
15 Mar 2008 20:14:37 IST
0 people liked this
0
824 View Post
From locuseducation.org
I saw very few people read this at locus. So I posted it here for the benefit of goiitans. Please do NOT rate me for this one.
 
One of the earliest known methods of encoding messages was the Caesar shift, also called the Caesar cipher. It is a type of substitution cipher in which each letter in the message is replaced by a letter some fixed number of positions down the alphabet.

In this article, we'll see how Caesar ciphers are made and then you'll be asked to break some codes!


Consider a shift of +3. This means that A will be replaced by D, B by E and so on as follows:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

Coding a message is simple now. Suppose you want to code for "I am cool". This would in code become "L dp frro". Here's another example: the message "Lets rob the bank tomorrow" would become "Ohwv urev wkh edqn wrpruurz".

Coding a message is obviously very simple. The fun however is, in decoding messages. Lets see some examples on how this can be done.

Suppose the code you are given is "H zl shqdc" Now notice that the start of the sentence is with a single letter word, which most probably must be "I". Since "H" is one behind "I" in the alphabet, this means that if a simple Caesar shift is used, the shift must be -1. Applying a reverse shift on all letters (basically, taking the next letter for each letter in the code), we get the actual message as "I am tired".

Lets consider another example. Suppose the code is "Qc reqi mw Fsrh". The first word is two letters long so it could be "It", "Of", "My", "Is", "To", "In" etc. Lets first try "It". Note that "I" is the 9th letter in the alphabet and "Q" is the 18th. The difference is 9. If the code is a simple Caesar cipher, the difference between "C' and "T' must also be 9 then, which is not true, so this means that "It" is not the first word. Trying this way, we'll soon see that "My" fits perfectly, and the shift is +4. Applying a reverse shift to the code, the actual message we get is "My name is Bond".

Alright, this should have given you a basic idea on what Caesar shifts are. Now comes your turn. Break these codes as fast as you can (all of them), and mention the total time it took you to do so:

1) Kpfkcp rqkvkeu ku xgta fktva.
2) Odwgalawna swo w cnawp snepan.
3) Rkzy vrge yuiikx.

Here's a more complicated one:
4) Mvdglm'h ozdh vckozrm zonlhg vevibgsrmt.

This fourth one is not a simple Caesar shift but a more general substitution cipher. Full points to those who can break this code!!
 

Source: www.locuseducation.org

Share this article on:

Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Sponsored Ads