Symmetric key cryptography


Symmetric key cryptography started thousand years ago, when people needed to exchange secrets (for example in a war ). We still mainly uses symmetric key cryptography in our network security. However, today ciphers are much more complex. Let us first discuss traditional algorithms, which were character oriented. Then we discuss modern one which are nit oriented.


Traditional ciphers : We briefly introduce some traditional ciphers, which are character oriented. Although these are now obsolete, the goal is to show how modern cipher evolved from them. We can divide traditional symmetric key ciphers in to two broad categories namely -- substitution ciphers and traditional ciphers, as shown in the following figure.



Substitution ciphers : A substitution cipher substitute one symbol with another. If the symbol in the plain text are alphabetic character, we replace one character by another. For example, we can replace character 'a' with character 'd' ,  and character 't' with character 'z'. If the symbol are digits (0-9), we can replace '3' with '7' and '2' with '6'. 

Substitution ciphers are categorised as :
  • Mono Alphabetic ciphers and
  • Poly Alphabetic ciphers.
A substitution cipher replaces one symbol with another.

Mono Alphabetic cipher : In a mono alphabetic cipher a character or symbol in the plain text is always replaced by the same character or symbol in the cipher text regardless it's position in the cipher text. For example, if the algorithm says that character 'A' in the plain text is to changed to character 'D', then every character 'A' is changed to character 'D'. In other words, the relationship between plain text and cipher text is one-to-one relationship.

Poly Alphabetic cipher : In a poly alphabetic cipher each occurrence of a character can have a different substitution. The relationship between characters in the plain text and cipher text is one to many relationship. Character 'A' would be changed to 'D' in the beginning of the text but it could be changed to 'N' at the middle.

Example : The following shows a plain text and their corresponding cipher text, is the cipher text mono alphabetic ?


Plain Text : h e l l o 
Cipher Text : K H O O R

Sol : The cipher text is probably mono alphabetic, because both occurrence of L's are encrypted as O's.

Example : The following shows a plain text and it's corresponding cipher text, is the cipher mono alphabetic ?

Plain Text : h e l l o
Cipher Text : A B N Z F

Sol : The cipher is not mono alphabetic, because both occurrence of 'L' is encrypted by different character. The first 'L' is encrypted as 'N' and the second as 'Z'.



Shift cipher : The simplest mono alphabetic cipher is probably the shift cipher. We assume that the plain text and cipher text consists of uppercase letter (A-Z) only. In this cipher, the encryption algorithm is 'shift key character down' with key equal some number. The decryption algorithm is 'shift key character up' . For example; if the key is 5 the encryption algorithm is 'shift 5 character down' (towards the ends of the alphabets). The decryption algorithm is 'shift 5 key character up'(towards beginning of the alphabets). Of course it will reached the end or beginning of the alphabet wrap around. Julies caesar use the shift cipher to communicate with his officers. For this reason the shift cipher is some time also called caesar cipher. Caesar uses a key of 3 for his communication.

Example: Use the shift cipher with key 15 to encrypt the message 'hello'.



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 
0  1  2  3  4  5  6  7  8  9 10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25




Example : Decrypt the message 'WTAAD' by using shift cipher with key 15.

Sol :  'WTAAD' is decrypted into 'hello' (see above figure).


Representation of plain text and cipher text character into Z26




Additive cipher
















Comments

Popular posts from this blog

Euclid's Algorithm to find greatest common divisior

Algebraic System or Algebraic Structure and Group