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 left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspondence.[1]
The encryption step performed by a Caesar cipher is often incorporated as part of more complex schemes, such as the Vigenère cipher, and still has modern application in the ROT13 system. As with all single-alphabet substitution ciphers, the Caesar cipher is easily broken and in modern practice offers essentially no communications security.
2. QUE: Implementation of cipher using any programming language of your choice.
• ANS:Monoalphabetic Ciphers
• A monoalphabetic cipher is any cipher in which each character of the alphabet is
replaced by another character in a one-to-one ratio. Both the Caesar Cipher and
ROT13, mentioned earlier in the chapter, are classic examples of monoalphabetic
ciphers. Some monoalphabetic ciphers scramble the alphabet instead of shifting
the letters, so that instead of having an alphabet of ABCDEFGHI-
JKLMNOPQRSTUVWXYZ, the cipher alphabet order might be MLNKB-
JVHCGXFZDSAPQOWIEURYT. The new scrambled alphabet is used to encipher
the message such that M = A, L = B…T = Z. Using this method, the cleartext
message “SECRET” becomes “OBNQBW.”
• You will rarely find these types of ciphers in use today outside of word games
because they can be easily broken by an exhaustive search of possible alphabet
combinations and they are also quite vulnerable to the language analysis
methods we described. Monoalphabetic ciphers are absolutely vulnerable to
frequency analysis because even though the letters are substituted, the ultimate
frequency appearance of each letter will roughly correspond to the known
frequency characteristics of the language.
3. The Caesar cipher is a classic example of
ancient cryptography and is said to have been
used by Julius Caesar. The Caesar cipher is
based on transposition and involves shifting
each letter of the plaintext message by a certain
number of letters, historically three, as shown
in Figure 5.1. The ciphertext can be decrypted
by applying the same number of shifts in the
opposite direction. This type of encryption is
known as a substitution cipher, due to the
substitution of one letter for another in a
consistent fashion.
4. • Algorithm: There is an integer value required to define each latter of
the text that has been moved down. This integer value is also known
as the shift.
• We can represent this concept using modular arithmetic by first
transmuting the letter into numbers, according to the schema, A = 0,
B = 1, C = 2, D = 3……. Z = 25.
• The decryption is the same as encryption. We can create a function
that will accomplish shifting in the opposite path to decrypt the
original text. However, we can use the cyclic property of the cipher
under the module.
• Cipher(n) = De-cipher(26-n)
•
• The same function can be used for decryption. Instead, we will
modify the shift value such that shifts = 26 - shift