Skip to main content

Lesson 1, the Caesar shift cipher and pattern detection

The simplest cipher, but a great introduction to both the implementation and cracking of a code.

Powerpoint slides

Lesson 2, frequency analysis

Cracking substitution ciphers depends on finding hidden patterns in the text. Frequency analysis is your friend and is where the mathematics begins.

Powerpoint slides

Lesson 3, the affine shift cipher

This is an introduction to modular arithmetic and builds on the first two lessons.

Powerpoint slides

Lesson 4, breaking the affine shift cipher using modular inverses

A look at the mathematics behind the cipher, how to solve equations in modular arithmetic, and how that helps us break the affine shift cipher using inverses in modular arithmetic.

Powerpoint slides

Lesson 5, the keyword cipher

Examines how to implement a much richer family of field ciphers based on an agreed keyword, and considers how to crack one in which the word structure is given, using cribs.

Powerpoint slides

Lesson 6, cracking a keyword cipher using frequency analysis and cribs

This lesson takes what we know about frequency analysis and cribs and uses it to crack a much harder example of a keyword cipher in which the word structure is hidden.

Powerpoint slides

A fabulous history of codes, ciphers and the people who cracked them

Buy book at Amazon

Cryptography, a very short introduction

Buy book at Amazon

Programming for cryptologists, 101

A fantastic short introduction to programming for beginners interested in using computers to break codes and ciphers. Julian Bhardwaj, long time participant in the National Cipher Challenge and finalist in the UK Cyber Security Championship, wrote these notes and kindly offered them to us.

Download programming guide


There is a rich a variety of careers for mathematicians in just about every aspect of the economy. Here are a few that might appeal to you if you have enjoyed the Challenge

GCHQ have a number of technical roles which require strong mathematics skills, an enquiring m1280px-government_communications_headquarters_logo-svgind and dedication. You can find out more about some of them here

ibm-logo-blueIBM run a GAP year program. Search their vacancies for “Future Scheme”. This year’s placements start on July 17th so you should be looking now.