Data Protection and Security

   

I

Introduction To Cryptography

   

I.III

Historic Examples of Simple Ciphers

   

   
 

Shift Cipher

One of the oldest ciphers was Caesar cipher attributed to Julius Caesar. In this method ‘a’ becomes ‘D’, ‘b’ becomes ‘E’, ‘c’ becomes ‘F’, . . . , and ‘z’ becomes ‘C’. A slight generalization of this idea allows the ciphertext alphabet to be shifted by ‘k’ letters, instead of always ‘3’. In this case ‘k’ becomes the key of the cipher generally called as the substitution cipher, the operation of which is illustrated in the animation to the right (Traditionally, in crypto community for convenience, the names Alice and Bob are used instead of using letters A and B).

In more technical terms, the operation of substitution cipher can be explained by the following formulas:

C = EK(P) = P + K mod n

P = DK(C) = C – K mod n

Here ‘n’ represents the total number of letters in the language. For example it is ‘26’ for English. Plaintext (P), Ciphertext (C) as well as the Key (K) would get an integer value in the range 0 to 25. This can be shown in short as

P = C = K = Z26

The addition and subtraction operation are performed in modulo n. This means the integer values "wrap around" after they reach the modulus n.

Example: 15+21 = 10 mod 26.

 

 


Animation I.III-I

Operation of substitution chipher is illustrated in this animation.
[click to enlarge]

 


Figure I.III-I

Letter frequencies in words of English.
[click to enlarge]

   

I.III.Q

[+] Exercise

[-] Exercise

Perform a ciphertext only attack to find out the English plaintext corresponding to the ciphertext given below.. The letter frequency in English is given below. Feel free to use any other statistical properties of English.

Cipher-text:

WUYMUL MCGJFS LYJFUWYX YUWB FYNNYL CH U GYMMUAY QCNB NBY FYNNYL NBUN CM NBLYY JFUWYM ZOLNBYL XIQH NBY UFJBUVYN BIQ UVION GY

[+] Solution

[-] Solution

Plain-text:

Caesar simply replaced each letter in a message with the letter that is three places further down the alphabet how about me

   

   
       
 
«previous session [1] [2] [3] next session »
   
       
 
«return to previous section proceed to next section »
  concepts »