CS Unplugged activity
Caesar Cipher: lesson plan
A short teacher-led plan for Caesar Cipher: hide a message by shifting every letter, then crack one with no key. About 50 minutes. Leaving it for a sub? Use the box below.
Students will be able to
- Encrypt and decrypt a message with a shift (Caesar) cipher and a key.
- Crack a Caesar cipher by trying every key.
- Explain why a cipher with only 25 keys isn’t safe.
Before class
- Print one worksheet per student.
- Print keep-going sheets from the New set page: Copies = class size, Sets per student = 2 (front and back).
- Optional: the slides and the cipher wheel (needs scissors and a brad).
The lesson
1. Hook (5 minutes)
Show the slides through HELLO becomes KHOOR. Ask a student to decode KHOOR out loud with key 3.
2. The sheet (20 minutes)
Students fill in their shift table, decode the messages, then encode one of their own. The most common mistake is shifting the wrong direction when decoding: decoding moves letters back.
3. Crack it (10 minutes)
Show the No Key at All? slide and let students guess how to crack a message before they start the last part of the sheet.
4. Keep going (as students finish)
Partners trade encoded messages, then keep-going sheets.
5. Wrap-up (5 minutes)
Ask: “How long would cracking a Caesar cipher take a computer?” (Less than a blink: only 25 keys.) “So how do real ciphers stay safe?” (So many keys that trying them all would take longer than the age of the universe.)
Going further
- Programming students: the CS50 Caesar problem set
has them write this cipher in Python, with the key typed on the command
line. It works best right after the paper version, because students
already know exactly what the program should do. It’s online, not
printed, and checks itself with
check50. - Cracking it a smarter way: Caesar Cipher: cracking it with letter frequency finds the key without trying all 25.
- A cipher that’s much harder to crack: Vigenère Cipher uses a keyword, so each letter shifts by a different amount.
Standards alignment
Version history
- Loading commit history…