Skip to content

Teaching Cryptography with the Caesar Cipher: A Lesson Plan

A 45-minute lesson that takes students from making a cipher to breaking one. Adjust the timings to your group.

  1. 10 min

    Make a wheel

    Print and cut out the two discs, then join them with a paper fastener.

    Open the wheel
  2. 10 min

    Encrypt a message

    Choose a sentence and a shift, then swap with a neighbour.

    Check in the tool
  3. 15 min

    Break a code

    Crack a message with no key by trying every shift.

    See every shift
  4. 10 min

    Discuss

    Why did it fail so fast, and what would make it harder?

    Next: Vigenère
advertisement

Why teach with the Caesar cipher?

Students can use the Caesar cipher by hand within minutes and break it in the same lesson. That short loop gives you a way into ideas that return later in computing and maths: what a key is, why the number of possible keys matters, and how counting modulo 26 wraps around the alphabet. It needs nothing more than paper. If students need a recap first, send them to our beginner's guide.

The lesson, step by step

1. Make a wheel (10 minutes)

Bring scissors and paper fasteners. On the cipher wheel page, the print button gives you the two discs, one sheet per student. Students cut them out and join them with a fastener, then turn the inner disc three places and read what A becomes. With no printer, two paper strips with the alphabet written on them do the same job.

2. Encrypt a message (10 minutes)

Each student picks a short sentence and a shift, encrypts it on the wheel and checks it in the tool. Then they swap papers with a neighbour, say which shift they used and decrypt each other's message. Look closely at letters near the end of the alphabet, because that is where the count wraps around.

3. Break a code (15 minutes)

Write this on the board without giving the shift, and let pairs try one shift after another:

Tlla tl ha aol spiyhyf ha uvvu
Show the answer

Shift 7: Meet me at the library at noon.

Ask how they knew when to stop. Only one shift gives readable text, which is why a computer can check them all. Finish with the solver, which lists every shift at once.

4. Discuss (10 minutes)

Ask why the cipher failed so quickly and what would make it harder. Two answers lead somewhere useful. More possible keys points to the substitution cipher, and the frequency analysis tool then shows that many keys alone are not enough. Changing the shift as you go points to the Vigenère cipher.

More ideas for class

For a longer session, hide encrypted clues around the room, with each clue giving the shift for the next. Groups who already code can write the cipher themselves, starting from our Python or JavaScript tutorial. In a maths lesson, work through E(x) = (x + k) mod 26 for a few letters by hand. Language classes can paste a long text into the frequency tool and compare its bars with the expected ones.

How to check understanding

Set three short tasks: encrypt a word with a given shift, decrypt a word with a given shift, and break a sentence with no shift given. Then ask one question to answer in their own words: why are 25 possible keys too few? That answer shows whether they have understood why keys matter.

What to tell students about security

Say plainly that this cipher protects nothing today and that real systems use modern encryption such as AES. Keep real passwords and personal details out of the exercises, so nobody learns to treat a Caesar shift as protection.

Frequently asked questions

What age group is this for?

Anyone who can count along the alphabet can encrypt and decrypt. The modulo formula and the programming ideas suit older students, so pick the parts that fit your class.

Do students need computers?

No. Print the wheels in advance and the whole lesson runs on paper. The online tools are only there to check answers.

Do the tools cost anything?

No. The tools on this site are free to use, and students do not need an account.

Can we use a national alphabet?

Yes. The Caesar tool and the wheel also offer Polish, German, Spanish and French alphabets, so remember that the number of shifts then depends on the alphabet.

More cipher tools and guides