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

  1. Choose a shift key (k), e.g., 3.
  2. For each alphabet letter in plaintext, replace it with the letter k positions forward in the alphabet.
  3. If it goes beyond ‘Z’, wrap around.
  4. Non-alphabetic characters remain unchanged.

Encryption Formula

Ci = (Pi + k) mod 26

Decryption Formula

Pi = (Ci – k) mod 26

Example

Plaintext: HELLO