Why teach cryptography in a maths class?
Cryptography answers the question every maths teacher hears: "When will I ever use this?" Modular arithmetic, prime factorisation and exponentiation stop being abstract the moment students see them guarding a bank transfer. CryptoMath is built to make that visible — every concept starts with something students can manipulate, then gets formalised.
What you need: a browser. That's it. Works on school Chromebooks, tablets and phones. Nothing to install, no student accounts required, and no data collected from pupils who don't sign in. Bilingual English/Arabic throughout.
Curriculum links
| Topic | Prior knowledge | Suggested age |
|---|---|---|
| Modular arithmetic | Division with remainders | 13+ |
| Primes & RSA | Factors, powers, modular arithmetic | 15+ |
| Hashing & blockchain | None (conceptual) | 14+ |
| Quantum & post-quantum | Awareness of RSA | 16+ |
Lesson 1 — Clock arithmetic & the one-way door
Modular arithmetic
Learning objectives
- Calculate
a mod nand explain it using a clock face. - Recognise that modular arithmetic "wraps around" and loses information.
- Explain why that information loss makes reversal hard.
Starter (10 min)
- "It's 9 o'clock. What time is it 8 hours later?" Establish that 9 + 8 = 5 on a clock — that's
17 mod 12. - Quick-fire:
25 mod 7,100 mod 12,50 mod 9.
Main activity (25 min)
- Open the Modular Arithmetic section and use the live calculator on the board.
- In pairs, students compute
7² mod 11, then7⁴, then7⁸— noticing the numbers stay small. - Build up to
7¹³ mod 11using the worked example on the learning path.
Plenary (15 min)
- Discussion: "Given only the answer 2, could you work out the question was 7¹³?" Draw out that many inputs give the same output.
- Exit ticket:
3⁴ mod 5(answer: 1).
Extension
- Set the Arcade Blitz as a timed challenge — 60 seconds of modular exponentiation.
Lesson 2 — Primes, RSA & breaking a real key
Primes & RSA
Learning objectives
- Explain why primes are the "atoms" of multiplication.
- Walk through RSA key generation on small numbers.
- Articulate why factoring large semiprimes is computationally hard.
Starter (10 min)
- Race: multiply 61 × 53 (fast). Then: factor 3233 (slow). Time both — the asymmetry is the lesson.
Main activity (35 min)
- Work through the RSA guide together: p, q, n, φ(n), e, d.
- Students encrypt the letter "A" (65) with the public key (3233, 17) → ciphertext 2790.
- Then decrypt it back with d = 2753. The round trip is the "aha" moment.
Plenary (15 min)
- Students attempt the Weakened RSA boss battle in pairs — factoring, totient, private key, decrypt.
Answers
- 3233 = 61 × 53 · φ(n) = 3120 · d = 2753 · m = 65 ("A")
Lesson 3 — Hashing, blockchain & proof of work
Hashing & blockchain
Learning objectives
- Describe a hash function as a one-way fingerprint.
- Observe the avalanche effect — one character changes everything.
- Explain how chained hashes make a ledger tamper-evident.
Starter (10 min)
- Open the Simulator, hash a student's name, then change one letter. Show the output is completely different.
Main activity (25 min)
- Students mine a block by finding a nonce that produces leading zeros — real SHA-256, in the browser.
- Then tamper with an earlier block and watch every later block turn invalid.
Plenary (15 min)
- Discuss: why does this make a distributed ledger trustworthy without a bank?
- Introduce the birthday attack: why hashes need 256 bits, not 64.
Lesson 4 — The quantum threat
Quantum & post-quantum cryptography
Learning objectives
- Explain at a high level how Shor's algorithm threatens RSA and ECC.
- Distinguish Shor's (exponential) from Grover's (quadratic) speedup.
- Describe lattice-based cryptography and name the NIST standards.
Starter (10 min)
- Provocation: "Everything you encrypted in Lesson 2 could be broken. Not by a better computer — by a different kind of computer."
Main activity (25 min)
- Work through the post-quantum guide, focusing on the table of what breaks and what survives.
- Use the Quantum page's classical-vs-quantum comparison.
- Discuss "harvest now, decrypt later" — a genuinely current policy problem.
Plenary (15 min)
- Debate: should governments mandate post-quantum migration now, given the cost and the uncertainty about timelines?
Assessment & certification
Students who complete all eight stages of the learning path can generate a free Certificate of Completion — digitally signed and carrying a QR code anyone can verify. It works well as an end-of-unit credential, and students can add it to LinkedIn.
For quick formative assessment, each concept section ends with a self-marking quiz, and the Challenges page provides graded practice problems.
Using this in your classroom?
We'd genuinely like to hear how it goes — what worked, what confused students, what's missing. It shapes what gets built next.