The Side Quest
πŸ”Ž

The Prime Number That Stops Hackers

Almost all internet security rests on one fact: it's easy to multiply two big primes, and unbelievably hard to factor the result back.

#numbers#technology#internet
← All guides

Every time you buy something online, send an encrypted message, or log in to a secure site, your safety depends on a 2,000-year-old piece of number theory called the factoring problem β€” and a particular kind of number called a prime.

The building blocks

A prime number is a whole number bigger than 1 that can only be divided evenly by 1 and itself. 2, 3, 5, 7, 11, 13 are the first primes. They're the atoms of arithmetic β€” every other whole number can be built by multiplying primes together. 12 = 2 Γ— 2 Γ— 3. 15 = 3 Γ— 5. Primes can't be broken down further.

The one-way operation

Multiplying two big primes is easy:

  • Take a 200-digit prime p and a 200-digit prime q.
  • Multiply them: p Γ— q = N. A computer does this in milliseconds.

The reverse is the factoring problem:

  • Given N (the product), find p and q.

For 200-digit primes, no known method can do this in any reasonable time β€” not on a laptop, not on a supercomputer, not in the lifetime of the universe with current algorithms. The fastest known methods would take millions of years.

That asymmetry β€” easy one direction, almost impossible the other β€” is the basis of RSA encryption, the cryptographic system that protects most of the internet.

How RSA uses it

  1. Generate two big primes p and q (your "private key").
  2. Publish their product N = p Γ— q (your "public key").
  3. Anyone can use N to encrypt a message to you.
  4. To decrypt, you need to know p and q β€” which only you have.

Anyone intercepting the encrypted message sees N, but to decrypt, they'd have to factor it back into p and q. With current algorithms and 2048-bit keys, that's computationally infeasible. The math outpaces the attacker.

Why this is wild

The security of the internet rests on the assumption that factoring is genuinely hard. Nobody has proven this. There's no theorem that says "factoring is hard." It's an empirical fact about the limits of current algorithms. A breakthrough in factoring β€” a faster algorithm, or a quantum computer large enough to run Shor's algorithm β€” would, in an afternoon, break RSA and most online encryption.

This is why governments and companies are racing toward post-quantum cryptography: new systems whose hardness doesn't depend on factoring, so that when quantum computers arrive (and they're coming), the internet doesn't break.

The primes keep us safe

We don't know if primes are "hard to factor" because of a law of mathematics or because we just haven't found a good algorithm yet. For now, the answer is: they're hard enough. Every secure transaction you make is a bet on that empirical fact.

A prime number is the smallest indivisible thing in arithmetic. The product of two primes, multiplied together, is one of the largest locks ever built. The internet's security rests on the gap between those two facts β€” and on the bet that nobody closes it tomorrow.

Written with πŸ’– by Waela Β· Back to The Side Quest

Built with πŸ’– by Waela