Encryption and Decryption

Given Data:

            Plain text         :           xABBB

Key                 :           x0FFF

 

Solution (Encryption):

  1. Let us consider the universal ASSCII values for the total character set between NULL to DEL (ie) 0 to 127 (Decimal values) respectively.
  2. Now we form a table for the Plain text, Key and their corresponding ASSCII values.

 

S.No Plain text ASSCII Value Key ASSCII Value
1 x 120 x 120
2 A 65 0 48
3 B 66 F 70
4 B 66 F 70
5 B 66 F 70

 

  1. Now add the ASSCII values of Key and Plain text.
  2. Mod the obtained values by the greatest value in the series, in this care 127.
  3. The corresponding character of the obtained ASSCII values obtained gives out the Encrypted Text.

 

S.No Sum of ASCII Values Sum (mod) 127 Character
1 240 113 q
2 113 113 q
3 136 9 TAB(horizontal TAB)
4 136 9 TAB(horizontal TAB)
5 136 9 TAB(horizontal TAB)

 

  1. Hence the encrypted text is given by “qq                              “according to ASSCII Conversion.

 

 

 

Solution (Decryption):

The encrypted text is “qq                                “and the Key is “x0FFF”.

  1. A table is made for the ASCII values of the encrypted text and the Key.

 

S.No Encrypted Text ASSCII Value Key ASSCII Value
1 q 113 x 120
2 q 113 0 48
3 TAB 9 F 70
4 TAB 9 F 70
5 TAB 9 F 70

 

  1. find the sum of ASCII value and 127 to form the Modifies Encrypted text
  2. Now find the difference between the ASCII Values.
  3. Find the value of ASCII difference (mod) 127.
  4. Find the corresponding character for the value obtained.

 

S.No ASSCII value of ET+127 Key ASSCII ASCII difference ASCII difference (mod) 127 Character
1 240 120 120 120 x
2 240 48 192 65 A
3 136 70 66 66 B
4 136 70 66 66 B
5 136 70 66 66 B

 

 

  1. Hence the original text is “xABBB