Encryption and classic ciphers

Encryption keeps messages secret even if they are intercepted. Classic ciphers show the key ideas used by modern encryption.

Practise this lesson free (7 questions)

More tools

Why encrypt?

Data sent over networks can be intercepted. Encryption turns readable plaintext into unreadable ciphertext using an algorithm and a key.
Only someone with the key can decrypt it back to plaintext.

Caesar and Vigenère

Caesar cipher: shift every letter the same number of places. With a shift of 3, A becomes D and HELLO becomes KHOOR. Z wraps round to C.
It is weak: there are only 25 possible shifts to try.
Vigenère cipher: a keyword sets a different shift for each letter (A = 0, B = 1, C = 2 ...). The keyword repeats along the message.
Key LEMON on ATTACK: A+L = L, T+E = X, T+M = F ... giving LXFOPV.

Rail Fence and Pigpen

Rail Fence: write the message in a zigzag across a number of rows (rails), then read each row in turn.
With 2 rails, HELLOWORLD becomes HLOOLELWRD.
Pigpen: each letter is swapped for a symbol made from the part of a grid it sits in (two noughts-and-crosses grids and two X shapes, with and without dots).
Worked example

Encrypt CAB with a Caesar shift of 4.

  1. C + 4 = G
  2. A + 4 = E
  3. B + 4 = F

Answer: GEF

Key idea

Encryption turns plaintext into ciphertext with a key. Caesar shifts every letter equally; Vigenère uses a keyword for changing shifts; Rail Fence rearranges letters in a zigzag; Pigpen replaces letters with grid symbols.

Key words
Encryption
Scrambling data with an algorithm and a key so only someone with the key can read it.
Shifts
Logical shift left one place multiplies by 2; logical shift right one place divides by 2 (losing any remainder); both fill with 0. Arithmetic shift right fills with copies of the sign bit. Example: 00010110 (22) left 2 = 01011000 (88).
Algorithm
A precise sequence of steps to solve a problem.
Caesar cipher
Encryption that shifts every letter the same number of places along the alphabet.
Vigenère cipher
Encryption that uses a keyword to give a different shift for each letter.

All GCSE and International GCSE Computer Science key terms and definitions →

Quick check

Try two quick questions

See if it has sunk in. Answers are marked straight away.

Extra practice

2 more questions

Try each one, then tap to check.

  1. Encrypt CAT using a Caesar cipher with a shift of 3.

    Show the answer

    Answer: FDW

    Move each letter 3 places forward: C → F, A → D, T → W.

  2. Encrypt YAK with a Caesar shift of 3.

    Show the answer

    Answer: BDN

    Wrap round after Z: Y → B, A → D, K → N.

Check you have got it

Answer 7 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.

Video for this lesson coming soon. Subscribe on YouTube

Sources and references

Facts checked against the sources below, 17 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.

Related lessons