sarvesh.
Blogs

Cryptography, explained in a way you'll never forget

If you’ve been following the crypto news, you’ve probably wondered whether AI could break the math that protects Bitcoin. And where do quantum computers fit into that story? Once you understand the fundamental idea, everything from RSA and elliptic curves to quantum computing and lattice cryptography starts making sense.

The entire world of cryptography revolves around a beautiful observation:

Some mathematical operations are incredibly easy to perform in one direction but ridiculously difficult to reverse.

But before we get into the mathematics, let's understand why we even need cryptography.

1. The problem humanity needed to solve

Imagine you want to send me a secret message. You put it inside a box, lock it, and send it to me.

Even if someone intercepts the box, they cannot read the message.

But there's a problem. How do you send me the key to open the box without someone intercepting the key itself?

This is the fundamental key-distribution problem of cryptography.

There are two approaches to solving it.

Symmetric cryptography: We both possess the same key. You lock the box, and I unlock it using an identical key.

Asymmetric cryptography: I manufacture a padlock and distribute it to everyone in the world. Anyone can use my padlock to lock a box, but only I possess the key that opens it.

Symmetric
Same secret key
Asymmetric
Public Private Two related keys

The padlock is your public key. The key that opens it is your private key.

You can literally publish your public key on Twitter, and everyone can use it to encrypt messages intended for you (assuming you're using an encryption-capable public-key scheme).

But how do we manufacture such a magical digital padlock?

That's where mathematics comes in.

1.1. DES and AES — how we actually hide our messages

Before we get into public and private keys, let's understand how symmetric encryption actually works.

Imagine you and I both have a machine that takes a readable message and scrambles it into complete gibberish. We both enter the same secret number into our machines.

Your machine scrambles the message. My machine unscrambles it.

Anyone who intercepts the scrambled message, but doesn't know our secret number, sees meaningless information.

In 1977, the US government standardized a mathematical scrambling technique called DES (Data Encryption Standard).

DES used a 56-bit secret key. That meant there were roughly 72 quadrillion possible keys.

That sounded enormous in 1977.

But computers kept getting faster. In 1998, a specially built machine cracked a DES key in just 56 hours.

Humanity needed a stronger lock.

In 2001, DES's successor was standardized: AES (Advanced Encryption Standard). Advanced Encryption Standard (AES)The Cornerstone of Cybersecurity – Cryptographic Standards and a 50-Year EvolutionAES: Keeping Your Data Secure with Advance Encryption Standard

Conceptual illustration of symmetric encryption
Original messageMeet me at 5 PM
AES + secret key
Encrypted message8f3a9c71d02e4b6f...
AES + same secret key
Recovered messageMeet me at 5 PM

AES repeatedly substitutes, rearranges and mixes pieces of your data using a secret key. The process is deliberately designed to be reversible with the key but extraordinarily difficult to reverse without it.

Look at the difference in the number of possible keys:

AlgorithmPossible keys
DES2⁵⁶
AES-1282¹²⁸
AES-1922¹⁹²
AES-2562²⁵⁶

AES-256 has approximately 10⁷⁷ possible keys. The observable universe is estimated to contain around 10⁸⁰ atoms.

That's the scale of numbers we're dealing with.

And AES is practically everywhere:

  • HTTPS connections and online banking.
  • iPhone and Mac storage encryption.
  • Windows BitLocker.
  • Wi-Fi encryption.
  • VPN connections.
  • Cloud databases and storage.
  • Password managers.

AES is the workhorse of modern encryption. It's incredibly fast, and modern processors even have specialized hardware instructions for it.

But remember our original problem: how do you and I establish that shared secret key in the first place without someone intercepting it?

That's where asymmetric cryptography comes into the picture.

2. RSA — the magic of prime numbers

In 1977, three mathematicians — Rivest, Shamir and Adleman — came up with a beautiful idea.

Take two prime numbers:

17 × 23 = 391.

Multiplying them is incredibly easy.

But what if I just give you 391 and ask you to find the original two prime numbers?

×1723391
391 factors into 17 × 23.
Change n to rebuild its factor tree. Composite nodes split into two factors greater than 1. The tree stops when every leaf is prime.

You can figure it out, but it requires more work than multiplication.

Now imagine multiplying two prime numbers, each roughly 309 digits long.

Even an ordinary laptop can multiply them almost instantly. But recovering those original primes from their enormous product is extraordinarily difficult, even with supercomputers.

That's RSA.

The product becomes part of your public key. Knowledge of the original primes allows you to construct your private key.

The genius of RSA is that you can publicly reveal the product without revealing the original primes.

Easy to multiply. Hard to reverse.

An enormous amount of digital infrastructure was built on this mathematical asymmetry.

RSA has two important applications. It allows someone to encrypt information that only you can decrypt, and it allows you to digitally sign information that everyone else can verify.

That second application is particularly important. How does your computer know that a Windows update genuinely came from Microsoft? How does your browser know that your bank's certificate is legitimate?

In many systems, RSA provides that mathematical proof of authenticity.

RSA powers certificate authorities, software signing, enterprise authentication, electronic passports and much of the traditional internet infrastructure.

3. ECC — mathematicians discover a better trick

RSA works well, but its keys are relatively large. Mathematicians wanted something more efficient.

Enter Elliptic Curve Cryptography.

Imagine a strange mathematical landscape with a predefined starting point and a special rule for moving between points.

You choose a secret number — say, 738 — and repeatedly apply that mathematical rule to arrive at a destination.

You publicly announce your destination.

Everyone knows where you started. Everyone knows the movement rule. Everyone knows where you ended.

But figuring out your secret number from that information is remarkably difficult.

Starting point Destination
Conceptual illustration of elliptic-curve point arithmetic. Real cryptography operates over discrete mathematical points.

Your secret number is your private key. The destination is your public key.

Recovering the secret number is called solving the Elliptic Curve Discrete Logarithm Problem (ECDLP).

And this is precisely the mathematical difficulty that protects your Bitcoin.

Someone doesn't need to steal your hardware wallet if they can mathematically derive your private key from your public key.

But why did the industry start moving towards ECC?

Look at the approximate key sizes required to achieve equivalent classical security.

Equivalent 128-bit security strength
RSA3,072 bits
ECC256 bits
ECC achieves comparable security with dramatically smaller keys.

Smaller keys mean less data to transmit, less storage and often more efficient cryptographic operations.

This makes ECC particularly attractive for smartphones, messaging apps, cryptocurrencies, passkeys and connected devices.

How much of the internet uses RSA versus ECC?

An October 2026 GeoTrust study scanned approximately 973,000 websites and measured the public-key algorithms in their presented website certificates.

RSA certificates46.6%
ECC certificates53.4%
Source: GeoTrust, State of SSL/TLS, October 2026. GeoTrust Research

Interestingly, another October 2026 study focusing on the most popular websites found that 59% presented RSA certificates and 41% presented ECC certificates. ECDSA

These figures vary by website population and measurement method. They measure certificates, not all internet traffic.

And here's something fascinating: a single website can use RSA, ECC and AES simultaneously.

They aren't necessarily competitors. They often perform entirely different jobs.

4. But how does all this actually protect the internet?

Here's where everything comes together.

When you visit your bank's website, modern cryptography generally performs three different jobs:

  • Digital signatures: Prove that you're really communicating with your bank.
  • Key exchange: Establish a shared secret without transmitting that secret directly.
  • Symmetric encryption: Use that shared secret to encrypt your actual conversation.

RSA and ECC handle public-key operations. AES handles bulk encryption efficiently.

Your browserYour bank

Step 1 — AuthenticationRSA or ECDSAYour browser verifies the bank's digital identity.
Step 2 — Key exchangeECDHEBoth sides independently establish a shared secret without sending it across the internet.
Step 3 — CommunicationAESYour passwords, account balances and transactions are encrypted using keys derived from that shared secret.
One example of a modern HTTPS connection. Other algorithm combinations are also possible.

There's also SHA-256, which creates a mathematical fingerprint of information. Unlike encryption, hashing isn't designed to be reversed at all.

So cryptography isn't one algorithm. It's an entire ecosystem of mathematical tools working together.

5. Then quantum computers entered the story

In 1994, mathematician Peter Shor discovered something that changed everything.

He developed a quantum algorithm that could efficiently solve both the integer factorization problem behind RSA and the discrete logarithm problems behind ECC.

Suddenly, two mathematical foundations of modern cybersecurity had a theoretical expiration date.

We didn't have sufficiently powerful quantum computers to execute these attacks against real-world keys, but we knew that the mathematical shortcut existed.

Interestingly, AES doesn't suffer from the same problem.

Another quantum algorithm, called Grover's algorithm, can theoretically accelerate the search for an AES key. But it doesn't destroy AES in the same way that Shor's algorithm threatens RSA and ECC.

That's one of the reasons AES-256 is considered a strong option even in the post-quantum era.

So mathematicians went looking for a fundamentally different kind of problem that even quantum computers couldn't easily solve.

Enter lattice cryptography.

6. Lattice cryptography — hiding secrets in noise

Remember solving simultaneous equations in school?

Imagine I give you:

3x + 2y = 18

x + 4y = 16

You can calculate that x = 4 and y = 3.

But what if I deliberately introduce small errors into the answers?

3x + 2y = 19

x + 4y = 15

2x + 3y = 18

Now you don't know which answers are accurate or how much noise I've introduced.

Imagine doing this with thousands of equations, hundreds of unknowns, and numbers that wrap around like the hands of a clock.

Recovering the original secrets becomes extremely difficult.

This mathematical problem is called Learning With Errors (LWE).

Why is it called lattice cryptography? Because these noisy mathematical equations are closely connected to geometric problems involving grids of points in high-dimensional space.

Original point Noisy point
Imagine identifying the original point in a space with thousands of dimensions instead of two.

Ring-LWE and Module-LWE are variations that introduce mathematical structure to make these calculations more efficient.

And this became the foundation of the next generation of cryptography.

In August 2024, NIST standardized three major post-quantum algorithms:

AlgorithmWhat it does
ML-KEM (Kyber)Establishes shared secrets using lattices
ML-DSA (Dilithium)Creates digital signatures using lattices
SLH-DSA (SPHINCS+)Creates digital signatures using hashes

The third one deliberately relies on different mathematics, which provides an alternative if lattice-based signatures prove vulnerable. Post-Quantum Cryptography FIPS ApprovedModule-Lattice-Based Key-Encapsulation Mechanism Standard

Notice something interesting here. We're not necessarily replacing AES. We're primarily replacing the public-key cryptography responsible for authentication and establishing shared secrets.

AES can continue doing what it does best: encrypting our actual information.

7. And then came AI

For decades, we worried about building a machine powerful enough to break cryptography.

But AI introduces a completely different possibility.

What if we don't need a more powerful computer? What if we just need better mathematics?

Imagine someone spending 10,000 years trying to solve a maze through brute force.

Then a mathematician comes along, notices a hidden pattern in the maze, and solves it in ten seconds.

That's the kind of discovery AI could potentially make.

Anthropic has already demonstrated AI-discovered mathematical weaknesses in certain cryptographic algorithms, including the post-quantum signature scheme HAWK and a reduced-round version of AES. Neither discovery currently breaks production systems. Anthropic

And that brings us to the current rumors surrounding Anthropic and Ring-LWE, which remain unconfirmed.

The extraordinary irony is that humanity has been preparing for decades to defend itself against quantum computers, only to realize that AI might discover new mathematics that undermines those very defenses.


If you remember nothing else, remember these six things:

DES
The original widely adopted digital scrambling machine. Computers eventually became too powerful for it.
AES
Hide a message using a shared secret key.
RSA
Multiply enormous primes. Good luck finding them again.
ECC
Show someone your destination. Hide how many steps you took.
Lattice
Bury a mathematical secret in thousands of noisy equations.
SHA-256
Create a fingerprint without revealing the original information.

The entire foundation of modern cryptography rests not on mathematical problems being impossible to solve, but on our inability to solve them efficiently.

Cryptography is essentially humanity making a bet on the limits of its own mathematical intelligence.

AI is now challenging that bet.