Lesson 4 of 17 · 40 minutes
Keep a secret, catch a change
Use a shift cipher to see how a key protects a message, then use a fingerprint to tell whether a file was changed.
Student handout
Try one together
My key is 4, so C becomes G, L becomes P, U becomes Y and B becomes F. I send GPYF. My partner knows the key, counts back four and reads CLUB.
The locker note
The Harbor School puzzle club hides the start of its scavenger hunt in a scrambled note. A copy of the hunt rules is also going around, and one copy looks different. You are the club’s code cracker. Everything on these cards is invented.
Evidence cards
- Note found by locker 114. “AOL OBUA ZAHYAZ HA AOL NFT KVVY”
- Club cipher card. Every letter moved forward the same number of places, wrapping from Z back to A. That number is the key. A shift cipher has only 25 keys that change the message.
- Real-world card. The encryption that protects a web page uses a key picked from more possibilities than every computer on Earth could try in billions of years.
- Fingerprint card. The adviser posted the rule START AT NOON with fingerprint 157. The club fingerprint adds the position of every letter, so A adds 1 and Z adds 26. The hallway copy of the rule says START AT NINE.
Work the class case together
- Decode the worked example’s GPYF yourself to check the method. Then look at the locker note. One three-letter word appears twice. Use it to guess the key.
- A partner chooses a key and whispers it to you. Scramble a three-word invented reply and trade. Explain why the key must travel by a different route from the note.
- Fingerprint the hallway copy. Compare it with the adviser’s number. Say what the fingerprint proves and what it cannot tell you about who changed the rule.
Crack the Locker Note
Grades 7–8 · 15–20 minutes
You moved four letters by hand. Now turn a cipher wheel to crack the whole locker note, send a secret reply and catch the copy of the rules that changed.
- Turn the wheel until the note reads as English. Record the key and how many keys you tried.
- Scramble a short invented reply and choose how the key should reach your partner.
- Fingerprint both copies of the rule. Decide which copy still matches the adviser’s and what the fingerprint cannot tell you.
What to turn in. Hand in the key, your count of tries and both fingerprints. Add one sentence on why real encryption cannot be cracked the way you cracked the note.
Words for this case
- Encryption
- Scrambling information so that only someone with the right key can read it.
- Key
- The secret piece of information that locks and unlocks an encrypted message.
- Cipher
- The method used to scramble a message. A shift cipher moves every letter the same number of places.
- Brute force
- Trying every possible key until one works.
- Hash
- A short fingerprint calculated from a file. Change the file and the fingerprint changes too.
Try this if you’re stuck. Write the alphabet on two paper strips. Slide the bottom strip to line up a guess, then read straight across. Try the shortest words first.
Take it further. TAB and BAT have the same club fingerprint. Explain why. Then explain why the fingerprints used for real downloads are designed so that nobody can find two files that match.
Exit ticket
Encryption and hashing do different jobs. Which one keeps a note secret? Which one shows that a download was changed? Match each to a security goal from lesson 1.
Skill unlocked · Code Cracker. Tick it on your skill tracker once you can explain your exit ticket answer to a partner.
Teach this lesson
4 minutes · Race the KHOOR warm-up. Ask what a reader must know to undo the scramble and name that piece the key.
8 minutes · Introduce the terms with the worked example. Model moving one word by a key of 4 and back again. Ask how many different keys a shift cipher can have.
18 minutes · Give each pair Crack the Locker Note in its browser or paper edition. One partner turns the wheel while the other tallies keys tried. Swap roles for the reply and the fingerprint check.
5 minutes · Draw two columns headed Keeps it secret and Shows it changed. Sort the note, the key, the fingerprint and the hallway copy. Ask why the fingerprint cannot name a person.
5 minutes · Give the exit individually. Collect one job for encryption, one for hashing and the matching security goals.
What to look for
Students find the key by reasoning from a repeated word or by an organized brute-force search. They explain that the key must stay private, and they separate keeping a message secret from detecting a change.
