Skip to content
The Lumenary
Grades 3–5Applied MathematicsPlanned

Secret codes

Hiding messages with simple codes: Caesar shifts on an alphabet wheel, substitution ciphers, breaking codes by counting letter frequencies, and why the alphabet 'wraps around'.

math.applied.secret-codes

The lesson for this topic has not been written yet. The outline below is part of the curriculum map and has not been reviewed.

Builds on

Required prerequisites, all the way down: 3

You will learn to

  • Encode and decode messages with a Caesar shift using an alphabet wheel.
  • Break a Caesar cipher by trying every shift, and a simple substitution cipher by counting letter frequencies.
  • Explain why shifting past Z wraps around to A.

Definition

  • A cipher is a rule for turning a message into a disguised form and back again.
  • A Caesar shift replaces each letter by the letter a fixed number of places later in the alphabet, wrapping round from Z to A.
  • The key is the secret information needed to decode a message, such as the size of the shift.

Theorem

  • A 26-letter alphabet has only 25 non-trivial Caesar shifts, so the cipher can be broken by trying them all.
  • A shift forward by k is undone by a shift forward by 26 − k.
  • In English text some letters, such as E, are much more common than others, which helps to break substitution ciphers.

Common misconceptions

  • Thinking a code is secure because the message looks scrambled.
  • Forgetting to wrap around at the end of the alphabet.

Optional discoveries

Further reading

  • Simon Singh, The Code Book (1999)