Encryption has been with us for thousands of years. That sounds dramatic, but it’s true. Long before we had computers, Wi-Fi, or even electricity, humans were trying to keep secrets safe. Kings, generals, traders, and even lovers wanted ways to pass messages that no outsider could understand.
When we talk about encryption today, people often imagine algorithms with names like AES, RSA, or elliptic curves. But those are just the latest steps in a very long story. The story goes from leather straps in ancient Greece, to mechanical boxes in the Second World War, to the kind of code running invisibly on your phone right now, and maybe soon into the world of quantum computing.
In this piece, I don’t just want to “explain encryption” in the technical sense. I want to walk through its history, its purpose, and its future in a way that feels less like a lecture and more like a discussion. Along the way, I’ll use one of my own side projects, QR Crypt, which I built using Google’s AI Studio as a small example of how old ideas can find new forms.
So let’s start at the beginning.
Early Attempts at Hiding Messages
If you roll history all the way back, you’ll find people coming up with surprisingly clever tricks. One of the earliest examples comes from ancient Greece: the scytale cypher. It was just a leather strap wound around a stick. A general would write a message along the strap, then unwind it. Once unwound, the letters looked scrambled. Only someone with a stick of the same diameter could wrap the leather back up and read the original message.
Simple? Yes. Effective for its time? Also yes.
Fast forward a bit, and you’ll find Julius Caesar’s cypher, which is almost legendary now. Caesar would shift letters by a fixed number, maybe 3 places forward, so that “HELLO” would become “KHOOR.” Anyone intercepting it without knowing the rule would see gibberish.
From there, more sophisticated systems appeared, like the Vigenère cypher in the 1500s, which used repeating keys and felt “unbreakable” for a couple of centuries. (Spoiler: eventually, mathematicians figured it out.)
What’s worth noticing here is that these early systems weren’t “mathematically perfect.” They were clever enough to last until someone smarter or more determined came along. That theme repeats over and over in the history of encryption: it’s always an arms race.
Enigma and Friends
Now, let’s jump to the 20th century. Wars tend to accelerate technology, and World War II pushed cryptography forward in dramatic ways.
The most famous device from that era is the Enigma machine, used by Nazi Germany. It looked like a typewriter but had rotors inside that scrambled messages in complex ways. Each keypress would pass through multiple electrical paths, shifting with every press, making the output look random.
The brilliance of Enigma was its complexity. The flaw was that complexity still had patterns, and the Allies, with help from brilliant people like Alan Turing, eventually cracked it. That wasn’t just a victory of math; it was a victory that shortened the war.
The mechanical era showed that encryption wasn’t just an intellectual exercise. It was life and death, nations against nations, with machines and people racing to outsmart one another.
The Digital Revolution: From Cyphers to Code
Once computers entered the scene, encryption leapt into the digital realm. Instead of mechanical rotors, we now had algorithmic instructions that computers could follow at incredible speeds.
One of the early milestones here was RSA, created in the 1970s. Before RSA, most encryption was symmetric: the same key was used to both lock and unlock the message. That worked fine in small groups, but it was impractical on a global scale. How do you securely share the key in the first place?
RSA solved this with asymmetric encryption. It gave you two keys: a public key (which anyone can see and use to encrypt a message for you) and a private key (which only you hold and can use to decrypt). That single idea, two keys, mathematically linked but impossible to derive from one another, changed the world. It made online banking possible, digital signatures possible, and eventually the secure web as we know it.
Other algorithms followed. AES (Advanced Encryption Standard) became the backbone of symmetric encryption. Elliptic curve cryptography (ECC) offered efficiency with shorter keys. Each step forward made things harder to break and more practical to deploy.
What Makes Encryption “Unbreakable”?
At its core, encryption relies on math problems that are hard to solve.
RSA relies on the difficulty of factoring very large numbers.
ECC relies on the difficulty of solving certain problems on elliptic curves.
AES relies on transformations that resist all known shortcuts.
“Unbreakable” in practice doesn’t mean impossible forever. It means: impossible with the computing power and math knowledge we currently have. Every breakthrough in math or hardware shifts the balance.
QR Crypt: A Personal Example
When I was tinkering with Google’s AI Studio, I ended up building a small project called QR Crypt. The idea was simple: take a secret message, encrypt it with an XOR cypher and a key, and then turn it into a QR code.
Why a QR code? Because it’s an easy way to move data visually. You can print it, send it as an image, or even scrawl it on a napkin if you want. The catch: the QR code on its own is useless without the right key.
The fun part of building QR Crypt wasn’t “inventing” a new cypher (XOR has been around forever). It was combining:
A very old technique (XOR encryption).
A modern format (QR codes).
A no-server, privacy-first approach (everything happens in the browser).
It was also a great learning exercise. Working with AI Studio sped up the process, generating some boilerplate, suggesting improvements, and generally keeping the development flow light. But the important part for me wasn’t just building the tool; it was realising how encryption ideas echo through time.
From Caesar’s simple shifts to my little web app, the spirit is the same: how do you keep a message safe, and how do you control who gets to read it?
The above QR Code contains a secret message. Here is the key:
=aW5B(.:@!_tf!A>KUT*$R5o;,v!zdg^[ncl[bpsi]qq}Hxf-_WSG]q885Ra
Encryption in Everyday Life
Sometimes people treat encryption like it’s this shadowy thing only hackers or spies care about. In reality, you use it every single day, often without realising it.
When you see “https://” in your browser, that’s encryption at work (TLS, which uses asymmetric + symmetric algorithms together).
When you send a message on WhatsApp or Signal, it’s encrypted end-to-end.
When your phone unlocks with Face ID or a PIN, the stored biometric data is encrypted.
Without encryption, most of the modern internet would collapse. Passwords would leak, bank transfers would be unsafe, and private chats would be public.
Quantum Storms on the Horizon
Now let’s look ahead. What happens when quantum computers mature?
Quantum computing threatens many current encryption schemes. Why? Because certain problems that are “hard” for classical computers (like factoring large numbers for RSA) could become much easier with quantum algorithms like Shor’s.
That doesn’t mean the world is about to fall apart. Researchers are already working on post-quantum cryptography, designing algorithms resistant to both classical and quantum attacks. NIST (the U.S. National Institute of Standards and Technology) has even been running competitions to standardise new methods.
The shift to quantum-safe encryption will probably be slow but steady, like past upgrades. But it underscores the same point as always: encryption is never finished. It’s a living field, constantly adapting to new realities.
From leather straps in ancient Greece to AI-assisted side projects like QR Crypt, the thread is clear: humans have always cared about protecting information. Encryption evolves with us. It mirrors our fears, our creativity, and our technology.
I think what excites me most is that encryption isn’t just about secrecy. It’s about trust. It’s the thing that lets you type your credit card into a website, or whisper something to a friend over the internet, and feel confident that the message won’t be hijacked along the way.
And sometimes, encryption is just fun. Hiding a birthday wish inside a QR code. Building a browser toy to see how XOR feels in practice. Using Google’s AI Studio, not because you had to, but because it made exploration faster.
Encryption is serious business, yes. But it’s also a playground. And if history tells us anything, it’s that the playground will keep changing from Caesar’s alphabet shifts, to Enigma’s rotors, to RSA’s prime numbers, and one day, to post-quantum math we haven’t even dreamed up yet.
That’s the real magic of encryption: it’s both ancient and unfinished.
Top comments (0)