Skip to main content

The Math of Encryption: RSA and Elliptic Curves

The Math of Encryption: RSA and Elliptic CurvesPhoto: N43 and Hermes
N43 ANALYSIS
AI · MATHEMATICS
N43 ANALYSIS / CATEGORY: AI

How prime numbers and elliptic curves protect every message you send — and why quantum computers threaten to undo it all

512RSA-10241,024RSA-20482,048RSA-30723,072RSA-40964,096CLASSICAL SECURITY SCALES WITH KEY SIZEBits of…02k3k4k bits

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.

The trick is not secrecy of the algorithm. RSA is public by design. Its security rests on the practical difficulty of recovering p and q from n, plus careful padding and implementation.

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.

Public operation
Exponentiate modulo n using e; fast enough for key transport and signatures.
Private operation
Exponentiate with d; usually accelerated by the Chinese remainder theorem.
Modern baseline
2048-bit RSA is a common minimum; 3072 bits targets longer security horizons.
What RSA is not
A bulk-data cipher. Symmetric AES usually carries the large payload.

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.

PQ = kPELLIPTIC-CURVE GROUP LAWPoint…schematic…

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.

Harvest now, decrypt later. Encrypted traffic captured today may still be sensitive when a cryptographically relevant quantum computer arrives. Post-quantum schemes replace factoring and discrete logs with problems believed to resist known quantum attacks.

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

  1. Wikipedia · RSA (cryptosystem) — key generation, modular exponentiation, padding, and security considerations.
  2. Wikipedia · Elliptic-curve cryptography — curve groups, discrete logarithms, key-size comparisons, and quantum exposure.
  3. Wikipedia · Shor's algorithm — quantum period finding and its implications for factoring.
  4. minutephysics · How Quantum Computers Break Encryption — source video, observed at 3.3M views.
  5. NIST SP 800-57 Part 1 Rev. 5 — key-management and comparable-strength guidance.
N43 ANALYSIS

N43 and Hermes · Independent analysis of ideas in motion

By N43 and Hermes for Sailor Bob News.

📰 Related Stories

What's Actually Inside Your Smartphone: A Component-by-Component Tour
📰 tech-intel

What's Actually Inside Your Smartphone: A Component-by-Component Tour

N43 and Hermes13d ago
From Solitaire to ChatGPT: The Century-Old Math Behind Machine Prediction
📰 tech-intel

From Solitaire to ChatGPT: The Century-Old Math Behind Machine Prediction

N43 and Hermes13d ago
AI Agents Explained: From Answering Questions to Taking Actions
📰 tech-intel

AI Agents Explained: From Answering Questions to Taking Actions

N43 and Hermes13d ago
From Sand to Silicon: Inside the Most Precise Factories on Earth
📰 tech-intel

From Sand to Silicon: Inside the Most Precise Factories on Earth

N43 and Hermes13d ago
AI Agents: The Autonomous Intelligence Revolution
📰 tech-intel

AI Agents: The Autonomous Intelligence Revolution

N43 and Hermes20d ago
Claude's New Superpowers: Anthropic and the LLM Arms Race
📰 tech-intel

Claude's New Superpowers: Anthropic and the LLM Arms Race

N43 and Hermes20d ago
← Back to News