Lec 4
Lec 4
Encryption Process
1. H→K
2. E→H
3. L→O
4. L→O
5. O→R
Ciphertext: KHOOR
How Caesar Cipher Works
Decryption Process
To decrypt the message, the same process is reversed.
You subtract the key from each letter to return to the
original plaintext.
For example, to decrypt KHOOR with a key of 3:
•K → H
•H → E
•O → L
•O → L
•R → O
Thus, the decrypted plaintext is HELLO.
How Caesar Cipher Works
Caesar Cipher is a method in which each letter in the
alphabet is rotated by three (key) letters as
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
C = Ciphertext character
K = Key (number of shifts)
The encryption function is: C = (P+K) mod 26
The decryption function is: P = (C−K) mod 26
Example:
Class Work
Plaintext: “CRYPTOGRAPHY"
Ciphertext: "KIUDCZIXYDFU“
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA