Latest / CyberSecurity Summary / Cryptography and Network Security: Principles and Practice
Transcript
- 0:00Speaker 1: Welcome to the deep dive everyone. Today we're going deep
- 0:03Speaker 1: into the world of cryptography and network security.
- 0:06Speaker 2: Ooh sounds exciting.
- 0:08Speaker 1: It is really Yeah. We've got excerpts from Cryptography and
- 0:11Speaker 1: Network Security Principles in Practice, the seventh edition, you know
- 0:15Speaker 1: William Stallings Classic, Yeah, codes, ciphers. How we protect our
- 0:20Speaker 1: information in this digital age? I mean it's everywhere, right,
- 0:24Speaker 1: It's amazing how it's evolved.
- 0:26Speaker 2: Really, we're way beyond simple secret writing. Now we have
- 0:29Speaker 2: these complex algorithms, not just for confidentiality, but for integrity,
- 0:33Speaker 2: you know, making sure data hasn't been tampered with. Yeah, authenticity,
- 0:37Speaker 2: non repudiation.
- 0:38Speaker 1: Whoa big words, haha, right.
- 0:41Speaker 2: But basically making sure you can't deny sending something and
- 0:44Speaker 2: of course controlling access who gets to see what.
- 0:47Speaker 1: So it's like building trust, but digitally exactly.
- 0:50Speaker 2: And there are different ways to do that. Two main
- 0:51Speaker 2: types of cryptography come to mind. Symmetric key and asymmetric key.
- 0:55Speaker 1: Okay, so like symmetric key, that's where both sides have
- 0:58Speaker 1: the same key, like a shared secret.
- 1:00Speaker 2: You got it, super efficient, especially for lots of data.
- 1:03Speaker 1: Cool. What are some examples of that, like algorithms and stuff?
- 1:06Speaker 2: Well, there's the Advanced Encryption Standard AES. That's the big one.
- 1:10Speaker 1: Now, oh yeah, AES, I've heard of that.
- 1:12Speaker 2: And then there's DES, the Data Encryption Standard. It was
- 1:15Speaker 2: widely used but kind of outdated now right right?
- 1:19Speaker 1: Are these algorithms based on like any particular design.
- 1:24Speaker 2: Many of them DEES included. They use this thing called
- 1:27Speaker 2: the feistal cipher.
- 1:28Speaker 1: Feistal cypher.
- 1:29Speaker 2: It's a fundamental structure, especially for block ciphers. So imagine
- 1:33Speaker 2: you take a block of text, right, split it in half.
- 1:36Speaker 2: Then you do all these rounds of substitutions, permutations.
- 1:40Speaker 1: We kind of like shuffling a deck of cards.
- 1:42Speaker 2: Yeah, over and over, Yeah, exactly, controlled chaos, but with
- 1:46Speaker 2: the key to make sense of it all makes sense.
- 1:48Speaker 2: There's also this special function within it, the round function,
- 1:51Speaker 2: and that's where things get really hard to crack if
- 1:53Speaker 2: you don't have the key.
- 1:54Speaker 1: Oh icee. So this fiscal thing, why is it so important?
- 1:57Speaker 2: Well? The beauty is, even with that complex round function,
- 2:01Speaker 2: encrypting and decrypting are basically mirror images of each other, reversible,
- 2:06Speaker 2: you know.
- 2:07Speaker 1: Ah, so you can get the original message back, gotcha, gotcha? Okay,
- 2:10Speaker 1: then what about asymmetric key cryptography how's that different?
- 2:14Speaker 2: This is where things get really interesting. Two keys, a
- 2:18Speaker 2: public key anyone can have it, and a private key
- 2:21Speaker 2: you keep that secret.
- 2:23Speaker 1: Like two keys to a mailbox, one to put mail
- 2:26Speaker 1: I in, one to take it out.
- 2:28Speaker 2: Perfect analogy. Public key encrypts only the private key decrypts.
- 2:33Speaker 1: And no need to like secretly share a key beforehand.
- 2:36Speaker 2: Exactly, game changer for online communication.
- 2:39Speaker 1: Big time any like. Famous examples of asymmetric key algorithms.
- 2:42Speaker 2: Oh. Absolutely, RSA revest shmir Adleman the creators used for
- 2:48Speaker 2: digital signatures key exchange. You see that little lock icon
- 2:52Speaker 2: in your browser, that's off an RSA working in the background,
- 2:54Speaker 2: making sure you're on the real website not some fake one.
- 2:57Speaker 1: Wow. So RSA is keeping us safe online? And what
- 3:00Speaker 1: about digital signatures? How do they work?
- 3:02Speaker 2: Think of it like a fingerprint for a message. Use
- 3:05Speaker 2: a hash bunks hash function creates a unique code for
- 3:07Speaker 2: the message. Then you encrypt that hash with your private key. Bam,
- 3:11Speaker 2: digital signature.
- 3:12Speaker 1: So it's tamper proof. Proves it's really from U, A
- 3:15Speaker 1: and D hasn't been messed with.
- 3:16Speaker 2: You got it. The recipient uses your public key to decrypt,
- 3:20Speaker 2: check off the hash matches.
- 3:21Speaker 1: Clever so all these different types of cryptography, they're like
- 3:25Speaker 1: connected somehow they are.
- 3:26Speaker 2: And to manage it, all the keys, the certificates. That's
- 3:29Speaker 2: where public key infrastructure comes in PKI.
- 3:32Speaker 1: PKI Okay, sounds important but kind of complicated. Break it
- 3:35Speaker 1: down for me.
- 3:36Speaker 2: You're online, right, how do you know a website is legit?
- 3:39Speaker 1: Right?
- 3:39Speaker 2: Yeah, that's PKI. It uses digital certificates like digital passports
- 3:44Speaker 2: to verify identities, individuals, organizations, So.
- 3:49Speaker 1: Like a trusted third party checks everyone's ID exactly.
- 3:52Speaker 2: And there's a whole chain of trust too. Your browser
- 3:54Speaker 2: trust is a root authority, That authority trusts others and
- 3:58Speaker 2: so on down to the website you're on.
- 4:00Speaker 1: Oh, a whole system, so no one can just pretend
- 4:02Speaker 1: to be someone else.
- 4:03Speaker 2: That's the idea. And with all these devices users online,
- 4:06Speaker 2: we need ways to make sure only the right ones
- 4:09Speaker 2: get access to networks. That's where network access control comes in.
- 4:12Speaker 1: Ns NEC. Is that like a security guard for your network.
- 4:16Speaker 2: Precisely controls access based on rules, pre defined policies, so
- 4:21Speaker 2: only authorized devices and users can connect.
- 4:24Speaker 1: Oh, like checking if your anti virus is up today exactly.
- 4:28Speaker 2: And a key part of that is the extensible authentication
- 4:31Speaker 2: protocol or EAP.
- 4:32Speaker 1: EAP, so it's like a checkpoint making sure only the
- 4:34Speaker 1: good guys get in yep.
- 4:36Speaker 2: And it's flexible, can handle simple passwords or stronger stuff
- 4:40Speaker 2: like digital certificates, depends on what the organization needs.
- 4:43Speaker 1: Cool. So EAP is adaptable. Man, it's amazing how all
- 4:47Speaker 1: these pieces fit together.
- 4:48Speaker 2: It is, and we've just scratched the surface.
- 4:50Speaker 1: Seriously, there's more.
- 4:52Speaker 2: Oh yeah, next time we'll see how all this applies
- 4:54Speaker 2: to the cloud. Cloud security, that's a whole other beast.
- 4:58Speaker 2: Back again for more cryptography fun. Remember those public key
- 5:02Speaker 2: cryptosystems we talked.
- 5:03Speaker 1: About, yeah, RSA and stuff.
- 5:04Speaker 2: Right, Well there's another one, Diffy Hellman specifically for key.
- 5:08Speaker 1: Exchange Iffy Hellman HM vaguely familiar.
- 5:11Speaker 2: The idea is two parties can establish a shared secret
- 5:14Speaker 2: key over an insecure channel.
- 5:17Speaker 1: Wait, so they don't actually send the key.
- 5:19Speaker 2: Nope, that's the trick. It uses math, the difficulty of
- 5:22Speaker 2: calculating discrete logarithms.
- 5:24Speaker 1: Discrete what now?
- 5:25Speaker 2: Aha, it's a bit complex, But imagine Alice and Bob
- 5:29Speaker 2: want to share a secret.
- 5:30Speaker 1: Right, okay, classic AlSi and Bob.
- 5:32Speaker 2: They start with a prime number and a primitive route
- 5:35Speaker 2: these are.
- 5:35Speaker 1: Public, so some shared info to begin with.
- 5:39Speaker 2: Then what each chooses a secret number they're private key.
- 5:43Speaker 2: They use that plus the public stuff to generate public keys,
- 5:47Speaker 2: which they then exchange.
- 5:49Speaker 1: They swap public keys. Yeah, but how does that create
- 5:53Speaker 1: the shared.
- 5:53Speaker 2: Secret Here's the magic. Each person takes the other's public
- 5:57Speaker 2: key and does another calculation using their own w and
- 6:00Speaker 2: private key, and somehow they both end up with the
- 6:03Speaker 2: same shared secret key.
- 6:04Speaker 1: No way, without ever sending it directly exactly.
- 6:07Speaker 2: It's like a secret handshake, only they know. Breaking this
- 6:09Speaker 2: would mean figuring out that discrete logarithm really hard problem,
- 6:13Speaker 2: especially for big prime.
- 6:15Speaker 1: Numbers, so computers can't crack it easily, not.
- 6:17Speaker 2: In any reasonable time. No, that's why it's secure.
- 6:20Speaker 1: Math is cool. Are there other cryptosystems that use this
- 6:23Speaker 1: kind of like difficult math?
- 6:25Speaker 2: Oh? Yeah. Elgamol, similar to Diffie Hellman, also relies on
- 6:29Speaker 2: discrete logarithms, but it can do encryption ad digital signatures, so.
- 6:33Speaker 1: You could send a secret message A and D prove
- 6:36Speaker 1: it's from you all in one go precisely.
- 6:39Speaker 2: But god admit, both Diffy Hellman and Elgamol computationally expensive,
- 6:44Speaker 2: more so than symmetric key stuff. Because of all the
- 6:47Speaker 2: math yep so trade off there, speeds critical might not
- 6:50Speaker 2: be the best choice.
- 6:51Speaker 1: Right right. We talked about how RSA keys are getting
- 6:54Speaker 1: longer to stay ahead of faster computers. Has that led
- 6:58Speaker 1: to any new develop means, like completely new types of cryptography?
- 7:02Speaker 2: It has. There's this fascinating thing called elliptic curve cryptography
- 7:06Speaker 2: ECC ECC.
- 7:08Speaker 1: I've heard the name, but how was even a bit intimidating.
- 7:10Speaker 2: It's like the sports carve cryptography, same level of security
- 7:13Speaker 2: as RSA, but with much shorter keys.
- 7:16Speaker 1: Wait, shorter keys, but still secure. How's that possible?
- 7:19Speaker 2: It uses completely different math, the arithmetic of elliptic curves.
- 7:23Speaker 2: Elliptic curves, they're defined by specific equations, and the points
- 7:26Speaker 2: on these curves they form a group, and the operations
- 7:29Speaker 2: within that group are incredibly hard to reverse engineer.
- 7:32Speaker 1: Sounds like some high level math it is.
- 7:34Speaker 2: But the point is that difficulty allows for shorter keys
- 7:37Speaker 2: without sacrificing security. Huge advantage for things like smartphones, embedded
- 7:43Speaker 2: systems where resources are limited.
- 7:46Speaker 1: Ah so for devices that aren't super powerful.
- 7:48Speaker 2: Exactly, and it's being used already for digital signatures, key exchange,
- 7:54Speaker 2: even some cryptocurrencies use it.
- 7:55Speaker 1: So ECC is like the future of cryptography.
- 7:59Speaker 2: It's definitely a rise star. Yeah. As we get more
- 8:01Speaker 2: connected devices, that efficiency is going to be key no
- 8:05Speaker 2: pun intended.
- 8:06Speaker 1: Uh huh, nice one. Okay, so we've got all these
- 8:08Speaker 1: keys ciphers, but what about the random numbers used in cryptography.
- 8:12Speaker 1: You mentioned those before.
- 8:13Speaker 2: Ah, pseudorandom number generation super important. These numbers. They look random,
- 8:18Speaker 2: but they're generated by algorithms.
- 8:20Speaker 1: Right. Randomness is crucial for security, makes it hard to
- 8:23Speaker 1: predict what's going to happen. But how do we know
- 8:25Speaker 1: these pseudorandom numbers are actually good enough?
- 8:27Speaker 2: Good question. They can't be predictable. There are different approaches.
- 8:30Speaker 2: One is using asymmetric ciphers like RSA as the basis.
- 8:34Speaker 1: Wait, so the same stuff that does encryption can also
- 8:36Speaker 1: make random numbers.
- 8:37Speaker 2: Yep, take a seed value, encrypt it with RSA using
- 8:41Speaker 2: a secret key. That output becomes your pseudorandom number. Do
- 8:44Speaker 2: it repeatedly you get a whole stream.
- 8:46Speaker 1: Of it, like a chain reaction of randomness. Clever. Are
- 8:50Speaker 1: there other ways though, Ones that don't use asymmetric ciphers.
- 8:54Speaker 2: Absolutely block ciphers can do it too, in a special
- 8:56Speaker 2: way called countermode counter mode. Okay, with that, you have
- 8:59Speaker 2: your secret key and a counter value. Encrypt those with
- 9:03Speaker 2: the block cipher. The output is your random bits. Increment
- 9:06Speaker 2: the counter repeat you get more random numbers.
- 9:09Speaker 1: To the counter's like changing the combination on a lot,
- 9:12Speaker 1: different combination, different.
- 9:13Speaker 2: Numbers exactly, and it's efficient. Can be done in parallel,
- 9:16Speaker 2: lots of random numbers at once.
- 9:17Speaker 1: Man, this stuff is so intricate. I never realized how
- 9:20Speaker 1: much goes into making things secure.
- 9:22Speaker 2: It's a lot. Yeah, but all these pieces they work
- 9:25Speaker 2: together to protect our data, our communications, the whole digital world. Really.
- 9:31Speaker 2: Back for the final stretch of our cryptography deep dive,
- 9:34Speaker 2: We've talked about ciphers, keys, hash functions, PKI, even those
- 9:38Speaker 2: cool elliptic curves.
- 9:39Speaker 1: Yeah, it's been a wild ride, but I feel like
- 9:41Speaker 1: I'm actually starting to get it, you know, like how
- 9:43Speaker 1: this stuff keeps us safe online.
- 9:45Speaker 2: That's great to hear. It's all about understanding the pieces
- 9:48Speaker 2: and how they fit together. Speaking of which, let's talk
- 9:51Speaker 2: more about digital signatures.
- 9:52Speaker 1: Oh yeah, those always seem kind of mysterious to me,
- 9:57Speaker 1: like they're the digital version of signing your name. Right, Yeah,
- 10:00Speaker 1: but how can that be secure? Can't someone just like
- 10:02Speaker 1: copy and paste a digital signature.
- 10:04Speaker 2: Uh huh, that's the key question. They do act like
- 10:07Speaker 2: a real signature, proving it's you and the message hasn't changed.
- 10:11Speaker 2: But it's not as simple as copy paste no way.
- 10:13Speaker 2: Public key cryptography is the magic here.
- 10:16Speaker 1: Okay, So how do those keys public and private make
- 10:21Speaker 1: the signature's work.
- 10:22Speaker 2: Let's say Alice wants to sign a message for Bob. First,
- 10:25Speaker 2: she uses a hash function something like saha two five
- 10:28Speaker 2: six Saha.
- 10:29Speaker 1: Two five six. That's one of those hash things we
- 10:31Speaker 1: talked about, right, makes a unique code for the message exactly.
- 10:34Speaker 2: Think of it like a fingerprint, only for data represents
- 10:37Speaker 2: that specific message. Then Alice encrypts that hash, but with
- 10:41Speaker 2: her private key that becomes her digital signature.
- 10:44Speaker 1: So it's tied to her because of her private key
- 10:47Speaker 1: and to the exact message.
- 10:49Speaker 2: You got it. Now, Bob gets the message and signature.
- 10:53Speaker 2: He uses Alice's public key to decrypt the signature, gets
- 10:57Speaker 2: that original hashback like.
- 10:58Speaker 1: He's unlocking it with his key, and then he can
- 11:01Speaker 1: see the fingerprint exactly.
- 11:03Speaker 2: Now, Bob calculates the hash of the message himself using
- 11:06Speaker 2: the same function Alis did. If they match, Bingo, he
- 11:10Speaker 2: knows it's really from Alice and nothing's been changed.
- 11:12Speaker 1: So it's like a puzzle, only Alice has the right
- 11:15Speaker 1: piece and Bob can test if it fits. Are there
- 11:17Speaker 1: like different ways to do these signatures?
- 11:19Speaker 2: Oh? Yeah, definitely. RSA is one way, but there's also algamol, schnor.
- 11:23Speaker 1: Each has its own quirk, so not one size fits all.
- 11:26Speaker 2: Depends on the situation what you need it for. One
- 11:29Speaker 2: of the most common ones, though, is the Digital Signature
- 11:31Speaker 2: Algorithm DSA. Yeah, rings a bell. What's special about that one?
- 11:34Speaker 1: It's specifically designed for signatures, uses the discrete log or
- 11:38Speaker 1: the problem kind of like algamol, and it's a NIST standard,
- 11:42Speaker 1: you know, National Institute of Standards and Technology.
- 11:45Speaker 2: So it's got like official backing exactly, widely used for
- 11:50Speaker 2: secure email signing, documents, all sorts of things.
- 11:54Speaker 1: So it's been tested and proven. That's reassuring. What about
- 11:57Speaker 1: ECC though, the elliptic curve stuff, Can that be used
- 11:59Speaker 1: for signature too?
- 12:00Speaker 2: It can, and it's got that efficiency advantage. Remember, same
- 12:04Speaker 2: security with shorter keys, right.
- 12:06Speaker 1: Right, let's data to deal with. Yeah, but how does
- 12:08Speaker 1: ECC with all its weird curves and math actually doo signatures?
- 12:13Speaker 2: Same public key principles, just way more efficient. There's a
- 12:16Speaker 2: standard for that too, the Elliptic curve Digital Signature Algorithm ECDSA.
- 12:20Speaker 1: ECDSA got it, another acronym for the collection. Seems like
- 12:24Speaker 1: ECC's popping up everywhere it is.
- 12:27Speaker 2: As technology changes, cryptography has to keep up. That's what
- 12:30Speaker 2: makes it so interesting. Always evolving.
- 12:32Speaker 1: Yeah, speaking of evolving, earlier, we talked about vulnerabilities like
- 12:35Speaker 1: that heart bleed bug. Are there other examples of things
- 12:39Speaker 1: going wrong that taught us important lessons?
- 12:41Speaker 2: Oh? Yeah, definitely. One that comes to mind is the
- 12:43Speaker 2: poutaway attack targeted SSL, the Secure Sockets Layer protocol.
- 12:48Speaker 1: Poutal ly hm vaguely remember that was the issue there.
- 12:51Speaker 2: It exploited a weakness in SSL three point zero and
- 12:54Speaker 2: older version the way it handled padding and encrypted messages.
- 12:58Speaker 2: There was a flaw. Attackers could potentially use that to
- 13:02Speaker 2: like decrypt parts of the traffic.
- 13:05Speaker 1: So it's like one small crack and the whole thing
- 13:08Speaker 1: falls apart.
- 13:08Speaker 2: Kind of like that showed us we've got to keep
- 13:10Speaker 2: things updated, Ditch those old protocols, move to newer, safer
- 13:14Speaker 2: stuff like TLS one point two. Always got to be
- 13:16Speaker 2: one step ahead of that's cybersecurity in a nutshell cat
- 13:20Speaker 2: and mask game. The good guys and the bad guys.
- 13:23Speaker 2: Stay informed, use best practices, update your defenses. That's how
- 13:27Speaker 2: we stay safe.
- 13:28Speaker 1: Well, I got to say this deep dive has been
- 13:30Speaker 1: eye opening. Never thought I'd be so into cryptography, but
- 13:33Speaker 1: you've made it fascinating.
- 13:35Speaker 2: Glad to hear it. Hopefully it sparks some curiosity, you know,
- 13:38Speaker 2: to keep learning about this stuff. The more we understand,
- 13:40Speaker 2: the better we can protect ourselves in this digital world.
- 13:43Speaker 1: Absolutely, thanks so much for being our guide on this
- 13:45Speaker 1: journey my pleasure. It's been fun, and to all our
- 13:47Speaker 1: listeners out there, thanks for joining the Deep Dive. We'll
- 13:50Speaker 1: catch you next time with another adventure into the world
- 13:53Speaker 1: of knowledge.