In the last few episodes, we explored the world of binary representations, converting data into bits, and even touched on cryptographic ideas like the one-time pad and modular arithmetic. Now, the stage is finally set to understand how modern digital security really works.
The modern cryptography protocols that we use is called RSA. Named after three scientists who discovered it Rivest–Shamir–Adleman. I’ve divided the article into two parts. The first part explains the core idea in two simple steps and also discusses why RSA is secure today and what challenges it may face in the near future. The second part (Steps 3 and 4) dives into the actual implementation details. If you find the math heavy, feel free to skip that section — the main idea will still make perfect sense without them.
Step 1: Finding a Digital Trapdoor
Every cryptographic system, at its heart, is about protecting information — just like we protect our homes. Think about it: when you lock your front door, anyone can close it (that’s easy), but only the person with the right key can open it again.
That’s exactly the kind of mechanism cryptography relies on — something that’s easy to do in one direction (lock), but extremely hard to reverse without a special key (unlock). This concept is called a trapdoor function.
To build a digital lock-and-key system, we need a mathematical process that behaves the same way — easy to go one way, hard to reverse.
Here’s the simplest and most famous example: prime numbers.
Multiplying two prime numbers is incredibly easy.
But given only the product, figuring out which two primes were multiplied to get it is ridiculously hard.
But now imagine I only give you the product — can you quickly find the two primes that created it? Everyone can say 14 is 7 times 2. Try 149137. Even powerful computers struggle with this when the numbers are very large. That’s our trapdoor!



