Updated · By Pete Bromfield, former Head of Maths with IB examining experience

IA idea · Pure maths, number & proof

How does RSA encryption work, and how long would it take to break a small key?

AA HLAA SL Ambitious Also in: Networks & graphs, Cryptography

Research question

Why does RSA decryption recover the original message, and how does the time taken to factorise n = pq by trial division grow with the number of digits?

Make it yours, then agree it with your teacher.

Next step: plan this IA free — the planner opens with this question filled in. For feedback on your own draft, the IA package (€39 once) gives you 5 AI feedback credits and every annotated exemplar in full.

Why it makes a good exploration

RSA protects online payments using modular arithmetic. Explaining why it works, encrypting a message by hand, and timing factorisation of growing keys shows exactly why large primes keep secrets safe.

The mathematics you'll need

  • Modular arithmetic (explain)
  • Euler's totient and Fermat's little theorem
  • Modular inverses via the Euclidean algorithm
  • Growth of computation time — exponential in digits

Where the data comes from

Use small primes for worked examples; time a trial-division program for increasing key sizes.

A possible outline

  1. Explain modular arithmetic with examples.
  2. Generate keys with small primes.
  3. Encrypt and decrypt a short message.
  4. Prove why decryption works.
  5. Time factorisation and model how time grows with digits.

Pitfalls that cost marks

  • Only describing the algorithm without proof.
  • Arithmetic errors — check every step with technology.
  • Claiming real keys can be broken by your method.

Showing personal engagement

  • Encrypt a message to a friend and have them decrypt it.
  • Predict the time to factor a 50-digit n from your model.
  • Discuss quantum computing's threat accurately.

See Criterion C: personal engagement for what examiners look for.

Which course is it for?

CourseFitMaths to lean on
AA SLFits — ambitious at SLModular arithmetic (explain); Euler's totient and Fermat's little theorem
AA HLGood fitModular arithmetic (explain); Euler's totient and Fermat's little theorem
AI SLNot a natural fitThe mathematics is mainly AA or HL (calculus or proof beyond AI SL); an AI SL version would need a data-driven, technology-based approach.
AI HLNot a natural fitThe mathematics is mainly from the AA course; an AI HL version would need modelling with technology, statistics or networks at HL level.

Level: Ambitious. Suits confident students; expect to learn some mathematics on your own. See how the IA differs between AA and AI, SL and HL.

How this idea reaches the top bands

Reflection (D)

For this idea, start with the weak points: only describing the algorithm without proof; and arithmetic errors — check every step with technology. Say how each one affects your answer.

Use of mathematics (E)

SL: modular arithmetic (explain); euler's totient and Fermat's little theorem; modular inverses via the Euclidean algorithm; growth of computation time — exponential in digits, each explained in your own words and carried out correctly.

How pure maths explorations reach the top bands in general: Pure maths, number & proof IA ideas. Guides: A · B · C · D · E · self-grade sheet.

Taking it further

Prove Fermat's little theorem by induction or counting.

Extending it for HL

Add an HL technique the question genuinely needs: what an HL pure maths exploration adds.

Frequently asked questions

Which IB Maths course is this IA idea for?

It works for AA HL and AA SL. We rate it Ambitious: it suits confident students, who should expect to learn some mathematics on their own.

What mathematics does this IA use?

Modular arithmetic (explain), euler's totient and Fermat's little theorem, modular inverses via the Euclidean algorithm and growth of computation time — exponential in digits.

Where can I get data for this IA?

Use small primes for worked examples; time a trial-division program for increasing key sizes. Checked sources and tools: OEIS (On-Line Encyclopedia of Integer Sequences).

Turn this idea into your IA

The planner opens with “How does RSA encryption work, and how long would it take to break a small key?” filled in: the question, the maths and the data sources.

Plan this IA free

Your plan is kept in this browser. A free account keeps it with your drafts on any device: Join free · Sign in

Also: free IA self-check · A–E checklist (PDF) · have a draft? AI feedback or a review with Pete (€100)

Writing it up: how to write a Maths IA, step by step · structure and format · mistakes that cost marks · annotated exemplars, marked on every criterion

Similar ideas

All pure maths ideas · AA HL ideas · AA SL ideas · All 239 IA ideas