Skip to main content
### Number and algebra

### Geometry and measure

### Probability and statistics

### Working mathematically

### For younger learners

### Advanced mathematics

# Substitution Cipher

Or search by topic

Age 11 to 14

Challenge Level

- Problem
- Getting Started
- Student Solutions
- Teachers' Resources

Start by performing a frequency analysis on some selected text to see which letters appear most often. It is better to use longer texts, as a short text might have an unusual distribution of letters, like the *"quick brown fox..."* mentioned in the problem.

The toolkit allows you to change a pair of letters quickly and see the effect it has on the message. Alternatively, you could use Word's "Find and Replace" feature, with the 'Match Case' option, to change one letter at a time. You can distinguish between the coded message and the deciphered letters by using lower case for the coded message and replacing each letter by the upper case letter you think it represents.

The whole message has been encoded by switching pairs of letters.

For example, B and P have been switched so that every P is replaced by B, and every B replaced by P.