Technologies K–10 · Years 7–8
The Caesar cipher: encrypting, then breaking it by trying every key
Digital and Communication Technologies focus area (NSW Technology 7–8, 2023); Digital Technologies: Knowledge and understanding, Digital systems (ACARA v9)
This site has no interactive model of its own. Where a step or a material names a Concept Studio model, simulation or tool, it has not been built; an external simulation a step names (for example PhET) is not part of this site.
The idea
Encryption turns data into a form only the key-holder can read, and a cipher with only 25 useful keys is broken by trying them all, which is why network encryption uses keys with an astronomically large number of possibilities.
What you need
- Paper cipher wheel (two alphabet rings)
- Spreadsheet software (CODE, CHAR and MOD functions)
- A partner's encrypted paragraph of at least 200 letters
How to do it
- Encrypt ATTACK AT DAWN with a shift of 3 on the cipher wheel.
- Build a spreadsheet that encrypts: =CHAR(MOD(CODE(A1)-65+shift,26)+65) for each uppercase letter.
- Decrypt the result with a shift of −3 and check it matches the original.
- Receive a partner's message without the key. Fill 25 rows with every shift and find the one that reads as English.
- On the long paragraph, count each letter and use the most common one to guess the key without trying all 25.
- Compare 25 keys with the number of keys for a 128-bit key and explain why brute force fails there.
What you should see
ATTACK AT DAWN with a shift of 3 is DWWDFN DW GDZQ; shifting back by 3 returns ATTACK AT DAWN. Trying all 25 shifts always finds the message, so the Caesar cipher gives no real security. In long English text E is the most common letter, so the most common ciphertext letter usually reveals the shift. A 128-bit key has 2¹²⁸ = 340,282,366,920,938,463,463,374,607,431,768,211,456 possible values (about 3.4 × 10³⁸). The learner knows it worked when the spreadsheet decrypts a partner's message with the key found by brute force.
What changes
This activity lists no variables to change, measure and keep the same.
Common misconceptions
Each of these ideas is wrong, and the activity is a chance to test it.
- A secret method keeps a message safe (security must come from the key, not the method).
- Longer messages are harder to break (they give frequency analysis more evidence).
- Encryption hides who is talking to whom (it hides the content; addresses on packets still show).
Safety card
Hazards
- None beyond normal computer use
Controls
- Not applicable
Note
No chemicals or heat.
Curriculum references
The NSW syllabus outcomes and Australian Curriculum v9 codes this activity supports. They are references, not a verified or complete curriculum alignment.
- Technology 7–8 Syllabus (2023), NESA. Current: taught from 2026. Code read from the outcomes page on 2026-09-22.TE4-DIG-01
- Technology Mandatory 7–8 Syllabus (2017), NESA. Outgoing: replaced by the Technology 7–8 Syllabus (2023) from 2026 and not available after December 2027. Code read from the official syllabus document (DOCX) on 2026-09-22.TE4-7DI
- Australian Curriculum v9AC9TDI8K02
Sources
The pages the author read to write this activity.
- curriculum.nsw.edu.au/learning-areas/tas/technology-7-8-2023/outcomes
- www.nsw.gov.au/education-and-training/nesa/curriculum/tas/technology-mandatory-7-8-2017
- www.digitaltechnologieshub.edu.au/teach-and-assess/classroom-resources/lesson-ideas/keeping-secrets
- www.digitaltechnologieshub.edu.au/teach-and-assess/classroom-resources/lesson-ideas/ciphering-a-sentence