Speaker 1: Hey, there, curious minds.
Speaker 2: Every time you send a secure message, log into your bank,
Speaker 2: or even you know, just see that little padlock on
Speaker 2: a website, there's this whole complex thing happening behind the scenes.
Speaker 1: It's not magic.
Speaker 2: It's this fascinating world built on really clever math, sophisticated codes,
Speaker 2: and it's constantly changing to keep our digital stuff safe. Today,
Speaker 2: we're taking a deep dive into modern cryptography. We'll look
Speaker 2: at where it came from, how it works now, and
Speaker 2: crucially the big challenges ahead like quantum computing. Our guide
Speaker 2: is Introduction to Modern Cryptography, third edition by Jonathan Katz.
Speaker 2: It's pretty rigorous, but honestly surprisingly easy to follow on
Speaker 2: a lot of this stuff. Our mission, as always, is
Speaker 2: to give you that shortcut to being really well informed.
Speaker 2: We want to pull out the key ideas, the surprising
Speaker 2: bits that make up our digital security.
Speaker 1: Okay, let's unpack this.
Speaker 2: Let's start way back the old school stuff, classical cryptography
Speaker 2: ciphers like Visionnaire, maybe trying to hide pattern, Yeah exactly,
Speaker 2: But what was the big weakness there? Why didn't that last? Well?
Speaker 3: The fundamental issue with those older schemes, and it's why
Speaker 3: we often call it an art back then was this
Speaker 3: reliance on security by obscurity.
Speaker 1: Just keep the method secret, right.
Speaker 3: The thinking was, if nobody knows how you're encrypting, you're safe.
Speaker 3: But that just doesn't hold up with visionnaire. For instance,
Speaker 3: even basic statistical tools like calculating the index of coincidence.
Speaker 3: It basically measures letter frequencies that can reveal patterns. For
Speaker 3: English text, that index is around point zero six y five.
Speaker 3: If you analyze cipher text, then it's close to that
Speaker 3: something's up. And even simpler if an attacker could just
Speaker 3: guess a tiny bit of the original message like dear sir.
Speaker 1: Maybe a known plaintext attack.
Speaker 3: Exactly, those basic shift substitution Visionaire ciphers, they become well,
Speaker 3: the book calls them trivial to break.
Speaker 2: Okay, So that leads right into Kirkhoff's principle, doesn't it.
Speaker 2: It sounds backward, But why is keeping the algorithm secret
Speaker 2: actually a bad idea?
Speaker 3: Precisely, Kirkhoff said way back that the security should only
Speaker 3: depend on the key being secret, not the method. Proprietary
Speaker 3: sort of home brewed algorithms are dangerous because they haven't
Speaker 3: been hammered on.
Speaker 2: By experts, no public scrutiny, and.
Speaker 3: History is littered with disastrous results from ignoring this. Think
Speaker 3: early DRM, some Wi Fi security. They just crumbled once
Speaker 3: someone reverse engineered the secret sauce and found it was
Speaker 3: well weak. Our confidence in something like as comes to
Speaker 3: the fact that it's been extensively studied by experts for
Speaker 3: decades and it's held up.
Speaker 2: So the art was obscurity and tricks. How did we
Speaker 2: get to the science of modern crypto? What changed?
Speaker 3: It was a fundamental shift really kicking off around the eighties.
Speaker 3: Modern crypto was built on three pillars. First, formal definitions.
Speaker 3: You have to define exactly what secure means for your
Speaker 3: specific goal, Like the book says, if you don't know
Speaker 3: what it is you are trying to achieve, how can
Speaker 3: you hope to know when you have achieved?
Speaker 2: It makes sense, right, Yeah, absolutely define the target.
Speaker 3: Second, precise assumptions we state explicitly. Okay, this system is
Speaker 3: if this specific math problem is hard to solve, like
Speaker 3: factoring large numbers for example. And Third, rigorous proofs mathematical
Speaker 3: proofs that show the scheme meets the definition, assuming the
Speaker 3: underlying problem is hard.
Speaker 2: So it's not just hoping it's secure, it's a proof
Speaker 2: like an ironclad guarantee almost that's.
Speaker 3: The phrase the book uses. Yeah, proofs of security given
Speaker 3: ironclad guarantee, but crucially relative to the definition and the assumptions.
Speaker 1: Okay, caveats apply exactly.
Speaker 3: It shifts crypto from an art to a science. Real
Speaker 3: world implementations can still mess things up, or maybe an
Speaker 3: assumption turns out to be wrong someday, but it provides
Speaker 3: a framework, as the source puts it, provable security helps
Speaker 3: shift the odds in the defender's favor. It gives us
Speaker 3: real confidence in the core algorithms.
Speaker 2: Okay, let's move into symmetric key crypto private key. This
Speaker 2: is where Alice and Bob share the same secret key, right,
Speaker 2: that's the one.
Speaker 3: Formerly you've got three bits Jen to generate the key
Speaker 3: into encrypt using the key, and d to decrypt using
Speaker 3: that same key and the basic proper But he's just
Speaker 3: deckangam encrypt and decrypt with the same key. You get
Speaker 3: your original message.
Speaker 2: Genback.
Speaker 3: Simple concept.
Speaker 2: Now you hear about perfect secrecy sounds like the ultimate goal, Right,
Speaker 2: what does that actually mean? Why don't we just use
Speaker 2: it for everything?
Speaker 3: Perfect secrecy, like the one time pad, is the theoretical peak.
Speaker 3: It's secure even if the attacker has infinite computing power.
Speaker 1: Wow, infinite.
Speaker 3: Yeah, the encrypted message gives zero information about the original
Speaker 3: It looks like pure random noise. But and this is
Speaker 3: the huge practical catch. The key has to be truly random,
Speaker 3: just as long as the message, and you can only
Speaker 3: use it once.
Speaker 2: H So sending a movie would need a movie sized
Speaker 2: key used once exactly.
Speaker 3: Imagine securely exchanging that massive single use key. First, it's
Speaker 3: just not practical for email or web browsing.
Speaker 2: So how do we handle that for everyday stuff? If
Speaker 2: the one time pad is out? Yea.
Speaker 3: We move to computationally secure encryption. We assume attackers have
Speaker 3: limited computing power, still powerful.
Speaker 2: But not infinite, a more realistic assumption definitely, And this
Speaker 2: lets us use reusable keys.
Speaker 3: That are much shorter than the messages. We use tools
Speaker 3: like pseudorandom generators prgs to stretch a short random seed
Speaker 3: into a long string that looks random to computers okay,
Speaker 3: and pseudorandom functions PRFs, which act like random functions. These
Speaker 3: are the building blocks. Then, for encrypting actual data, we
Speaker 3: use things called modes of operation with block ciphers like
Speaker 3: aes CTR mode for instance, lets you encrypt parts of
Speaker 3: a message in parallel, which is way faster speeds things up.
Speaker 3: Absolutely essential for performance and underpinning all this is the
Speaker 3: need for good randomness sources, high entropy data from things
Speaker 3: like network timings, your keystrokes, even tiny fluctuations in hardware temperature.
Speaker 3: Got to get those initial random seeds right.
Speaker 2: We've focused a lot on secrecy keeping things private. Is
Speaker 2: that the whole story for digital security not even closed.
Speaker 3: This is a really important point. Encryption by itself usually
Speaker 3: doesn't guarantee message integrity.
Speaker 2: Meaning someone could mess with the message even if they
Speaker 2: can't read it precisely.
Speaker 3: An active attacker, someone sitting in the middle might be
Speaker 3: able to flip bits in the ciphertext. They don't know
Speaker 3: what they're changing maybe, but when it gets decrypted it
Speaker 3: could be.
Speaker 2: Completely different, like changing a dollar amount in a bank transfer.
Speaker 3: Exactly that scenario. The encrypted one hundred dollars gets subtly
Speaker 3: changed and the bank decrypts it as the thousand dollars.
Speaker 3: Encryption didn't stop that.
Speaker 2: Okay, that's yeah, that's bad. So how do we make
Speaker 2: sure the message wasn't altered, that it's authentic.
Speaker 3: That's where MAA keys come in message authentication codes. You
Speaker 3: need another shared secret key separate from the encryption key.
Speaker 3: Usually with this maat key, the sender calculates a short
Speaker 3: cryptographic tag for the.
Speaker 2: Message, like a checksum but secure.
Speaker 3: Kind of yeah, but much much stronger. The receiver uses
Speaker 3: the same maakey to recalculate the tag on the message
Speaker 3: they received. If their calculated tag matches the tag that
Speaker 3: came with the message, it's authentic.
Speaker 1: And if anything changed, the tags won't match exactly.
Speaker 3: Even changing one one bit in the message or the
Speaker 3: tag will cause verification to fail. HMAC is a really
Speaker 3: common standard for this. It provides what's called existential unforgeability
Speaker 3: fancy term, but it means an attacker can't create any
Speaker 3: valid tag for any new message, even after seeing lots
Speaker 3: of legitimate message tag pairs the very strong integrity guarantee.
Speaker 1: Okay, MSC's for integrity.
Speaker 2: Now. Hash functions, they seem to be everywhere. What makes
Speaker 2: a hash function cryptographic? Right?
Speaker 3: They are work horses. A cryptographic hash function takes any
Speaker 3: input could be tiny, could be huge, and spits out
Speaker 3: a fixed size digest a digital fingerprint. The key security
Speaker 3: property is collision resistance. It must be incredibly hard computationally
Speaker 3: infeasible to find two different inputs that produce the exact
Speaker 3: same hash output.
Speaker 2: Like finding two people with the same fingerprint, should be
Speaker 2: basically impossible.
Speaker 3: Ideally, yes, but there's a catch.
Speaker 1: Uh I've heard about birthday attacks.
Speaker 3: Sounds harmless, It does, but it's a mathematical phenomenon, the
Speaker 3: birthday paradox. It means finding any two inputs that collide
Speaker 3: is much easier than finding an input that matches a
Speaker 3: specific hash output.
Speaker 1: Okay, how much easier.
Speaker 3: Roughly the square root of the possibilities. So if a
Speaker 3: hash has n possible outputs, you only need a bout.
Speaker 3: Squirt tries to find a collision for a hash with
Speaker 3: l output bits, that's two L two operations.
Speaker 2: So for MD five, which is one hundred and twenty
Speaker 2: eight bits, that's two sixty.
Speaker 3: Four exactly and two sixty four. While big is actually
Speaker 3: achievable with modern computing power. That's why MD five is
Speaker 3: considered broken. Collisions can be found.
Speaker 1: Fast and SAHA one that was used everywhere too.
Speaker 3: SAHA one is one hundred and sixty bits, so you're
Speaker 3: looking at two hundred and eighty operations for a birthday attack.
Speaker 3: Harder but also broken. Now explicit collisions have been demonstrated.
Speaker 2: Which is why we use SAHA two fifty six or
Speaker 2: even longer hashes.
Speaker 3: Now precisely you need that longer output, that larger L
Speaker 3: to make the two L two birthday attack computationally infeasible.
Speaker 2: Again, okay, so we have symmetric encryption MAACS hashes, but
Speaker 2: all the symmetric stuff, the private key stuff, relies on
Speaker 2: Alison already having a shared secret key. How do they
Speaker 2: get that key in the first place if they've never
Speaker 2: met sounds like a chicken and egg problem.
Speaker 3: It absolutely was. The book calls it one of the
Speaker 3: most important open problems in cryptography before the mid seventies.
Speaker 3: Think about it. A network of n people. Each pair
Speaker 3: needs a unique key that's roughly n squared.
Speaker 1: Keys, which gets huge, fast.
Speaker 3: Astronomical for just one thousand users, it's nearly half a
Speaker 3: million keys to pre share and manage securely. People tried
Speaker 3: using key distribution centers KDCs, trusted servers that would generate
Speaker 3: keys for pairs of users, But then.
Speaker 1: The KDC is a massive target.
Speaker 3: Right exactly, a high value target and a single point
Speaker 3: of failure. If the KDC gets hacked, everyone's keys could
Speaker 3: be compromised. It was a major bottleneck.
Speaker 2: Then Diffy and Hellman came along the public key revolution.
Speaker 1: What was the big idea?
Speaker 3: It was truly paradigm shifting. They showed how two people
Speaker 3: could agree on a shared secret over a public channel,
Speaker 3: even if someone is listening to everything.
Speaker 2: Like shouting numbers across a crowded room, but ending up
Speaker 2: with a secret only you two know.
Speaker 3: That's a great analogy. Mathematically, Alice picks a secret X,
Speaker 3: Bob picks a secret why there's a public base g
Speaker 3: Alice sends gx to Bob, Bob sends gs air y.
Speaker 3: Because of exponent rules, they both arrive at the same
Speaker 3: value gx y.
Speaker 2: An eavesdropper who sees GX and g can't easily figure
Speaker 2: out gx correct.
Speaker 3: That relies on the presumed hardness of the discrete logarithm
Speaker 3: problem or the related computational Diffie Hellman problem. Going from
Speaker 3: G and X to gx is easy. Going backwards from
Speaker 3: it GX to find x is believed to be incredibly
Speaker 3: hard for classical computers.
Speaker 1: Mind blowing. But you mentioned a catch earlier.
Speaker 3: Ah, Yes, the basic Diffie helmet exchange is completely insecure
Speaker 3: against a man in the middle attack.
Speaker 1: How does that work?
Speaker 3: An attacker Mallory sits between Alice and Bob. Mallory does
Speaker 3: a diffie helmet exchange with Alice pretending to be Bob,
Speaker 3: and does another one with Bob pretending to be Alice.
Speaker 3: Alice and Bob think they have a shared secret, but
Speaker 3: they actually share secrets with Mallory, who just decrypts, reads,
Speaker 3: possibly modifies, and re encry messages between them.
Speaker 1: OUCH.
Speaker 2: So you need some way to know you're really talking
Speaker 2: to Bob, not Mallory exactly.
Speaker 3: You need authentication on top of the basic key exchange, certificates,
Speaker 3: pre shared keys, something.
Speaker 2: But this idea opened the door to public key encryption
Speaker 2: like RSA and digital signatures.
Speaker 1: How do those work?
Speaker 3: So with public key encryption, you generate a key pair,
Speaker 3: a public key you can publish anywhere, and a private
Speaker 3: key you guard fiercely. Anyone can use your public key
Speaker 3: to encrypt a message for you, but only you with
Speaker 3: your private key can decrypt it.
Speaker 2: And RSS security comes from.
Speaker 3: The difficulty of factoring large numbers. The public key involves
Speaker 3: a large number that's the product of two big primes.
Speaker 3: Finding those crimes factoring is necessary to get the private
Speaker 3: key and that's believed hard digital signatures flip it. You
Speaker 3: use your private key to create a signature on a message.
Speaker 3: Anyone can use your public key to verify that.
Speaker 2: Signature, proving it came from you and wasn't changed.
Speaker 3: Yes, it provides authenticity and integrity plus non repudiation. That
Speaker 3: means you can't later deny sending the message because only
Speaker 3: you have the private key that could create that signature.
Speaker 3: It's verifiable by anyone.
Speaker 2: Now, I remember hearing public key crypto is way slower
Speaker 2: than symmetric stuff.
Speaker 1: Is that right?
Speaker 3: Oh? Yeah, orders of magnitude slower. Doing math with those
Speaker 3: huge numbers is computationally expensive. Encrypting a large file with
Speaker 3: RSA directly would be painfully slow.
Speaker 1: So how do we use it? In practice?
Speaker 3: We use hybrid encryption, often called KEEMDEM key encapsulation data encapsulation.
Speaker 1: How does that work?
Speaker 3: Use the slow public key crypto only to encrypt and
Speaker 3: exchange a temporary random symmetric key, that's the CAM part.
Speaker 3: Then use that fast symmetric key with something like AES
Speaker 3: to encrypt the actual bulk data. That's the DEM part.
Speaker 1: Best of both worlds.
Speaker 2: Public key solves the key exchange problem. Symmetric key does
Speaker 2: the fast data encryption exactly.
Speaker 3: That's how things like TLSSL secure websites work, how PGP
Speaker 3: email encryption works. It's the standard approach.
Speaker 2: Okay, so V Hellman and RSA, all these public key
Speaker 2: systems rely on certain math problems being hard for current computers.
Speaker 1: What happens if they become easy?
Speaker 3: And that is the multi trillion dollar question right now.
Speaker 3: Here's where it gets really interesting and potentially scary. Back
Speaker 3: in nineteen ninety four, Peter Shore published an algorithm. Shore's
Speaker 3: algorithm shows that a sufficiently powerful quantum computer could solve
Speaker 3: both factoring and discrete logarithms efficiently in polynomial time.
Speaker 1: Wait, both problems the foundations of RSA and diffy Hellman and.
Speaker 3: Elliptic curve cryptography, which is widely.
Speaker 2: Used to Yes, so a working quantum computer basically breaks
Speaker 2: all the public key crypto we use today pretty much.
Speaker 3: The book states it's starkly all public cryptosystems we have
Speaker 3: covered thus far can be broken in polynomial time by
Speaker 3: a quantum computer.
Speaker 1: Okay, wow, So what's the plan? Are we heading for
Speaker 1: crypto apocalypse?
Speaker 3: Well? Hopefully not. This is the whole field of post
Speaker 3: quantum cryptography or PKEC. Researchers worldwide are racing to develop
Speaker 3: and standardize new public key cryptosystems based on different mathematical problems,
Speaker 3: ones believed to be hard even for quantum computers, like
Speaker 3: what kind of problems Things like lattice based cryptography are
Speaker 3: big contenders, problems like lwe learning with errors. There's also
Speaker 3: hash based signatures, code based crypto, a few different families. NIST,
Speaker 3: the US standards body, has been running a competition to
Speaker 3: select the best candidates and they've chosen the first set
Speaker 3: of standards.
Speaker 2: So we're actively replacing the old algorithms.
Speaker 3: The transition is starting. It's a massive undertaking, but essential.
Speaker 3: Even symmetric crypto needs adjustments. Hash functions need bigger outputs,
Speaker 3: maybe doubling key sizes for as against certain quantum attacks,
Speaker 3: just to maintain the same security level. Grower's algorithm effects
Speaker 3: symmetric search problems.
Speaker 1: So it really touches everything.
Speaker 3: It really does. It's a fundamental shift in the underlying assumptions.
Speaker 2: Wow, from visioneer and statistical tricks to lattices and quantum resistance.
Speaker 1: It's just been this constant evolution, this arms race.
Speaker 3: Absolutely the attacker finds a weakness, the defender builds a
Speaker 3: stronger wall using deeper mathematics. It constantly pushes the boundary
Speaker 3: of what we thought was computationally possible.
Speaker 2: So what does this all mean for you listening right now, Well,
Speaker 2: it means that the invisible shield protecting your emails, your
Speaker 2: bank accounts, your online life is constantly being rebuilt, reinforced
Speaker 2: with new kinds of math.
Speaker 3: It's a silent, ongoing process, but absolutely critical.
Speaker 2: So next time you see that padlock or hit send
Speaker 2: on an encrypted message, maybe take a second think about
Speaker 2: that hidden dance of math, the assumptions, the proofs keeping
Speaker 2: your data safe, and consider how cryptographers right now are
Speaker 2: choreographing the next dance, designing the steps needed to withstand
Speaker 2: the incredible power of computers that don't even fully exist yet.
Speaker 2: It's quite something