So I was actually just looking at my phone this morning, right, Oh yeah, yeah, just checking my bank balance, sending a text, doing a software update, and just kind of hit me.
Let me guess you have no idea how any of it actually stays secure?
Literally no idea. I mean, I know there's that little lock icon in the browser, and I hear the word encryption thrown around a lot, right, But if you actually ask me to explain how my credit card number doesn't just you know, float out into the ether for anyone to grab, I've got absolutely nothing.
Well, you are definitely not alone there. I think for most of us, cryptography is basically just magic.
It really feels like magic.
It's a black box, you know, the a secret in one side and random noise comes out the other. But for the people actually building our digital world, treating it like magic is well, it's actually incredibly dangerous.
Because magic isn't real. But the software bugs definitely are.
Exactly when cryptography breaks, it doesn't just glitch out for a second. It fails spectacularly, and that is exactly what we are digging into today. We're doing a deep dive into serious cryptography.
Second edition by Jean Feleete almissant. And this isn't just some dry textbook right, Like, he's not just writing from an ivory tower somewhere.
Far from it. He's a principal research engineer who deals with the actual messy reality of digital asset protection.
He's a builder, he is.
If you've ever heard of Blake two or sci fash, which are algorithms running on millions of servers literally right now, he designed those. So when he talks about how these systems break, he really knows where the bodies are buried.
I actually love the metaphor he uses right at the start of the source material. Yeah, he compares learning this stuff to mountaineering.
It's such a great image, he says. The book can give you the ropes, the ice axes, the carabineros, right, the tools, but you, the reader, you actually have to make the ascent yourself. You can't just passively watch someone else climb a mountain.
Well, consider us the surpis for this deep dive. We're going to point out the handhold so nobody falls off the cliff, because honestly, looking at the table of contents, there is some serious math in here.
There is.
But before we get to like the complex curves and the quantum physics. We really have to start at the bottom of the mountain. The foundation of everything randomness.
Randomness is the fuel. I mean, if you don't have high quality randomness, the fanciest encryption algorithm in the entire world is completely worthless.
It's like having a titanium vault door but leaving the key right under the doormat exactly And I Stories highlights something really interesting about this. Computers are literally designed to be logical and predictable, right, so they actually struggle to be random. And there was this specific update in the second edition about Linux that I found fascinating.
Oh right, the classic developer debate between dev random and dev you random.
Yeah, what was the deal with that?
For a long time the advice was super complicated. One of them blocked your system until it had gathered enough quote unquote environmental noise, and the other one didn't block, but was seen as maybe less secure.
Kind of a headache for engineer, huge headache.
But Almison points out that in modern Linux kernels those two have largely converged. The engineering has just gotten so much better at scavenging entropy.
Entropy being that pure chaos.
Right, It stavenges it from your keystrokes, your mouse movements, even the thermal noise of the hardware itself.
But when that scavenging fails, man, things go south fast. Yeah, there was this case study in the book that absolutely blew my mind. The satellite phones.
Oh, the GMR standards, that is a wild story.
Yeah, we are talking about phones used in active war zones on offshore oil rigs in the middle of the ocean. You would completely assume this is military grade Fort Knox level stuff.
You would definitely assume that these are the communication standards used by massive vendors like Thria and in Marsot. But researchers finally took a hard look at the encryption, specifically the GMR one standard, and they found something pretty shocking. The algorithm wasn't some cutting edge proprietary sheel ih was it. It was basically just a clone of the old A fifty two cipher.
And for those of us who don't have our cipher catalogs, memorize what exactly is A fifty two.
It's the encryption that was used in old two G mobile phones. And the kicker is it was known to be fundamentally insecure years before this.
So they literally took a broken lock from an ancient Nokia and just slapped it onto a satellite phone.
Effectively, Yes, GMR one used four linear feedback shift registers or LFSRs.
Okay, can we pause on that linear feedback shift register. It sounds like a piece of vintage office equipment. How does that actually work?
Imagine a row of bits, just zeros and ones in a ship register. You take the bit at the very end, do a little bit of math with it, and feed it back into the front, okay, and that shifts everything else down the line. It creates this stream of numbers that looks random at a glance. But the critical keyword there.
Is linear, meaning it's simple math.
Exactly, it's mathematically simple. If an attacker sees enough of that output stream, they can and just use basic linear algebra to reverse the whole process and figure out the internal state.
So it's totally predictable.
Highly predictable. And the absolute worst part about the satellite phone situation. This wasn't software. This was baked directly into the hardware.
Oh wow, that really ties into the illusion of randomness section, because if it's software like a messaging app on my phone, the developer can just push an update over Wi Fi in twenty.
Minutes, right, But if it's hardware physically wired inside a satellite in orbit or a specialized handset in a war zone, you can't just send a patch. You have to physically replace.
The equipment, which nobody is going to do.
No. It is the perfect example of why security by obscurity. Just blindly trusting a company because they assure you its export grade is a massive trap.
Okay, so LFSRs are kind of the quick and dirty way to make a stream of numbers, but the source material does mention a much better way to use them in the hardware world, right, Yeah. The Grain one to eight a algorithm.
Yes, this is where the engineering actually gets clever. Grain one is a stream cipher that tries to safely balance speed and security. It uses an LFSR for the rhythm and speed because they're incredibly fast and hardware, but it pairs it with an NFSR.
A nonlinear feedback shift register.
Exactly. The nonlinear part is what adds the actual chaos. It mixes the bits back in using logic that isn't just simple addition. It breaks that predictability.
So you have the linear part driving the engine and the nonlinear part scrambling the output.
That's a good way to put it. It is a very delicate balance, though. If you get the mathematical mixed wrong, you are right back to being vulnerable.
Okay, so we've got a randomness and we've got our stream ciphers. Now let's talk about organizing all that chaos. Let's get into.
Hashing the workhourse of cryptography.
And specifically this birthday paradox thing. I have to admit every single time I hear this concept, if it's to stop and literally count on my.
Fingers, it is incredibly counterintuitive to how human brains work.
The source says that in a group of just twenty three people is a fifty percent chance that two of them share the exact same birthday, and that just feels wrong. My brain immediately says, well, there are three hundred and sixty five days in a year, so I should need way more people in the room to get a match.
It feels wrong because we default to thinking about our own specific birthday. We walk into a room and think, what are the odds someone in here matches my birthday?
Right?
But the math isn't looking for a match to you it's looking for any match between any two people in the entire group. When you have twenty three people, the number of possible pairs cross checking each other is actually surprisingly high.
Okay, that makes sense. Yeah, but why does a cryptographer care about a party trick with birthdays?
Because of collisions. In hashing, you take a file, it could be a tiny text document or a massive four K movie, and the algorithm crunches it down into a short, fixed length unique fingerprint a ESH.
Right.
A collision is when two completely different files accidentally produce the exact same fingerprint.
Which I'm guessing is really bad.
It's catastrophic for things like digital signatures. If I can figure out how to create a malicious, virus laden software update that has the exact same hash as a legitimate.
Update, then my computer accepts it as safe exactly.
It tricks the system, and the birthday paradox tells us that finding that collision is so much easier than our intuition suggests. Mathematically, if your hash fingerprint is dollar bits long, you might think it takes two to the power of dollar tries to break it.
This should be a huge number, right, But.
To find a collision any collision. It actually only takes roughly two to the power of dollar divided by two.
That is a massive shortcut for an attacker, it really is.
It's a difference between blindly searching for a specific needle in a haystack versus just grabbing any two random pieces of hay and checking if they happen to look identical.
So how do we actually build a hash that resists that kind of shortcut. The book spends a ton of time on this sponge construction, and I just love the visual. Here is it literally acting like a kitchen sponge.
It really is an apt metaphor. Think about how you use a sponge in the sink. It operates in two distinct phases. First, you plunge it underwater and let it absorbs the liquid. Okay, in the cryptographic algorithm, this is called the absorbing phase. You take your blocks of message data and you mathematically mix them into the sponge's internal state using xor operations, XO.
Being that fundamental logic gait that flips bits.
Around correct so the mathematical sponge soaks up all the data. Then, once every single piece of your message is absorbed, you switch to the squeezing phase. You ring the sponge out to get your final hash output.
And this is the structure that SAHA three.
Uses, Yes, SAHA three, which is Kekak. And the reason the industry loves it is because it's so incredibly versatile because of this absorb and squeeze structure. You can use a sponge for basic harrying, sure, but you can also keep squeezing it to generate an endless stream of random.
Numbers, or use it as a stream cipher exactly.
It's like a Swiss army knife for cryptography.
Now, speaking of hashing, we definitely have to talk about sci fash. We mentioned earlier that Amisan code designed it, but the sources it wasn't even originally designed for encryption, right.
This is such a fascinating piece of modern Internet history. Sifash wasn't built to keep military secrets. It was designed to solve a very specific type of denial of service attack called hash flooding.
How does a hash flooding attack work?
Okay, so think about programming languages like Python or Ruby. Under the hood, they use something called hash tables to store data quickly. It's essentially a massive digital filing cabinet. The program hashes the incoming data to instantly know exactly which drawer to drop it into. Super efficient, very efficient, unless a hacker figures out your hashing algorithm and intentionally sends you a million pieces of junk data that are all mathematically calculated to hash to the exact same drawer.
Oh a collision storm.
Yes, suddenly your high speed server isn't quickly filing things away anymore. It's desperately digging through one massive, overflowing drawer trying to find things. It slows the entire server to an absolute crawl.
So the server crashes, but not because it was hacked in the Hollywood sense of stealing passwords, but literally because it got confused by its own internal filing system.
Precisely, sifash was specifically designed to be an incredibly fast, secure keyed hash function to prevent exactly this. It mixes in a secret key so the attacker cannot predict which drawer the data will go to. It protects the actual infrastructure itself, not just the secrets.
It's engineering, plain and simple, keeping the pipes from bursting exactly. Okay, so we've covered the foothills. We did randomness, we did hashing. Now grab your ice axe, because we are tackling the big sheer cliff face of the book. Yeah, public key cryptography. This is the stuff that lets me send my credit card number to a website without a guy in a coffee shop van listening in.
Right, the absolute backbone of the modern Internet.
And for a really long time, the undisputed king of this hill was RSA.
RSA is the grandfather and its beautiful math. Really it relies entirely on the fact that it is very very easy for a computer to multiply two massive prime numbers together. But it is incredibly mind bogglingly hard to take that final massive number and work backward to figure out what those two original primes were. Factoring factoring large integers, and the book gives some great scale on just how hard this is. There's an algorithm called the general number field
sieve or GNFS. It is currently the absolute fastest way we know of to factor these large numbers.
But fast is a very relative term here, Isn't it very relative?
The source material notes that successfully factoring just a seven hundred and sixty eight bit number using GNFS took the computational equivalent of two thousand processor years.
Two thousand years yes, and.
A seven hundred and sixty eight bit key is considered small by today's standards. That is exactly why your bank and your browser are using twenty forty eight bit keys or even larger. The raw computational power required to break that with current classical technology is just astra nomical. It is safe because the math is just too hard to reverse.
But RSA is getting kind of old, isn't it? Like? It's clunky? The keys have to be massively huge to stay secure. The source says, the industry is moving or really has already moved, to elliptic curve cryptography or ECC.
ECC is definitely the modern standard. It gives you the exact same level of security as RSA, but with significantly smaller keys, which makes everything faster. Instead of smashing giant prime numbers together, we look at the geometric properties of points on a curve.
Now, this was the part of the book where I really had to slow down and reread a few times. Can you try to visualize this for us? The book describes it as a sort of geometric game.
Let's try picture a standard graph with a smooth, sweeping line looping around it. That is your elliptic curve. The mathematical game goes like this. You take two distinct points on that curve, let's call them point P and point Q.
Okay, P and Q on the curve.
Now draw a perfectly straight line through both of them. Because of the specific shape of an elliptic curve, that straight line is guaranteed to intersect the curve at exactly one other place.
Okay, I'm with you so far.
You find that third intersection point, and then you reflect it straight across the x axis, like dropping a mirror image down. That new reflected point is the mathematical result of quote unquote adding point P and point Q together.
It really feels like playing a weird game of billiards on a graph.
It totally does. And if you keep playing that game repeatedly adding a point to itself over and over, you start bouncing around the curve in this wildly chaotic, seemingly unpredictable pattern. The security of ECC comes from what we call the discrete.
Logarithm problem, which is what exactly.
Basically, if I tell you the exact point where I started my game of billiards, and then I show you the final point where my ball ended up. You cannot easily figure out how many times I hit the ball to get there. You can't calculate the number.
Of hops, and that number of hops is the secret.
That number of hops is your private key.
That is genius, really But and there's always a huge but when we talk about this stuff, the math can be absolutely flawless, and the climbers can still fall right off the mountain if they don't tie their knots correctly.
Implementation is everything.
We have to talk about the PlayStation three hack because this section.
Was what oh the PS three hack. This is an absolute tragedy of implementation.
I remember when in the Savity it was massive news everywhere.
So Sony was using ECDSA, the Elliptic Curve Digital Signature algorithm. The algorithm itself is incredibly strong, it's the industry standard, but the underlying math requires a fresh, completely random number, usually referred to as the value K, to generate every single signature. And the golden rule of ECDSA is you must never ever use the exact same K value twice.
Let me guess they used the same k.
They did, and it wasn't just twice. They literally hard coded a single static K value into the system. The fails offer Flow team, the group of hackers who cracked it. They just analyzed a few different game signatures and immediately realized that the k value wasn't changing at all.
And what did that actually allow an attacker to do?
It takes this impossibly hard cryptographic math and turns it into basic high school algebra. Because they now had two mathematical equations with the exact same shared variable, they could literally just solve for X and X in this case was Sony's ultimate private master key.
That is just wild. So because of one single bad random number implementation, these hackers could just sign their own code.
They could sign anything they wanted. They could run alternative operating systems like Linux, pirate games, custom homebrew software. The PS three console accepted every bit of it as perfectly valid official Sony kind because the cryptographic signature was mathematically perfect.
It really just drives home the author's point, doesn't It. A mathematically strong algorithm is totally useless if the engineering surrounding it is lazier weak, absolutely useless. There was one other failure mentioned in the book that felt honestly even more dangerous because it wasn't just a gaming console being cracked. It was the trust of the web itself. The Digito Tar disaster.
Yeah, this is the one that still keeps security professionals up at night. The entire secure web HTTPS relies entirely on a chain of trust. When you type Google dot com into your browser, how does your computer actually know it's talking to Google and not some hacker?
You trust? A Certificate authority a CAA exactly.
They act as digital notaries. They cryptographically vouch for the website's identity. Digito Tar was a major Dutch CAA, but in twenty eleven their internal systems were totally compromised. Hackers got in and managed to silently issue fake, mathematically valid certificates for domains like Google dot com.
So if I'm just a regular user and my browser receives this fake certificate.
Your browser sees the green padlock icon it says verified by Digito Tar. Everything looks one hundred percent secure and normal. But it's a trap. The hackers actually use these fraudulent certificates to launch massive man in the middle attack against Gmail users in Iran.
Oh wow.
They were silently intercepting and reading communications that people completely believed were securely encrypted.
It just shows that the chain of trust we all rely on is extremely fragile. If just one link breaks, if one single notary company gets Lazier gets hacked, the whole global system wabbles.
And once that trust is lost in cryptography, it is almost impossible to earn it back. Dignatar went completely bankrupt very shortly after that incident.
Okay, so we've seen how things break in today's world, But the book ends by looking at how everything might break tomorrow. The ultimate system smasher quantum computing.
The quantum threat it is looming now.
Normally, when tech people talk about faster computers, we just mean they can guess our passwords faster, right, But the book explains that Shor's algorithm, which is designed to run on these future quantum computers, is fundamentally different than just being fast.
It is entirely different. It's not just a speed boost. Shore's algorithm actually changes the mathematical complexity class the problem. Remember how we said earlier that factoring large numbers is a quote unquote hard problem.
Right the two thousand process or years for a small.
Key, Shor's algorithm turns factoring into an easy task. It can solve it in what mathematicians call polynomial time. If someone builds a quantum computer big enough and stable enough to run it, RSA is just.
Gone gone, like completely.
Completely broken, and elliptic curves broken too. The author actually notes that a sufficiently powerful quantum computer would reduce the security of modern public key cryptography to the level of a Caesar cipher.
Wait, a Caesar cipher like shifting every letter down the alphabet by three. That's the secret code I used on the playground in third grade.
Yes, that is the true scale of the threat we are talking about here.
How does it even do that? How is it so powerful?
It all comes down to quibbits. A classical computer uses normal bits. They are strictly a zero or a one. A quantum computer uses quibbits, which operate using complax numbers and a principle called superposition.
The book mentioned something about amplitudes on a two D plane.
Right. Instead of a simple light switch that is either on or off, imagine a point moving around on the surface of a sphere. Through quantum inspirations like the Hattimer gate mentioned in the text, the computer can put these corbets into a state where they hold and process huge amounts of information simultaneously.
It just bends the mind, It really does.
It allows the quantum computer to find the overall period of a function, which happens to be the secret mathematical backdoor to factoring, almost instantaneously compared to a classical machine.
That is genuinely terrifying. So if RSA and ECC are just doomed, what do we do? Are we literally just going back to sending secrets via carrier pigeons?
No, thankfully not. We move to what's called post quantum cryptography. The source spends some time talking about lattice based cryptography as the likely successor.
Lattice based It sounds sturdy, h like a fence.
It involves finding specific hidden vector in a wildly complex, multidimensional grid of points. It is incredibly dense math that, at least so far, quantum computers do not seem to be inherently good at solving, at least so far. That is the big catch. The security of lattice based crypto is what we call asymptotic. We think it's extremely hard, but we just don't understand the deep mathematical vulnerabilities as well as we understand RSA, which we've been testing for decades.
We are essentially trading a known incoming risk for a relatively unknown.
Risk out of the frying pan and into the multidimensional grid. But before we completely wrap up, the second edition of the book also added some really interesting new frontiers, specifically around blockchain, and honestly glad it did, because usually blockchain just gets dismissed in mainstream tech. As you know, crypto prices go up, crypto crisis go down.
Right, the financial speculation overshadows it, but the underlying cryptography enabling it is actually fascinating. Chapter fifteen covers some cutting edge stuff like BLS signatures.
What makes a BLU signature.
So special aggregation? Imagine you have a major network transaction that needs to be explicitly approved by a thousand different people. In the old cryptographic way, you'd have to append and store one thousand separate digital signatures to that file. That takes up a massive amount of data space. With BLS, you can mathematically mash all one thousand of those signatures together into one single compact signature that still proves everyone signed it.
That is huge for scaling a network, it's vital.
And then there are threshold signatures. Now this sounded like something straight out of a Cold war spy movie to me.
Oh, like the nuclear launch key scenario where two people have to turn the keys at the same time.
Exactly that. You take a single private key and you mathematically split it into pieces or shares. You give one piece to five different people. You can configure the math so that any three of them can combine their pieces to sign a transaction. But if only two of them agree, it won't work.
How does the math even handle having just parts of the key? Does it just guess the rest?
No guessing? It uses a concept called lagrange interpolation. Basically, the key is hidden on a secret mathematical curve. If you have enough points, enough human shares coming together, you can perfectly reconstruct the curve and use the secret key.
And if you don't have enough points.
If you don't have enough points, you know absolutely nothing. It's not like having half a password where you can guess the rest. You mathematically have zero information about the key.
That is so cool. And finally, the term I feel like I keep hearing everywhere lately ZK snarks zero knowledge proofs ah.
Yes, this is really the holy grail of digital privacy.
Right now, as I understand it. It's basically proving I know a secret without ever actually telling you what the secret is.
Right. The classic analogy is the magic cave. Imagine I know the secret password to open a door deep inside a cave. I want to prove to you that I know the password, but I refuse to say it out loud. Okay, So I go into one side of the cave, I use the password to open the door, and I come out the side where you are waiting. The only physical way I could have done that is if I truly knew the secret. I proved it without revealing it.
But how does that translate mathematically to code?
Mathematically, it involves turning a standard computer program into a massive logical circuit, and then translating that circuit into a giant list of mathematical constraints. If I can provide a set of numbers that perfectly satisfies all those complex constraints, I can cryptographically prove I possess the underlying data without ever transmitting the data itself.
And that's how you get anonymous blockchain transactions.
Right.
The network can verify the money is totally real without ever seeing who sent it or who received it.
Exactly. It's incredibly powerful stuff.
We have honestly covered a staggering amount of ground today, from the janky hardware, baked randomness of old satellite phones, to quantum killing algorithms, and all the way to zero knowledge proofs. If there's one single thing I've learned from this deep dive said, cryptography is not a quote unquote solved problem.
Not even close. Cryptography is an internal arms race. It is a constant, exhausting battle between mathematical complexity and cryptanalysis. The engineers building the walls are permanently racing against the hackers building the ladders.
The author actually ends the book with a bit of a sci fi scenario that really stuck with me. It's a hypothetical news headline from the year twenty forty eight.
ACM Inc. Reveals secret quantum computer launches break crypto as a service.
That is just a chilling thought. You wouldn't even need to be a nation state hacker anymore. You could just rent a server for an hour to break global security.
It is entirely plausible, And that's exactly why the final takeaway from serious cryptography is so critical. As an industry and as users, we have to stop treating these systems as magical black boxes. We have to treat them as rigorous engineering disciplines.
We have to actually pick up the ropes in the ice axes and do the climb ourselves.
Exactly. You have to be the mountaineer of your own security. Don't just blindly trust the little lock icon in your browser. Try to understand the architecture that holds it together.
Well, on that slightly terrifying note, I'm definitely going to go update my passwords, check my systems, enter b sources, and maybe just wrap my entire phone in aluminum foil. Thanks for guiding us through the math and the madness today.
My pleasure stay secure out there.
And to you listening, thanks for climbing with us. But before you go, just think about this. What if the random number generator inside the device you are using to listen to this right now is already quietly failing and you won't even know it until your entire digital life is compromised. Just something to moll over. Catch you on the next deep dive
