Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Technology 5 min read

The Maths That Keeps Your Passwords Safe

Multiplying two primes is easy. Un-multiplying them is so hard it guards the internet.

Online security leans on a lovely asymmetry: some sums are quick forwards and brutally slow backwards. Multiplying two large primes is instant; finding those primes again from the product can take centuries.

The one-way street

Pick two primes, say 61 and 53. Multiplying gives 61×53=323361 \times 53 = 3233 in a blink. Now hand someone only 3233 and ask which two primes made it — they must test factors one by one.

With tiny numbers that is trivial. But encryption uses primes hundreds of digits long, so the product has 600+ digits and no known shortcut cracks it in any human timescale.

N=p×qN = p \times q

Easy to compute N; finding p and q from N is the hard part.

Why the lock holds

The best classical algorithms still scale roughly exponentially with the size of the number. Double the key length and you do not double the cracking time — you multiply it enormously.

A toy key

  1. 1

    Build the public number

    61×53=323361 \times 53 = 3233
  2. 2

    To break it, trial-divide

    Test 2, 3, 5, 7, ... until a prime divides 3233. Real keys have hundreds of digits, so there are astronomically many primes to try.

Answer

The security is not a secret trick — it is sheer arithmetic difficulty that grows faster than any attacker can keep up with.

The formula behind it

Fermat’s Little Theorem

ap−1≡1(modp)a^{p-1} \equiv 1 \pmod{p}
See the full formula, variables and more examples

The takeaway

Your logins are guarded less by cleverness than by a multiplication nobody can run in reverse.

Back to all stories