CYBER SECURITY — QUESTION 1
1. Caesar Cipher (10 Marks)
Definition
Caesar Cipher is a classical substitution cipher where each letter in the plaintext is shifted by a fixed number of positions in the alphabet.
Working
- Choose a shift key (k), e.g., 3.
- For each alphabet letter in plaintext, replace it with the letter k positions forward in the alphabet.
- If it goes beyond ‘Z’, wrap around.
- Non-alphabetic characters remain unchanged.
Encryption Formula
Ci = (Pi + k) mod 26
Decryption Formula
Pi = (Ci – k) mod 26
Example
Plaintext: HELLO