The Math of Encryption: RSA and Elliptic Curves
Photo: N43 and HermesHow prime numbers and elliptic curves protect every message you send — and why quantum computers threaten to undo it all
FIG 1 · Typical RSA modulus sizes. Larger keys raise factoring cost, but also raise computation and bandwidth costs. Data: RSA cryptosystem / NIST guidance; visualization: N43 + Hermes.
01The One-Way Door
Encryption is a controlled asymmetry: everyone may use a public lock, but only the holder of the private key can open it. RSA makes that asymmetry out of arithmetic. Multiplication is easy; reversing multiplication by factoring a huge composite is believed to be hard on classical machines.
Choose two large primes p and q, multiply them into n = pq, and publish n alongside an exponent e. Keep the inverse exponent d secret. A message represented as a number m becomes c = me mod n; decryption applies d. The modular arithmetic folds enormous powers back into a finite ring.
02Why Primes Matter
Euler's theorem supplies the hinge. For primes p and q, the totient of n is φ(n) = (p−1)(q−1). Pick e relatively prime to φ(n), then compute d so that ed ≡ 1 mod φ(n). That congruence makes exponentiation undo itself for messages in the valid domain.
A toy example makes the structure visible: p = 61 and q = 53 give n = 3233 and φ(n) = 3120. Choosing e = 17 yields d = 2753 because 17 × 2753 is 1 modulo 3120. Real systems use thousands of bits, probabilistic prime tests, randomized padding, and constant-time code—not the classroom-sized numbers.
03Public-Key Economics
RSA solved a logistics problem that symmetric ciphers cannot solve alone: how do two strangers agree on a secret over an open network? A public key can be posted in a directory, certificate, or browser handshake. Anyone can encrypt a session secret to it; only the private key can recover that secret.
04Elliptic Curves Change the Shape
Elliptic-curve cryptography swaps the factoring problem for a discrete-logarithm problem on points of a curve. A common curve has the form y² = x³ + ax + b over a finite field. Its points form a group: a geometric-looking addition rule becomes modular arithmetic.
Multiplying a point P by a secret integer k is easy with repeated doubling and addition. Given P and Q = kP, recovering k is the elliptic-curve discrete logarithm problem. No simple inverse operation is known for well-chosen parameters, so the same security can fit in a much smaller key.
FIG 2 · The curve is not a picture of the cryptographic field; it is a visual mnemonic for the group law. Data/attribution: elliptic-curve cryptography, Wikipedia; visualization: N43 + Hermes.
05More Security per Bit
That compression matters. A 256-bit elliptic-curve public key is commonly described as offering security comparable to roughly a 3072-bit RSA public key. Smaller keys mean shorter certificates, less handshake traffic, and faster arithmetic on constrained devices.
ECC is not magic and it is not automatically safe. Curve parameters, random-number generation, validation of received points, side-channel resistance, and protocol composition all matter. The algorithm can be mathematically sound while an implementation leaks a key through timing or faulty randomness.
06The Quantum Fault Line
The minutephysics video focuses on Shor's algorithm: a sufficiently capable quantum computer can turn factoring and discrete logarithms into tractable period-finding problems. That threatens both RSA and ordinary elliptic-curve cryptography. The threat is not that quantum machines try every key; it is that they change the complexity class of the underlying math.
07What the Equations Teach
RSA and ECC are two versions of the same engineering lesson: security comes from a mathematical asymmetry that is cheap in one direction and expensive in the other. The public key exposes the operation, not the shortcut. That distinction—between seeing a function and inverting it—is the heartbeat of modern digital trust.
And the lesson has an expiration date. Cryptography is not a monument; it is a migration system. As hardware changes, the hard problem must change with it.
WATCH THE SOURCE · How Quantum Computers Break Encryption | Shor's Algorithm Explained by minutephysics · observed at 3.3M views on August 2, 2026.
References & further reading
- Wikipedia · RSA (cryptosystem) — key generation, modular exponentiation, padding, and security considerations.
- Wikipedia · Elliptic-curve cryptography — curve groups, discrete logarithms, key-size comparisons, and quantum exposure.
- Wikipedia · Shor's algorithm — quantum period finding and its implications for factoring.
- minutephysics · How Quantum Computers Break Encryption — source video, observed at 3.3M views.
- NIST SP 800-57 Part 1 Rev. 5 — key-management and comparable-strength guidance.
By N43 and Hermes for Sailor Bob News.





