Introduction: Basics of Cryptography: Caesar Cipher
With cryptography you can send and receive encrypted messages while getting protected from a third person from getting reading the letter.
In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of +3 (to rigth) word "B" will become "E".
Step 1: Creating the Cipher
*First, write down all the letters of the alphabet.
*Now we will decide a number for encryption. For example, it can be 1,2,3... or -1,-2,-3 etc. We will be using "+2" for this example. Now write the all alphabet again under the first one but shift it to right 2 times and transfer surplus letters from the and to the head.
*If we were to encrypt the word "instructables" it would be "glqrpsaryzjcq".
! Important ! : While we create the cipher we have used "+2" as key but while decrypting it will be "-2".
Step 2: Using Words As Key
Instead of using numbers we can use words as keys.
To do that; choose a word, remove the surplus letters from the word and write the rest of the alphabet next to it.
(Do not write the letters which are on your word as well.)
If we were to make "POTATO" our key than it would be left "POTA" and when you write rest of the alphabet without "P","O","T","A" letters you will be able to encrypt and decrypt the letter. In that case the word " instructables" will be "fkrsqutspoibr".
Step 3: Using Multiple Numbers As Keys
*Instead of using one number for whole letter you can use multiple. For example if you take "123" as key -the number can be big as you want- while encrypting "CAT", decryption will be "DCW".
*You can do the same thing using words instead of letters. For example in the sentence "Hello World" you can use "-1,2" and you will do the same thing but in the word "Hello" you will use "-1" and in " World" you will use "2".
Step 4: Decrypting
Be careful while witing encryption key, because it is not same as decryption key and if you make a mistake while giving the key to decrypter, decrypter would not be able to decrypt the code.
Step 5: Cracking the Caesar Cipher
While cracking the Caesar Cipher two situations can be considered:
1.an attacker knows (or guesses) that some sort of simple substitution cipher has been used, but not specifically that it is a Caesar scheme;
2.an attacker knows that a Caesar cipher is in use, but does not know the shift value.
In the first case, the cipher can be broken using the same techniques as for a general simple substitution cipher, such as frequency analysis or pattern words.While solving, it is likely that an attacker will quickly notice the regularity in the solution and deduce that a Caesar cipher is the specific algorithm employed.
In the second in instance it can be tested with a brute force attack considering there are only a limited number of possible shifts (26 in English).
Frequency analysis is a way that can be used to crack ciphers and it is not so complicated. Before using this technique, first of all you need to know what language the cipher is written. If you know the language, -in this case English- you will take resultant frequency graph of the letters in that languages alphabet and you will do the same on the cipher. In English most frequent letters in order are "E","T" and "A". Now compare both graphs and you will be able to know the cipher.
Now that you know basics of cryptography you can try to crack this easy cipher.
Leave a comment when you crack the cipher.
Cipher: iutmxgzargzouty eua ngbk ixgiqkj znk iujk
Step 6: The End
This is the end of this instructables. There might be some spelling mistakes, anacoluthon and mixed sentences.
I would be glad if you notice me if there is any wrong information or error on grammar.
*By the way do not forget to read "Important" parts.*
Thank you for reading.
You can see how to Encrypt and Decrypt messages with Vigenére Cipher from this link:
Participated in the
Maker Olympics Contest 2016
Participated in the
Summer Fun Contest 2016
1 year ago
Per Instructions - Step 3: Using multiple numbers as key (+2 World) does not look correct. -1 decryption is used for this word instead of +2
Question 4 years ago
Any one can help with this question. having difficulties in understanding 234 substitution.
George owns a company that produces mobile phones to end users. George’s company must keep up with other competitors therefore during a company meeting George announced that he will be making changes to their new upcoming mobile device. George’s company follows a strict confidentiality policy when it comes to the exchange of information. To prevent the leakage of information during transmission George also informed his employees during the meeting that he will be sending them instructions encrypted under Caesar cipher followed by another substitution where the key is 234. Employees received the following cipher text.
NTJWKHXK AMK WWUJJYZTX MWKXZKUHE
What is the plain text?
6 years ago
It's actually easier to just hint around at what you want to say. Then there's no real commitment either.
6 years ago
I believe that, simply by using the word, "anacoluthon", you should be granted spelling and grammar immunity.
6 years ago
This looks awesome.