Chapter 3-1
Chapter 3-1
Cryptography
3.1 Introduction
1. Caesar cipher
Text : ABCDEFGHIJKLMNOPQRSTUVWXYZ
Shift: 23 Cipher: XYZABCDEFGHIJKLMNOPQRSTUVW
Text : ATTACKATONCE
Shift: 4 Cipher: EXXEGOEXSRGI
Substitution Techniques
1. Caesar cipher
The Caesar Cipher is one of the simplest and oldest
methods of encrypting messages, named after Julius
Caesar. This technique involves shifting the letters of the
alphabet by a fixed number of places.
• Plain Text: O A K
• Key: S O N
O ==> 14 = 0 1 1 1 0
S ==> 18 = 1 0 0 1 0
Plain Text: O A K
NO: 14 00 10
KEY: S O N
NO: 18 14 13
Example 2
• Plain-Text: RAMSWARUPK
• Key: RANCHOBABA
PT: R A M S W A R U P K
NO: 17 0 12 18 22 0 17 20 15 10
KEY: R A N C H O B A B A
NO: 17 0 13 2 7 14 1 0 1 0
• Now Bitwise XOR the number of Plain-Text and Key and
after doing the XOR operation and subtraction operation (if
required), we will get the corresponding Cipher-Text
character number.
CIPHER-TEXT: A A B Q R O Q U O K