Latest / CyberSecurity Summary / Cryptography and Network Security: Principles and Practice, Global Ed
Transcript
- 0:00Speaker 1: Welcome to the deep Dive. Today, we're jumping straight into
- 0:05Speaker 1: the really crucial world of cryptography and network security. That's right,
- 0:09Speaker 1: We've got a whole bunch of information here, and our
- 0:11Speaker 1: goal is really to give you the essential understanding, you know,
- 0:14Speaker 1: how our digital lives are protected without getting bogged down
- 0:18Speaker 1: in complexity. We'll explore everything from the basic mac behind
- 0:22Speaker 1: encryption to the measure securing modern networks and well the cloud.
- 0:27Speaker 2: Yeah, and to really get under the hood, we've been
- 0:29Speaker 2: looking at a pretty comprehensive textbook. It's actually aligned with
- 0:33Speaker 2: the ACMIE Computer Science standards.
- 0:36Speaker 1: Oh interesting, and.
- 0:37Speaker 2: It really highlights how fundamental information security is today. So
- 0:41Speaker 2: we're trying to pull out those key concepts relevant whether
- 0:44Speaker 2: you're say a tech professional or just curious about how
- 0:47Speaker 2: this all works exactly.
- 0:48Speaker 1: So if you've ever wondered about the you know, the
- 0:50Speaker 1: secret math keeping your data private online or the different
- 0:53Speaker 1: ways your information is shielded, then yeah, this deep dive
- 0:56Speaker 1: is for you.
- 0:57Speaker 2: We want to make these complex topics clear, maybe even
- 1:00Speaker 2: share a few surprising facts so you walk away with
- 1:02Speaker 2: some real aha moments.
- 1:04Speaker 1: Hopefully.
- 1:04Speaker 2: Okay, let's dive in right at the beginning. Number theory Okay,
- 1:09Speaker 2: So at.
- 1:10Speaker 1: The heart of well, a lot of modern cryptography is
- 1:13Speaker 1: number theory. We can kick things off with divisibility and
- 1:16Speaker 1: the Euclidean algorithm. Right, This gives us a really efficient
- 1:19Speaker 1: way to find the greatest common divisor of two numbers.
- 1:22Speaker 2: Okay, finding the GCD seems mathematical, but how does it apply.
- 1:27Speaker 1: Well, it might sound purely academic, but it's actually surprisingly
- 1:30Speaker 1: important in various crypto techniques. Think key generation and calculations
- 1:36Speaker 1: in modular arithmetic.
- 1:38Speaker 2: Ah. Right, And speaking of modular arithmetic, that's all about remainders,
- 1:42Speaker 2: isn't it exactly?
- 1:43Speaker 1: It's where you focus on the remainder after division. Like
- 1:45Speaker 1: a clock, you know, after twelve you wrap around back
- 1:48Speaker 1: to one. Okay, numbers wrap around after hitting a certain
- 1:51Speaker 1: value the modulus. So like if you calculate eleven to
- 1:53Speaker 1: the power of seven and then divide by thirteen, the
- 1:55Speaker 1: remainder you get is two one seventeen mod thirteen is two.
- 1:59Speaker 2: Right. Wrapping around is key, it really is. It seems simple,
- 2:02Speaker 2: but it's what makes certain operations easy one way but
- 2:05Speaker 2: incredibly hard to reverse. And that asymmetry that's a core
- 2:09Speaker 2: principle for secure communication and crypto, got it, And this
- 2:13Speaker 2: whole idea sets the stage for prime numbers.
- 2:16Speaker 1: Which everyone knows are important right now, number is only
- 2:18Speaker 1: divisible by one, and.
- 2:19Speaker 2: Themselves fundamental, absolutely fundamentally crypto. Their unique properties make them
- 2:24Speaker 2: perfect building blocks for keys and algorithms.
- 2:27Speaker 1: Okay, now here's where it gets maybe a bit more complex,
- 2:31Speaker 1: fermats and Euler's theorems.
- 2:32Speaker 2: Right, powerful stuff. Euler's theorem uses something called Eiler's totient function,
- 2:37Speaker 2: often written five N or fn.
- 2:40Speaker 1: And what does that function do?
- 2:42Speaker 2: It basically counts how many positive integers up to a
- 2:44Speaker 2: given number and don't share any common factors with n
- 2:47Speaker 2: apart from one. Okay, and the kind of interesting property
- 2:50Speaker 2: is that fn is always even if n is bigger
- 2:53Speaker 2: than two. Sounds abstract, I know, yeah, a bit, but
- 2:56Speaker 2: it actually has real implications for how cryptosystems are designed
- 3:00Speaker 2: and analyzed.
- 3:01Speaker 1: Interesting.
- 3:02Speaker 2: Okay, these theorems, they lead us towards discrete logarithms.
- 3:05Speaker 1: Discrete logarithms. What's the core idea there?
- 3:08Speaker 2: Okay? Imagine an equation hy equal g to the power
- 3:13Speaker 2: of x, all done modulo p, where p is a prime.
- 3:17Speaker 2: If you know g x and P, finding why is easy,
- 3:21Speaker 2: straightforward calculation. But the reverse problem finding x exactly if
- 3:25Speaker 2: you know YG and P, trying to figure out that
- 3:28Speaker 2: original exponent X is generally incredibly difficult, computationally hard.
- 3:33Speaker 1: Ah, and that difficulty is the security that's the bedrock
- 3:37Speaker 1: for many modern systems.
- 3:39Speaker 2: It's a hard problem, much like factoring very large numbers, which,
- 3:42Speaker 2: as we'll get to, is key for RSA.
- 3:45Speaker 1: Okay, so those are the mathematical foundations. Let's move into
- 3:48Speaker 1: symmetric ciphers now, starting with maybe the classical.
- 3:51Speaker 2: Techniques sounds good.
- 3:52Speaker 1: So first off, what makes us cipher symmetric? In simple terms,
- 3:56Speaker 1: the key.
- 3:57Speaker 2: Thing that defining characteristic is that you use the same
- 4:00Speaker 2: secret key for both encryption scrambling the message and decryption unscrambling.
- 4:03Speaker 1: Okay, one key does both jobs like a safe.
- 4:06Speaker 2: Key, precisely, lock and unlock with the same key.
- 4:08Speaker 1: Makes sense. So what were some of the early ways
- 4:11Speaker 1: people use this single key.
- 4:13Speaker 2: Well, classical methods mostly fall into two buckets, substitution and transposition.
- 4:18Speaker 1: Substitution that like replacing letters.
- 4:20Speaker 2: Yeah, basically replacing parts of the plaintext letters maybe groups
- 4:25Speaker 2: of letters with other symbols or letters. The classic Caesar
- 4:28Speaker 2: cipher is a simple example, just shift every letter a
- 4:31Speaker 2: fixed number of places.
- 4:32Speaker 1: Right A becomes D, B becomes etc.
- 4:35Speaker 2: Exactly. More complex ones like the Visioneer cipher use a keyword.
- 4:40Speaker 2: That keyword tells you how much to shift each letter,
- 4:43Speaker 2: making it harder to crack than a simple caesar.
- 4:46Speaker 1: Okay, and transposition sounds like just shuffling things around, That's
- 4:50Speaker 1: exactly it.
- 4:50Speaker 2: Transposition ciphers just rearrange the order of the letters or
- 4:53Speaker 2: other units in the plaintext. They don't change the letters themselves.
- 4:56Speaker 1: Like making an anagram.
- 4:57Speaker 2: Pretty much, yeah, shuffling the deck basically.
- 4:59Speaker 1: Now, when we talk about how strong these are, unconditional
- 5:02Speaker 1: security versus computational security, what's the difference?
- 5:05Speaker 2: Right? Unconditional security is the gold standard. Theoretically, it means
- 5:10Speaker 2: even an attacker with infinite computing power infinite time still
- 5:14Speaker 2: couldn't figure out the original message just from the ciphertext.
- 5:17Speaker 2: Why not because the ciphertext simply doesn't contain enough information.
- 5:21Speaker 2: The only cipher known to achieve this is the one
- 5:24Speaker 2: time pad.
- 5:24Speaker 1: Ah, the famous one time pad.
- 5:26Speaker 2: Yeah, but it needs a truly random key that's as
- 5:29Speaker 2: long as the message itself, and you can only use it.
- 5:31Speaker 1: Once, which is impractical.
- 5:34Speaker 2: Very impractical. Generating and securely sharing those long keys is
- 5:37Speaker 2: a nightmare. So most modern encryption aims for computational security instead,
- 5:43Speaker 2: which means it means that, yeah, theoretically it might be
- 5:45Speaker 2: possible to break the cipher, but the amount of computing
- 5:48Speaker 2: power and time needed is just astronomical, so enormous that
- 5:52Speaker 2: it's practically impossible in the real world, you know, within
- 5:55Speaker 2: any reasonable timeframe.
- 5:56Speaker 1: Okay, So the security relies on it being too hard
- 5:59Speaker 1: to compute the answer.
- 6:00Speaker 2: Exactly, the key length, the complexity of the algorithm, that's
- 6:03Speaker 2: what provides the barrier.
- 6:05Speaker 1: So that leads us to modern symmetric ciphers. Let's start
- 6:08Speaker 1: with block ciphers and the famous data encryption standard DES OKAYDES.
- 6:15Speaker 2: What's the main difference between a block cipher and say,
- 6:18Speaker 2: stream cipher? Good question. Stream ciphers encrypted data bit by
- 6:22Speaker 2: bit or bite by bite as it comes in. Block ciphers, though,
- 6:26Speaker 2: operate on fixed sized chunks of plaintext. These chunks are
- 6:29Speaker 2: called blocks.
- 6:30Speaker 1: How big were the blocks for das?
- 6:32Speaker 2: The EES used sixty four bit blocks, and it used
- 6:35Speaker 2: a fifty six bit key. Each sixty four bit block
- 6:37Speaker 2: is processed as a single unit.
- 6:40Speaker 1: Our sources mentioned an ideal block cipher. What's that concept about? Ah?
- 6:44Speaker 2: Yeah, Feistal's idea. Think of an ideal block cipher as
- 6:48Speaker 2: like a perfect scrambler for blocks of a certain size.
- 6:51Speaker 2: For an n bit block, there are two to the
- 6:52Speaker 2: end possible inputs, right. An ideal cipher could map each
- 6:56Speaker 2: of those inputs to any of the two to the
- 6:58Speaker 2: m possible outputs in a totally and them looking but
- 7:00Speaker 2: reversible way. It gives you the maximum possible number of
- 7:03Speaker 2: encryption transformations.
- 7:05Speaker 1: Okay. The theoretical maximum and DS uses something called the
- 7:08Speaker 1: Feistyal cipher structure. Not quite ideal, but based on it exactly.
- 7:12Speaker 2: The Fystyal structure is a really clever design used in
- 7:14Speaker 2: many block ciphers des included.
- 7:16Speaker 1: How does it work? Basically, you take the.
- 7:18Speaker 2: Plaintext block, split it in half, then you run it
- 7:21Speaker 2: through a series of rounds. In each round, a special
- 7:23Speaker 2: function is applied to one half using a round key
- 7:26Speaker 2: derived from the main key.
- 7:28Speaker 1: Okay.
- 7:28Speaker 2: The result of that function is then combined, usually just exored,
- 7:32Speaker 2: with the other half. Then crucially, the two halves are swapped.
- 7:35Speaker 2: Repeat for several rounds.
- 7:36Speaker 1: And the clever part, the.
- 7:38Speaker 2: Really neat thing, is the function itself doesn't have to
- 7:40Speaker 2: be reversible for the whole encryption process to be reversible
- 7:44Speaker 2: because of that swap and XR structure. Decryption just runs
- 7:47Speaker 2: the process backward using the round keys in reverse order.
- 7:50Speaker 1: Ah. Okay, So DES sixty four bit block, fifty six
- 7:54Speaker 1: bit key, sixteen rounds of this feistyle process plus some
- 7:57Speaker 1: shuffling at the start and end.
- 7:59Speaker 2: That's the gist of it. Yeah, initial and final permutations.
- 8:02Speaker 1: What were the main worries about DES security over time?
- 8:05Speaker 2: The big one, really, the killer, was the fifty six
- 8:07Speaker 2: big key size. It seemed okay back in the seventies
- 8:10Speaker 2: when it was designed.
- 8:11Speaker 1: But computing power caught up massively.
- 8:14Speaker 2: The possibility of a brute force attack just trying every
- 8:17Speaker 2: single one of the two hundred and fifty six possible
- 8:19Speaker 2: keys became a very real threat. People started designing machines
- 8:23Speaker 2: specifically to crack DES.
- 8:25Speaker 1: And eventually they could.
- 8:26Speaker 2: Yep, those concerns were validated. DES just wasn't strong enough anymore,
- 8:30Speaker 2: which led to the need for replacement.
- 8:32Speaker 1: Which brings us neatly to the Advanced Encryption Standard AES,
- 8:35Speaker 1: the successor. How does AES differ from DES in terms
- 8:38Speaker 1: of design? Security?
- 8:40Speaker 2: As is quite different? Internally doesn't use that feistyle structure.
- 8:43Speaker 2: It works on larger blocks under twenty eight.
- 8:45Speaker 1: Bits, bigger blocks and bigger keys, much bigger keys.
- 8:48Speaker 2: AES supports key lengths of one hundred and twenty eight,
- 8:50Speaker 2: one hundred and ninety two or two hundred and fifty
- 8:52Speaker 2: six bits. That makes it vastly more resistant to broot
- 8:55Speaker 2: force attacks.
- 8:55Speaker 1: Than des Okay, and internally, how does it process that
- 8:59Speaker 1: one hundred and twenty eight It organizes the.
- 9:01Speaker 2: One hundred and twenty eight bits into a four by
- 9:03Speaker 2: four grid of bytes. This grid is called the state array.
- 9:06Speaker 2: The encryption process involves transforming the state array over multiple rounds.
- 9:09Speaker 1: And what are the main transformations in each as round?
- 9:12Speaker 2: There are four main steps repeated in each round byte
- 9:15Speaker 2: sub shift, rows, mixed columns, and ad.
- 9:17Speaker 1: Round key Okay, break those down briefly, BIGHTE.
- 9:20Speaker 2: Sub byte sub is a substitution step. Each byte in
- 9:24Speaker 2: the state array is replaced by another byte according to
- 9:26Speaker 2: a fixed lookup table called an s box. It provides nonlinearity.
- 9:31Speaker 2: This rose shift rows cyclically shifts the bytes in each
- 9:34Speaker 2: row of the state array. Row one shifts by one byte,
- 9:38Speaker 2: row two by two, and so on. This helps spread
- 9:40Speaker 2: changes across columns.
- 9:42Speaker 1: Mixed columns sounds important.
- 9:44Speaker 2: It is. It's a more complex mathematical step that mixes
- 9:47Speaker 2: the bytes within each column of the state. Uses operations
- 9:50Speaker 2: in a finite field.
- 9:51Speaker 1: Finite field like that modular arithmetic we.
- 9:54Speaker 2: Talked about sort of, Yeah, it's arithmetic with polynomials over
- 9:57Speaker 2: GF twenty eight. The key point is that this step
- 10:00Speaker 2: ensure is that changes in one byte quickly affect many
- 10:03Speaker 2: other bytes in the block. It provides diffusion, okay, strong mixing.
- 10:06Speaker 2: And the last step add round key ad ground key
- 10:09Speaker 2: is simple. It just xo R is the current statea
- 10:11Speaker 2: array with a round specific key that's derived from the
- 10:14Speaker 2: main AES key. This is where the secret key actually
- 10:16Speaker 2: gets mixed.
- 10:17Speaker 1: Into the data you mentioned. Mixed columns uses finite field math.
- 10:20Speaker 1: Can you give a slightly less mathy idea of what
- 10:23Speaker 1: it achieves?
- 10:24Speaker 2: Sure? Think of it like really thoroughly blending the ingredients
- 10:27Speaker 2: in each column of that four by four grid. Mathematically,
- 10:30Speaker 2: it involves treating each column like a polynomial and multiplying
- 10:34Speaker 2: it by a fixed polynomial using special rules.
- 10:37Speaker 1: Huh.
- 10:37Speaker 2: The result is that every bite in the output column
- 10:40Speaker 2: depends on all the bytes in the input column, great
- 10:42Speaker 2: for scrambling things up quickly.
- 10:44Speaker 1: And these round keys for ad round key. They come
- 10:46Speaker 1: from the main key, Yes.
- 10:48Speaker 2: Through a process called key expansion. The original one twenty eight, one, nine,
- 10:52Speaker 2: two or two hundred and fifty six bit key is
- 10:55Speaker 2: expanded into a whole schedule of round keys, one for
- 10:58Speaker 2: each round plus an initial one.
- 10:59Speaker 1: Is that expansion important for security too?
- 11:01Speaker 2: Absolutely? It's designed so that every bit of the original
- 11:04Speaker 2: key influences many bits of the round keys. This diffusion
- 11:08Speaker 2: is vital. Change one bit in the main key and
- 11:10Speaker 2: the round keys, and thus the encryption changed drastically.
- 11:14Speaker 1: Okay, AES sounds much more robust. Now, how are block
- 11:17Speaker 1: ciphers like AES actually used to encrypt say a large
- 11:20Speaker 1: file that gets us into these modes of operation? Right?
- 11:23Speaker 2: Exactly, a block cipher only encrypts one fixed size block
- 11:26Speaker 2: at a time. Modes of operation define how you apply
- 11:30Speaker 2: that block cipher repeatedly to handle data of any size. Right,
- 11:34Speaker 2: and different modes have different characteristics, different security properties, different
- 11:38Speaker 2: performance trade offs.
- 11:39Speaker 1: Let's run through the main ones. Electronic Codebook mode ECB
- 11:43Speaker 1: sounds basic.
- 11:44Speaker 2: It is the simplest. You just chop the plaintext into
- 11:47Speaker 2: blocks and encrypt each block independently using the same key.
- 11:51Speaker 1: What's the problem with that?
- 11:52Speaker 2: The huge weakness is that if you have identical plaintext blocks,
- 11:56Speaker 2: they will always encrypt the exact same ciphertext block.
- 12:00Speaker 1: So patterns remain visible totally.
- 12:02Speaker 2: You often see it demonstrated with images. You can still
- 12:04Speaker 2: make out the original image even after ECB encryption, because
- 12:08Speaker 2: areas of the same color encrypt to the same pattern.
- 12:10Speaker 2: Generally you avoid ECB.
- 12:12Speaker 1: Okay, then there's cipher blockchaining CBC mode. How does that
- 12:16Speaker 1: improve things?
- 12:17Speaker 2: CBC introduces dependency between blocks. Before encrypting a plaintext block,
- 12:22Speaker 2: you x R it with the ciphertext from.
- 12:24Speaker 1: The previous block, caning them together.
- 12:26Speaker 2: Exactly for the very first block. There's no previous cybertext,
- 12:29Speaker 2: so you use a random starting value called an initialization
- 12:32Speaker 2: vector or.
- 12:33Speaker 1: Five, and that hides the patterns.
- 12:36Speaker 2: Yes, because now each ciphertext block depends not just on
- 12:39Speaker 2: its corresponding plaintext block, but on all the plaintext blocks
- 12:43Speaker 2: before it. Repeating plaintext blocks won't produce repeating ciphertext blocks anymore,
- 12:48Speaker 2: assuming you use a unique IV.
- 12:49Speaker 1: Okay, what about cipher feedback CFB and output feedback OFB.
- 12:55Speaker 1: They sound like they might be used for streaming data.
- 12:57Speaker 2: You're right. They effectively turn a block cipher into a
- 12:59Speaker 2: stream cipher. How In CFB, you encrypt the previous ciphertext block,
- 13:04Speaker 2: then xor ru the result with the current plaintext block
- 13:06Speaker 2: to get the current ciphertext. That ciphertext then feeds into
- 13:09Speaker 2: the next step. Okay, ANDFB OFD is similar, but instead
- 13:12Speaker 2: of feeding back the ciphertext, it feeds back the output
- 13:15Speaker 2: of the block cipher encryption before the xor This generated
- 13:18Speaker 2: the keystream independent of the plaintext. You then xr this
- 13:22Speaker 2: keystream with the plaintext.
- 13:24Speaker 1: So OFB generates a stream of key bits.
- 13:26Speaker 2: Essentially, yes, like a stream cipher.
- 13:28Speaker 1: Encounter mode CTR that seems popular.
- 13:31Speaker 2: CTR mode is also like a stream cipher. It works
- 13:34Speaker 2: by encrypting a counter value. This counter is unique for
- 13:37Speaker 2: each block, usually combination of a nonce which is a
- 13:39Speaker 2: number used only once per.
- 13:41Speaker 1: Key, anance number use once got it.
- 13:43Speaker 2: And an incrementing counter value. You encrypt this unique counter
- 13:46Speaker 2: value and then xr the result with the plaintext block.
- 13:49Speaker 1: What's the advantage of CTR A big one is parallelization.
- 13:54Speaker 2: Since each block's encryption only depends on the counter, not
- 13:57Speaker 2: previous blocks, you can encrypt or decrypt multiple blocks simultaneously
- 14:02Speaker 2: speeds things up.
- 14:04Speaker 1: But that nonce is critical.
- 14:05Speaker 2: Absolute critical. You must never reuse the same nons counter
- 14:09Speaker 2: value with the same key. If you do, you completely
- 14:12Speaker 2: break the security for those blocks. It's like reusing a
- 14:14Speaker 2: one time pad key.
- 14:16Speaker 1: Okay, very important. We also saw something called format preserving
- 14:19Speaker 1: encryption FPV. What's that about?
- 14:21Speaker 2: FPE is a need idea. It encrypts data in such
- 14:24Speaker 2: a way that the ciphertext has the exact same format
- 14:27Speaker 2: as the original plaintext. So if you encrypt a sixteen
- 14:30Speaker 2: digit credit card number using FPE, the output will also
- 14:34Speaker 2: be a sixteen digit number. It won't be the original number,
- 14:36Speaker 2: or even a valid card number, but it'll look like one.
- 14:39Speaker 1: Why would you need that?
- 14:40Speaker 2: It's really useful in legacy systems or databases where changing
- 14:44Speaker 2: the data format is difficult or impossible. You can encrypt
- 14:48Speaker 2: sensitive data like credit card numbers or social security numbers,
- 14:51Speaker 2: but they still fit into the existing database fields or
- 14:54Speaker 2: application inputs.
- 14:55Speaker 1: How does it work? Generally?
- 14:56Speaker 2: Algorithms like f F one, f F two, f FI
- 15:00Speaker 2: three typically involve converting the plaintext to a number using
- 15:03Speaker 2: a pseudorandom function, often based on AES and sort of
- 15:06Speaker 2: feistle like structure and carefully using modular arithmetic to ensure
- 15:10Speaker 2: the output number stays within the required range and format.
- 15:13Speaker 1: Clever okay, Shifting gears now randomness crucial for keys ivs nonsays.
- 15:19Speaker 1: We have true random number generators trngs and pseudorandom number
- 15:22Speaker 1: generators pr g's big difference.
- 15:24Speaker 2: The fundamental difference is the source. Trngs tap into physical
- 15:27Speaker 2: processes that are inherently unpredictable. Think radioicive decay, thermal noise
- 15:31Speaker 2: in circuits, atmospheric noise, things that are truly random by nature.
- 15:36Speaker 1: Okay, real physical randomness and PRNGs pr.
- 15:39Speaker 2: And g's are algorithms. They're deterministic. You give them a
- 15:42Speaker 2: starting value called a seed, and they produce the sequence
- 15:46Speaker 2: of numbers that looks random but is actually completely determined
- 15:49Speaker 2: by the seed in the algorithm. If you know the seed,
- 15:51Speaker 2: you can predict the entire sequence.
- 15:53Speaker 1: So not truly random, but they aim for properties.
- 15:56Speaker 2: Like randomness exactly. Good PRNGs produce sequences that pass statistical
- 16:00Speaker 2: tests for randomness. They should have uniformity zeros and ones
- 16:04Speaker 2: roughly equal independence. Knowing part of the sequence doesn't help
- 16:07Speaker 2: predict the rest. Scalability generate long sequences.
- 16:11Speaker 1: And for crypto, the key is unpredictability.
- 16:13Speaker 2: Absolutely crucial. A cryptographically secure PRNG or csprng must be unpredictable.
- 16:20Speaker 2: Even if an attacker sees a large chunk of the output,
- 16:22Speaker 2: they shouldn't be able to figure out the next bit
- 16:24Speaker 2: or work backward to find the seed.
- 16:26Speaker 1: Okay, the sources mentioned. Linear congruental generators lcgs.
- 16:30Speaker 2: Lcgs are a common simple type of PRNG. They use
- 16:32Speaker 2: a formula like next number a precious number plus c
- 16:37Speaker 2: mod m relatively simple yes, with carefully chosen values for
- 16:41Speaker 2: AC and M, they can produce sequences with decent statistical
- 16:45Speaker 2: properties for some applications like simulations. A famous example uses
- 16:50Speaker 2: a one hundred and eight oh seven and m equals
- 16:53Speaker 2: to thirty one one.
- 16:54Speaker 1: But probably not good enough for crypto.
- 16:56Speaker 2: Generally, no standard lcgs are too predictable. Their internal state
- 17:00Speaker 2: is too simple. An attacker can often figure out the
- 17:03Speaker 2: parameters and the seed relatively easily.
- 17:05Speaker 1: So that's where cspr andngs come in. How are they built?
- 17:07Speaker 2: Csprngs are designed specifically to resist prediction. They often use
- 17:12Speaker 2: cryptographic primitives like block ciphers or hash functions as part
- 17:16Speaker 2: of their mechanism, like the CTRDRBG mentioned exactly. Ctrdrbgs is
- 17:20Speaker 2: a block cipher in countermode like ASCTR to generate the output.
- 17:24Speaker 2: They also have mechanisms to periodically recede themselves or update
- 17:28Speaker 2: their internal state based on new entropy, making them much
- 17:31Speaker 2: harder to predict or break.
- 17:32Speaker 1: And how does stream ciphers fit in with PRNGs.
- 17:35Speaker 2: You can think of a stream cipher as essentially a
- 17:37Speaker 2: CSPR and G combined with an xrr operation. The stream
- 17:40Speaker 2: cipher uses a short secret key to see to CSPR
- 17:43Speaker 2: and G. The CSPR and G then generates a long
- 17:47Speaker 2: sequence of pseudorandom bits that's the keystream. This keystream is
- 17:51Speaker 2: then xord with the plaintext bit by bit or byte
- 17:54Speaker 2: by byte to produce the cipher text.
- 17:57Speaker 1: Ah like a pseudorandom one time pad.
- 17:59Speaker 2: That's a great way to put it. The security hinges
- 18:01Speaker 2: entirely on the unpredictability of that keystream generated by the CSPRNG.
- 18:07Speaker 2: Our sources also briefly mentioned nonlinear feedback shift registers nfsrs
- 18:12Speaker 2: as another way to generate complex keystreams.
- 18:15Speaker 1: We talked about trng's maybe being slow, Is that still true?
- 18:18Speaker 2: Historically? Yes, generating true randomness from physical sources could be
- 18:22Speaker 2: slower than algorithmic PRNGs, but hardware trgs have improved a lot.
- 18:26Speaker 1: Like the Intel one mentioned.
- 18:28Speaker 2: Yeah, the Intel Digital Random Number Generator is built into
- 18:30Speaker 2: their processors. It uses onboard physical entropy sources to generate
- 18:34Speaker 2: high quality random numbers very quickly. This makes trngs much
- 18:38Speaker 2: more practical for things beyond just seating pr.
- 18:40Speaker 1: And G's all right. That covers symmetric crypto and randomness.
- 18:42Speaker 1: Now let's step into the other major paradigm, public key cryptography.
- 18:47Speaker 1: Totally different approach, you.
- 18:48Speaker 2: Said, completely different mindset. Yeah. Public key or asymmetric cryptography
- 18:53Speaker 2: uses two keys, a key.
- 18:54Speaker 1: Pair, two keys. How does that work.
- 18:57Speaker 2: There's a public key which you can share freely with anyone,
- 19:00Speaker 2: doesn't matter who sees it, and there's a corresponding private key,
- 19:03Speaker 2: which you must keep absolutely secret.
- 19:05Speaker 1: Okay, public and private What do they do?
- 19:09Speaker 2: The public key is typically used for encryption and the
- 19:11Speaker 2: private key is used for decryption, or, in the case
- 19:15Speaker 2: of digital signatures, the private key is used to sign
- 19:18Speaker 2: and the public key is used to verify the signature.
- 19:20Speaker 1: And this solves the key sharing problem of symmetric crypto.
- 19:24Speaker 2: Bingo. You don't need a pre shared secret. If someone
- 19:27Speaker 2: wants to send you an encrypted message, they just grab
- 19:29Speaker 2: your public key which is public, encrypt the message with it,
- 19:32Speaker 2: and send it over. Only you with your secret private
- 19:35Speaker 2: key can decrypt it.
- 19:37Speaker 1: That's clever. What are the main applications.
- 19:39Speaker 2: It's revolutionized digital security? Main uses are confidentiality as we
- 19:44Speaker 2: just described, secure key distribution helping parties agree on a
- 19:48Speaker 2: symmetric key, and crucially, authentication via digital signature is proving
- 19:52Speaker 2: who sent a message and that it wasn't tampered with.
- 19:55Speaker 1: RSA is the big name here, right. How does it work?
- 19:58Speaker 1: At a high level?
- 19:59Speaker 2: RSA is based on modular exponentiation. Using that public private
- 20:03Speaker 2: key pair. To encrypt a message M, you calculate c
- 20:07Speaker 2: me mod N. Here E and N together form the public.
- 20:11Speaker 1: Key okay message to the power of E modulo n
- 20:14Speaker 1: right to decrypt.
- 20:16Speaker 2: The person with the private key calculates M equal cd
- 20:19Speaker 2: mod N. Here D is the private key exponent relating.
- 20:23Speaker 1: To E and N, and the security comes from the.
- 20:25Speaker 2: Security relies on the difficulty of figuring out D if
- 20:28Speaker 2: you only know E and N, and that difficulty is
- 20:30Speaker 2: directly tied to the difficulty of factoring the large number
- 20:33Speaker 2: N into its original prime components H.
- 20:36Speaker 1: Factoring large numbers is hard. How are these keys N, E,
- 20:40Speaker 1: and D actually generated?
- 20:41Speaker 2: It starts by choosing two very large distinct prime numbers,
- 20:45Speaker 2: key and Q. These are kept secrets, okay, secret primes.
- 20:47Speaker 2: Then you calculate N nicols pq. This N is part
- 20:50Speaker 2: of the public key. Next you calculate something called Euler's
- 20:53Speaker 2: totient function of N, which for primes is f n
- 20:56Speaker 2: p one q one.
- 20:57Speaker 1: The totient function again yep.
- 20:59Speaker 2: Then you choose a public exponent such that E is
- 21:02Speaker 2: relatively prime to fn. They share no common factors other
- 21:06Speaker 2: than one often ease a small number like six, five, five, three, seven.
- 21:10Speaker 1: Okay, ees is chosen.
- 21:12Speaker 2: Then d D is the private exponent. It's calculated as
- 21:15Speaker 2: the modular multiplicative inverse of emodulo fn, meaning e D
- 21:19Speaker 2: mod fno one. Finding D efficiently typically uses the extended
- 21:25Speaker 2: Euclidean algorithm. Got it.
- 21:28Speaker 1: So knowing P and q makes finding D easy, but
- 21:30Speaker 1: without them it's hard because factoring N is hard.
- 21:33Speaker 2: Exactly. That's the core idea.
- 21:35Speaker 1: What are the ways attackers try to break RSA besides
- 21:38Speaker 1: just guessing keys?
- 21:39Speaker 2: Well? Brute forcing the key is infeasible if the key
- 21:42Speaker 2: is large enough. The main line of attack is mathematical.
- 21:44Speaker 2: Try to factor N. As computers get faster and factoring
- 21:47Speaker 2: algorithms improve RSA key sizes.
- 21:49Speaker 1: Need to increase any other attacks.
- 21:51Speaker 2: Yes, there are side channel attacks, like timing attacks, where
- 21:54Speaker 2: an attacker measures precisely how long decryption takes for different
- 21:57Speaker 2: cipher attexts. Variations in timing might leak information about the
- 22:00Speaker 2: private key. Defenses exist, but it's a concern.
- 22:03Speaker 1: This sounds like those trapdoor one way functions mentioned earlier.
- 22:07Speaker 1: What's the trap door here?
- 22:08Speaker 2: Precisely, a trapdoor one way function is easy to compute,
- 22:11Speaker 2: one way hard to reverse unless you have the secret
- 22:14Speaker 2: trapdoor information.
- 22:15Speaker 1: So in RSA encryption.
- 22:17Speaker 2: Mimod N is the easy forward direction. Reversing it finding
- 22:21Speaker 2: M from C without D is hard. The trap door
- 22:24Speaker 2: is the knowledge of the prime factors P and Q.
- 22:27Speaker 2: If you know P and Q, you can easily calculate
- 22:29Speaker 2: FN and then find D, opening the trap door and
- 22:32Speaker 2: making decryption easy.
- 22:33Speaker 1: Okay, Beyond RSA, what other public key systems are important?
- 22:37Speaker 2: Diffey Helman key exchange is fundamental. It's not for encryption itself,
- 22:41Speaker 2: but it lets two parties agree on a shared secret
- 22:44Speaker 2: key over an insecure channel without any prior secrets. Wow.
- 22:48Speaker 2: It uses modular exponentiation and the difficulty of the discrete
- 22:51Speaker 2: logarithm problem we talked about earlier. Each party mixes their
- 22:54Speaker 2: private number with a public base and modulus exchanges the results,
- 22:58Speaker 2: and then mixes the received value with their own private
- 23:00Speaker 2: number again. Magically, they both arrive at the same shared secret,
- 23:04Speaker 2: but an eavesdropper can't easily.
- 23:05Speaker 1: Compute it clever any others.
- 23:08Speaker 2: Elgamol is another system based on discrete logarithms, used for
- 23:12Speaker 2: both encryption and digital signatures. And then there's elliptic curve
- 23:15Speaker 2: cryptography ECC.
- 23:17Speaker 1: ECC is a big deal, now huge.
- 23:20Speaker 2: It provides security comparable to RSA, but with much smaller
- 23:24Speaker 2: key sizes.
- 23:24Speaker 1: Why is that good.
- 23:25Speaker 2: Smaller keys mean faster computations, less storage, less bandwidth needed.
- 23:29Speaker 2: That makes ECC ideal for resource constrained environments like mobile phones,
- 23:34Speaker 2: smart cards, IoT devices. It's based on the math of
- 23:37Speaker 2: elliptic curves over finite fields, which also leads to a
- 23:41Speaker 2: hard discrete logarithm like problem.
- 23:43Speaker 1: Okay, fascinating. Let's move to tryptographic hash functions. We touched
- 23:47Speaker 1: on them for signatures. What are their main properties?
- 23:49Speaker 2: Okay, hash functions they take an input of any size,
- 23:52Speaker 2: could be tiny, could be huge, and produce a fixed
- 23:54Speaker 2: size output. This output is the hash value or digest.
- 23:57Speaker 1: Fixed size output variable size input.
- 23:59Speaker 2: Got it properties? Easy to compute? The hash for any
- 24:02Speaker 2: input must be one way. Given just the hash, it's
- 24:05Speaker 2: infeasible to find the original input that's pre image resistance,
- 24:09Speaker 2: second pre image resistance. Given an input M one, it's
- 24:13Speaker 2: infeasible to find a different input M two that has
- 24:16Speaker 2: the same hash and collision resistance. It's infeasible to find
- 24:20Speaker 2: any two different inputs M one and M two that
- 24:23Speaker 2: hash to the same value.
- 24:24Speaker 1: Collision resistance sounds like the hardest property to achieve.
- 24:27Speaker 2: It generally is yeah, and good hash functions should also
- 24:30Speaker 2: make the output look random and spread inputs evenly across
- 24:33Speaker 2: the possible outputs.
- 24:34Speaker 1: So the goal isn't secrecy but integrity exactly.
- 24:38Speaker 2: The main purpose is data integrity. A hash acts like
- 24:41Speaker 2: a digital fingerprint, or check them for data. If you
- 24:44Speaker 2: change the data even slightly, the hash value will change completely,
- 24:48Speaker 2: hopefully so you can detect tampering.
- 24:50Speaker 1: How hard is it to brout force. A hash function
- 24:52Speaker 1: like finding a collision.
- 24:54Speaker 2: It depends on the output size of the hash. Let's
- 24:56Speaker 2: say embits.
- 24:56Speaker 1: Yeah.
- 24:56Speaker 2: Finding a pre image original input from hash takes roughly
- 24:59Speaker 2: two and uper on average, but finding a collision due
- 25:02Speaker 2: to the birthday paradox. The birthday paradox, yeah, the probability puzzle.
- 25:06Speaker 2: It means finding any two inputs that collide is much
- 25:09Speaker 2: easier than fighting an input. For a specific hash, it
- 25:12Speaker 2: only takes about two and two operations.
- 25:14Speaker 1: So for a two hundred and fifty six bit hash,
- 25:16Speaker 1: collisions take around two hundred and one hundred and twenty
- 25:19Speaker 1: eight steps.
- 25:20Speaker 2: Right, still astronomically large and infeasible for current computers, which
- 25:24Speaker 2: is why we use hashes like Saha two forty six.
- 25:27Speaker 1: Speaking of Saha, we saw SAHA five to twelve mention.
- 25:30Speaker 1: How does it work? Internally?
- 25:32Speaker 2: Roughly, Saha five twelve is part of the SAHA two family.
- 25:35Speaker 2: It's iterative. It processes the input message in big chunks
- 25:38Speaker 2: one hundred and twenty four bit blocks. It pads the
- 25:41Speaker 2: message so its length is right, and crucially, it includes
- 25:44Speaker 2: the original message link in the final processing steps. This
- 25:48Speaker 2: prevents certain attacks and in it uses the compression function.
- 25:51Speaker 2: This function takes the current message block and the result
- 25:53Speaker 2: from the previous blocks processing, mixes them up through a
- 25:56Speaker 2: series of complex operations eighty rounds for SAHA five to
- 25:59Speaker 2: twelve and produces a new intermediate hash value. This repeats
- 26:02Speaker 2: for all blocks.
- 26:03Speaker 1: Lots of mixing and churning.
- 26:04Speaker 2: Yeah, designed to ensure that every input bit affects many
- 26:07Speaker 2: output bits, making it hard to reverse or re find collisions.
- 26:10Speaker 1: And then there's SAHA three different design.
- 26:12Speaker 2: Very different. Saha three came out of a NIS competition
- 26:16Speaker 2: looking for a hash function with a fundamentally different structure
- 26:19Speaker 2: than SAHA one and SAHA two, just in case weaknesses
- 26:22Speaker 2: were found in that approach.
- 26:24Speaker 1: And it uses the sponge construction.
- 26:26Speaker 2: That's right. Think about like a sponge. It has an
- 26:28Speaker 2: internal state. In the absorbing phase, you feed the input
- 26:32Speaker 2: message blocks into the state, mixing them in. Then in
- 26:35Speaker 2: the squeezing phase, you squeeze out the hash output bits
- 26:38Speaker 2: from the state.
- 26:39Speaker 1: Interesting metaphor what does the mixing?
- 26:41Speaker 2: It uses a complex internal permutation function called kec apha.
- 26:45Speaker 2: This permutation involves several steps per round, things called theta row,
- 26:50Speaker 2: pie Chi and iota. She is the main nonlinear step
- 26:53Speaker 2: Pie rearranges bits, IOTA adds constants to break symmetry. It's
- 26:57Speaker 2: a very different way of scrambling the data compared to SAHA. Okay.
- 27:01Speaker 1: Now, Message authentication codes mcs. How do they relate to
- 27:04Speaker 1: hashes but add authentication?
- 27:06Speaker 2: Right? Both deal with integrity, but a MEMC as authentication
- 27:10Speaker 2: by involving a secret key.
- 27:12Speaker 1: A secret key a MA.
- 27:14Speaker 2: Is generated using a secret KEYK that's shared only between
- 27:17Speaker 2: the sender and receiver. The sender computes MAAC equals function
- 27:22Speaker 2: ok message. They send the message and the MAC and
- 27:26Speaker 2: the receiver. The receiver gets the message in the MAAC.
- 27:29Speaker 2: They know the secret KEYK, so they recompute the MAC
- 27:32Speaker 2: on the received message using K. If they're calculated, MA
- 27:35Speaker 2: matches the received MAC. They know two things, which are one,
- 27:39Speaker 2: the message hasn't been altered integrity. Two, the message must
- 27:43Speaker 2: have come from someone who knows the secret KEYK authentication.
- 27:46Speaker 1: So the key is the crucial difference from a plane
- 27:49Speaker 1: hash exactly.
- 27:50Speaker 2: An attacker without the key can't forge a valid MAC
- 27:53Speaker 2: for a modified message, nor can they pretend to be
- 27:55Speaker 2: the sender.
- 27:56Speaker 1: We saw HMAC and CMA mention specific type.
- 27:59Speaker 2: Yes, HMAC stands for hash base MAS it's a very
- 28:03Speaker 2: popular standard that uses a regular cryptographic hash function like
- 28:06Speaker 2: SAHA two five six combined with the secret key in
- 28:09Speaker 2: a specific double hashing construction. Its security has proven relative
- 28:12Speaker 2: to the underlying hash function. Okay and c CMAC is
- 28:16Speaker 2: cipher based MC. It uses a block cipher like AES
- 28:19Speaker 2: instead of hash function. It processes the message in blocks
- 28:23Speaker 2: using the secret key with special handling for the last block.
- 28:26Speaker 1: And authenticated encryption AE combining things.
- 28:29Speaker 2: Yeah AE or AED Authenticated encryption with associated data aims
- 28:34Speaker 2: to provide both confidentiality encryption and integrity authentication simultaneously in
- 28:40Speaker 2: one integrated.
- 28:40Speaker 1: Algorithm, more efficient, more secure.
- 28:42Speaker 2: Often both. Doing them together can avoid subtle errors that
- 28:45Speaker 2: might arise from combining separate encryption and am mag algorithms incorrectly.
- 28:50Speaker 2: GCM Gellois counter mode is a very widely used AAD
- 28:54Speaker 2: mode based.
- 28:55Speaker 1: On AES okay now digital signatures building on hashes and
- 28:59Speaker 1: public keys.
- 29:00Speaker 2: Digital signatures give us integrity and authentication like MC's, but
- 29:03Speaker 2: they use public key crypto. This adds a crucial.
- 29:06Speaker 1: Third property, non repudiation.
- 29:07Speaker 2: Non repudiation meaning.
- 29:09Speaker 1: Meaning the sender cannot later deny having sent the message
- 29:12Speaker 1: because creating the signature requires their unique private key, which
- 29:15Speaker 1: only they should possess.
- 29:16Speaker 2: How does it work. Defender takes the message, hashes it
- 29:19Speaker 2: to get a short digest, then they sign this hash
- 29:23Speaker 2: by encrypting it with their private key. This encrypted hash
- 29:28Speaker 2: is the digital signature attached to the message and verification.
- 29:31Speaker 2: Anyone can verify it using the sender's public key. The
- 29:34Speaker 2: receiver decrypts the signature using the sender's public key. This
- 29:38Speaker 2: recovers the original hash as computed by the sender. They
- 29:41Speaker 2: also independently compute the hash of the message they received.
- 29:45Speaker 2: If the two hashes match.
- 29:47Speaker 1: Then it's verified exactly.
- 29:48Speaker 2: It proves the message hasn't been altered since signing integrity,
- 29:52Speaker 2: and it proves it was signed by the owner of
- 29:53Speaker 2: that private key. Authentication and non repudiation.
- 29:56Speaker 1: So private key signs public key verifies opposite of public
- 29:59Speaker 1: key and encryption correct.
- 30:00Speaker 2: We saw dsa digital signature algorithm mentioned based on discrete
- 30:04Speaker 2: logs and RSAPSS. A more modern probabilistic scheme for RSA
- 30:09Speaker 2: signatures that adds randomness for better security uses something called
- 30:12Speaker 2: a mass generation function MGF. Yeah, hash based signatures like
- 30:17Speaker 2: lamport signatures exist too, though less common for general use.
- 30:20Speaker 2: They have different properties like being potentially resistant to quantum computers.
- 30:24Speaker 1: Okay, all this crypto realizes on keys. Key management and
- 30:27Speaker 1: distribution sounds like a major headache, especially for symmetric keys.
- 30:32Speaker 2: It's a huge challenge. How do you securely get that
- 30:34Speaker 2: shared secret key to everyone who needs it without it
- 30:37Speaker 2: being intercepted? Physical delivery trusted couriers doesn't scale well if
- 30:42Speaker 2: you have a large group managing individual keys between every
- 30:46Speaker 2: pair becomes unmanageable and non two keys. Yeah. This leads
- 30:50Speaker 2: to ideas like key.
- 30:50Speaker 1: Hierarchies, key hierarchies.
- 30:52Speaker 2: Yeah, you might have a masterp that's protected very carefully.
- 30:55Speaker 2: This master key is used only to encrypt other keys,
- 30:58Speaker 2: maybe session keys or key encryption keys kyks, which are
- 31:02Speaker 2: then used for actual data encryption. Limits the exposure of
- 31:05Speaker 2: the most critical key.
- 31:06Speaker 1: How does public key crypto help distribute symmetric keys.
- 31:10Speaker 2: It provides a great solution. If Alice wants to communicate
- 31:13Speaker 2: securely with Bob using fast symmetric encryption, she can generate
- 31:18Speaker 2: a temporary symmetric session key, Then she encrypts that session
- 31:22Speaker 2: key using Bob's public key.
- 31:24Speaker 1: Ah.
- 31:25Speaker 2: She sends this encrypted session key to Bob only Bob
- 31:29Speaker 2: with his private key, can decrypt it. Now, Alice and
- 31:32Speaker 2: Bob share a symmetric langing key they can use for
- 31:35Speaker 2: their conversation.
- 31:36Speaker 1: But you need to trust the public key absolutely.
- 31:38Speaker 2: If Mallory can trick Alice into using Mallory's public key
- 31:41Speaker 2: instead of Bob's a man in the middle attack, then
- 31:44Speaker 2: Mallory can decrypt the session key. So authenticating the public key.
- 31:48Speaker 1: Is vital, which brings us to distributing public keys. How's
- 31:52Speaker 1: that done? Safely?
- 31:53Speaker 2: Several ways? Simplest is just public announcement here's my key,
- 31:56Speaker 2: but very vulnerable to forgery. You could use a trusted
- 32:00Speaker 2: third party like a key distribution center KDC, but everyone
- 32:04Speaker 2: has to trust the KDC. The most common approach now
- 32:06Speaker 2: is public key.
- 32:07Speaker 1: Certificates like digital ID cards.
- 32:09Speaker 2: Essentially, yes, a certificate binds a public key to an
- 32:12Speaker 2: identity like a person or a website. It contains the
- 32:15Speaker 2: public key, information about the owner, validity period, et cetera,
- 32:20Speaker 2: and it's all digitally signed by a trusted certification authority
- 32:24Speaker 2: or CAA.
- 32:24Speaker 1: So you trust the CAA, therefore you trust the key
- 32:27Speaker 1: in the certificate.
- 32:28Speaker 2: That's the idea we saw X point five zero nine
- 32:31Speaker 2: mentioned that's the standard format for these certificates. They list
- 32:34Speaker 2: key elements like version, serial number, issuer, subject, public key info,
- 32:39Speaker 2: validy period, and the CAA signature.
- 32:42Speaker 1: And this whole system of CAAs and certificates is the
- 32:45Speaker 1: public key Infrastructure PKI.
- 32:47Speaker 2: Exactly. PKI is a whole ecosystem, the CAAs policies, procedures
- 32:51Speaker 2: software for managing these digital certificates throughout their life cycle, creation, distribution, revocation,
- 32:56Speaker 2: et cetera. It's how we establish trust in public keys online.
- 32:59Speaker 2: Sometimes you see certificate chains where one CAA certifies another
- 33:02Speaker 2: leading back to a trusted root CAA okay.
- 33:04Speaker 1: Establishing secure sessions often need specific protocols, like for key exchange.
- 33:08Speaker 1: What's important there?
- 33:09Speaker 2: The main goal is for two parties to securely agree
- 33:12Speaker 2: on a temporary secret key, a session key for symmetric encryption.
- 33:17Speaker 2: We already saw how basic public key encryption of a
- 33:20Speaker 2: session key can be vulnerable to man in the middle
- 33:22Speaker 2: attacks if the public key isn't authenticated.
- 33:25Speaker 1: So protocols need to prevent that.
- 33:27Speaker 2: Yes, good key establishment protocols often involve challenges nonss. Those
- 33:32Speaker 2: numbers use only once to prevent replay attacks, and ways
- 33:36Speaker 2: to authenticate the parties involved, perhaps using long term keys
- 33:39Speaker 2: or certificates, or involving trusted third parties. They need to
- 33:43Speaker 2: be carefully designed to resist various clever attacks.
- 33:46Speaker 1: Okay, let's shift to user authentication verifying identities online.
- 33:51Speaker 2: Basic principles, authentication is confirming someone is who they claim
- 33:54Speaker 2: to be. Usually two steps. Identification user says who they
- 33:58Speaker 2: are look a username, and verification user proves it like
- 34:01Speaker 2: with a password, fingerprint, or a key. Digital authentication uses
- 34:04Speaker 2: digital means for that verification step.
- 34:06Speaker 1: How can symmetric encryption be used for remote authentication?
- 34:09Speaker 2: Often through challenge response protocols. The server sends a random
- 34:13Speaker 2: challenge like a random number to the client. The client
- 34:17Speaker 2: encrypts that challenge using a secret key they share only
- 34:20Speaker 2: with the server. Huh. The client sends the encrypted response back.
- 34:24Speaker 2: The server, knowing the shared key, decrypts the response if
- 34:29Speaker 2: it matches the original challenge. The server knows the client
- 34:32Speaker 2: possesses the secret key, thus authenticating them without sending the
- 34:36Speaker 2: key itself over the network.
- 34:38Speaker 1: And asymmetric encryption for authentication.
- 34:41Speaker 2: Usually involves digital signatures and certificates. A client might sign
- 34:44Speaker 2: a challenge from the server using their private key. The
- 34:47Speaker 2: server verifies the signature using the client's public key obtained
- 34:50Speaker 2: from their certificate. This can be one way server authenticates
- 34:54Speaker 2: client or mutual they both authenticate each other.
- 34:56Speaker 1: Kerberos was mentioned widely used, especially in corporate networks.
- 35:01Speaker 2: Very widely used. Cordero's uses a trusted third party, the
- 35:04Speaker 2: Key Distribution Center KDC, and symmetric key crypto. It avoids
- 35:09Speaker 2: sending passwords across the network in plaintext.
- 35:12Speaker 1: How does it work?
- 35:13Speaker 2: Roughly, a user logs in authenticates once to the KDC.
- 35:17Speaker 2: The KDC gives them a special encrypted ticket called a
- 35:20Speaker 2: Ticket Granting Ticket PGT. When the user wants to access
- 35:24Speaker 2: a network service like a file server, they present the
- 35:27Speaker 2: TGT to the kdc's Ticket Granting Service PGS and request
- 35:32Speaker 2: a service ticket for that specific service. The TGS gives
- 35:36Speaker 2: them an encrypted service ticket. The user presents this ticket
- 35:39Speaker 2: to the actual service, proving they've been authenticated by the KDC.
- 35:43Speaker 2: Versions four and five to find the details. It also
- 35:45Speaker 2: supports inter realm authentication connecting different Carbero's domains.
- 35:49Speaker 1: What about federated identity management sounds useful?
- 35:53Speaker 2: It is. It lets users use one set of credentials,
- 35:55Speaker 2: like one log in to access services across multiple different
- 35:58Speaker 2: organizations or domain that trust each.
- 36:00Speaker 1: Other single sign on across different websites.
- 36:02Speaker 2: Essentially, yes, yes, you authenticate once with your home identity
- 36:05Speaker 2: provider and then other service providers in the federation trust
- 36:08Speaker 2: that authentication saves users from managing dozens of passwords and
- 36:12Speaker 2: improve security if done right.
- 36:13Speaker 1: Okay, let's move down the stack to transport level security
- 36:17Speaker 1: TLS SSSL SSH. What security do they provide?
- 36:22Speaker 2: TLS Transport layer security, the successor to SSL, is a
- 36:26Speaker 2: foundation for HTTPS. It provides secure communication between two applications
- 36:30Speaker 2: over a network, usually TCP key goals confidentiality, encryption, integrity,
- 36:37Speaker 2: detecting tampering, and often authentication verifying server identity sometimes client identity.
- 36:43Speaker 2: SSH SSH secure show is mainly for secure remote log
- 36:47Speaker 2: in and command execution, plus secure file transfers SFTP and tunneling
- 36:52Speaker 2: similar goals confidentiality, integrity, and server authentication.
- 36:56Speaker 1: What's the basic architecture of TLS.
- 36:58Speaker 2: It's layered at the bottom is the TLS Record protocol.
- 37:01Speaker 2: It handles fragmentation, optional compression, encryption, and adds a may
- 37:05Speaker 2: see for integrity to the application data.
- 37:07Speaker 1: Okay, I above that.
- 37:08Speaker 2: Above that set several protocols. The most important is the
- 37:10Speaker 2: TLS handshake protocol. This is where the client and server
- 37:13Speaker 2: negotiates security parameters, exchange certificates, and establish the shared secret
- 37:18Speaker 2: keys for this session. There's also a change cipherspect protocol
- 37:20Speaker 2: to signal when the negotiated parameters become active, and an
- 37:23Speaker 2: alert protocol for.
- 37:24Speaker 1: Errors That handshake sounds critical. What are the main steps?
- 37:28Speaker 2: It's a back and forth conversation. Starts with a client Hello,
- 37:32Speaker 2: TLS version, supported random number, list of cipher suites.
- 37:35Speaker 1: The client likes cipher suites like combinations of algorithms.
- 37:39Speaker 2: Exactly encryption algorithm, key exchange method MAC algorithm. The server
- 37:44Speaker 2: responds with the server Hello, chosen version, chosen cipher suite,
- 37:49Speaker 2: its own random number, and crucially, its digital certificate.
- 37:52Speaker 1: Usually so the client can verify the server's identity right right.
- 37:56Speaker 2: The server might also requests the client certificate if client
- 37:59Speaker 2: authentication is it then comes the key exchange phase using RSA, Diffie,
- 38:03Speaker 2: Hellman or newer methods based on the chosen cyphersuite, where
- 38:06Speaker 2: they securely agree on a shared pre master secret okay.
- 38:09Speaker 2: This pre master secret is used to derive the actual
- 38:12Speaker 2: symmetric encryption keys and MBank keys for the session. Finally,
- 38:15Speaker 2: both send encrypted finished messages to confirm the handshake work,
- 38:19Speaker 2: and they derive the same keys.
- 38:20Speaker 1: Complex stance and SSH. How does it set up its
- 38:23Speaker 1: secure channel?
- 38:24Speaker 2: SSH also has layers. A transport layer protocol handles server authentication,
- 38:28Speaker 2: usually via host keys. The client checks, negotiates encryption integrity algorithms,
- 38:33Speaker 2: and performs the key exchange, often Diffie Hellman. Once the
- 38:37Speaker 2: secure channel is up, a user authentication protocol verifies the
- 38:40Speaker 2: client user password, public key, etc. Then the connection protocol
- 38:44Speaker 2: multiplexes different logical channels shale session file transfer over that
- 38:48Speaker 2: encrypted tunnel.
- 38:49Speaker 1: Let's switch to wireless network security Wi Fi? What makes
- 38:52Speaker 1: it inherently risky?
- 38:53Speaker 2: Broadcasting over the air radio waves go everywhere, easily intercepted
- 38:57Speaker 2: by anyone nearby, so main risks eavesdropping, message alteration or injection,
- 39:02Speaker 2: and denial of service. The client, the access point, the
- 39:05Speaker 2: airwaves all potential points of attack.
- 39:07Speaker 1: So how do we protect Wi Fi? WPA two WPA
- 39:10Speaker 1: three right.
- 39:11Speaker 2: The IE eighth two point one one I standard defines
- 39:14Speaker 2: modern Wi Fi security, implemented as WPA two and the
- 39:17Speaker 2: newer stronger WPA three. They provide key capabilities, strong authentication,
- 39:22Speaker 2: making sure only authorized devices join confidentiality using robust encryption
- 39:26Speaker 2: like AES and integrity preventing data tampering.
- 39:29Speaker 1: How does authentication work?
- 39:30Speaker 2: Often uses ie A two point one X and EAP
- 39:34Speaker 2: Extensible Authentication Protocol. This allows different authentication methods, often involving
- 39:39Speaker 2: a central authentication server, especially in enterprise networks. For home networks,
- 39:43Speaker 2: WPA two WPA three personal uses a pre shared key,
- 39:47Speaker 2: the Wi Fi password. WPA three improves on WPA two
- 39:50Speaker 2: with stronger key exchange and protection against offline dictionary attacks.
- 39:54Speaker 1: What about simpler things like hiding your network name SSID?
- 39:57Speaker 1: Does that help?
- 39:58Speaker 2: It adds a tiny bit of obscurity, maybe deters casual snooping,
- 40:02Speaker 2: but it's not real. Security tools can easily discover hidden SSIDs,
- 40:06Speaker 2: same with changing the default SSID name or maybe reducing
- 40:09Speaker 2: transmitter power. They're minor hurdles, not replacements for strong WPA
- 40:13Speaker 2: two WP three encryption with a strong unique password.
- 40:16Speaker 1: Mobile device security, phones, tablets unique challenges there.
- 40:20Speaker 2: Definitely, they're portable, easily lost or stolen. They connect to
- 40:23Speaker 2: untrusted networks frequently. They often mix perfonal and work data
- 40:26Speaker 2: key threats unauthorized data access, communication interception malware using a
- 40:31Speaker 2: compromise device to attack corporate networks. Security policies need to
- 40:34Speaker 2: assume devices can be compromised and address both company owned
- 40:37Speaker 2: and personal biod devices.
- 40:39Speaker 1: Okay. Electronic mail security SMAAM, SPF, d KIM making email safer.
- 40:46Speaker 2: Yeah. Email was originally designed without much security. Sm provides
- 40:49Speaker 2: end to end security for the email content. It uses
- 40:52Speaker 2: public key crypto for confidentiality, encryption using enveloped data format
- 40:57Speaker 2: and integrity authentication Digital signatures using signed data format needs certificates.
- 41:03Speaker 1: What about preventing email spoofing fake sender addresses?
- 41:06Speaker 2: That's where SPF and d KIM come. In SBFS sender
- 41:09Speaker 2: Policy framework, let's domain owners publish a list of servers
- 41:11Speaker 2: authorized to send email for their domain. Receiving source can
- 41:14Speaker 2: check this list okay and DKEM DKIM doing keys. Identified
- 41:17Speaker 2: mail adds a digital signature to outgoing emails tied to
- 41:21Speaker 2: the sending domain. Receiving servers can verify the signature using
- 41:24Speaker 2: a public key published in the domain's DNS records helps
- 41:27Speaker 2: confirm the email originated from that domain and wasn't altered.
- 41:30Speaker 1: And DN using DNSAC.
- 41:32Speaker 2: DAN DNS based authentication of named entities leverages the security
- 41:37Speaker 2: of dnssec secure DNS to help validate certificates. It allows
- 41:41Speaker 2: domain owners to publish information in DNS about the expected
- 41:45Speaker 2: certificates for their services, like TLS for mail servers or
- 41:48Speaker 2: seranim certificates. This can help detect man in the middle
- 41:52Speaker 2: attacks trying to present fake certificates just quickly.
- 41:54Speaker 1: The basic email architecture MUA's MTS.
- 41:57Speaker 2: MUA's mail user agents are your email clip Alliance Outlook webmail.
- 42:01Speaker 2: MTA's message transfer agents are the mail servers that relay
- 42:04Speaker 2: messages using SMTP Simple Mail Transfer Protocol. Users retrieve mail
- 42:08Speaker 2: from servers using protocols like IMP or POP. DNS is
- 42:12Speaker 2: used to find the right MTAs for a domain.
- 42:14Speaker 1: Okay, let's dive into IP security ip SC securing things
- 42:18Speaker 1: at the network layer.
- 42:19Speaker 2: Yes, IPsec operates at layer three. It provides a framework
- 42:22Speaker 2: for secure IP communication, confidentiality, integrity authentication between hosts or
- 42:26Speaker 2: between network gateways.
- 42:27Speaker 1: Like VPNs, use a Security Associations says fundamental concept.
- 42:32Speaker 2: NSA is a one way logical connection defining the security
- 42:36Speaker 2: services protocols, algorithms keys between two communicating entities. For two
- 42:41Speaker 2: way traffic, you usually need two essays, one in each direction.
- 42:46Speaker 2: Each SSAY has a unique identifier called the Security Parameter's
- 42:49Speaker 2: Index SPI, and.
- 42:51Speaker 1: The main ip SC protocols are AH and EESP.
- 42:54Speaker 2: Correct AH authentication header provides integrity and authentication for the
- 42:59Speaker 2: entire IP pack including parts of the header, but no encryption.
- 43:03Speaker 2: It protects against campering and spoofing. ESP encapsulating security payload
- 43:07Speaker 2: provides confidentiality by encrypting the IP payload. It can also
- 43:11Speaker 2: optionally provide integrity and authentication for the payload, but generally
- 43:14Speaker 2: not the outer ipheader. You can use ESP just for encryption,
- 43:18Speaker 2: or for both encryption and integrity authentication.
- 43:20Speaker 1: Transport mode versus tunnel.
- 43:22Speaker 2: Mode transport mode secure traffic directly between two end hosts.
- 43:25Speaker 2: The IPsec header is inserted between the original ipheader and
- 43:28Speaker 2: the payload, good for host to host. Security tunnel mode
- 43:31Speaker 2: encapsulates the entire original IP packet inside a new IP
- 43:35Speaker 2: packet with IP six protection. The original packet becomes the
- 43:39Speaker 2: payload of the new outer packet. This is used typically
- 43:41Speaker 2: between gateways like firewalls or routers to create a secure
- 43:45Speaker 2: VPN tunnel across an untrusted network like the Internet. Traffic
- 43:48Speaker 2: between networks protected by the gateways goes through the tunnel.
- 43:51Speaker 2: You can also combine essays like using both AH and
- 43:54Speaker 2: ESP in what's called an SA bundle.
- 43:56Speaker 1: And setting up these s is done by IKE. Internet
- 43:59Speaker 1: Key Exchange.
- 44:00Speaker 2: Yes. IKE versions one and two is the protocol used
- 44:03Speaker 2: to negotiate the IPS essays. It handles authentication of the peers,
- 44:07Speaker 2: negotiation of cryptographic algorithms, and generation and exchange of the
- 44:11Speaker 2: secret keys used by AH and ESP. It's quite complex,
- 44:14Speaker 2: involving multiple phases and message exchanges.
- 44:16Speaker 1: Okay, Moving up network Perimeter security firewalls, intrusion detection systems IDs.
- 44:23Speaker 1: What's the firewall's main job?
- 44:24Speaker 2: A firewall is like a gatekeeper for your network. It
- 44:27Speaker 2: sits at the perimeter and inspects incoming and outgoing traffic,
- 44:30Speaker 2: blocking anything that doesn't meet the configured security rules. Controls
- 44:33Speaker 2: access different types.
- 44:34Speaker 1: Packet filtering Yes.
- 44:36Speaker 2: Basic packet filters look at packet headers source to destination
- 44:39Speaker 2: IP ports and make simple allowed made decisions based on rules.
- 44:44Speaker 2: Stateful firewalls are smarter. They track the state of connections
- 44:47Speaker 2: so they can allow return traffic for connections initiated from inside.
- 44:51Speaker 2: For example, application level gateways proxies understand specific application protocols
- 44:57Speaker 2: like HTTP, FTP and can force much more granular policies.
- 45:01Speaker 1: We saw an example rule and its weakness.
- 45:03Speaker 2: Yeah, simple packet filters might just allow traffic to say
- 45:06Speaker 2: port eighty standard web without really knowing if it's legitimate
- 45:09Speaker 2: Web traffic. Stateful and application gateways provide better security. Often
- 45:14Speaker 2: networks use a DMZ demilitarized zone a DMZ a separate
- 45:18Speaker 2: network segment between the internal network and the Internet. You
- 45:20Speaker 2: put public facing servers web email in the DMZ. They're
- 45:24Speaker 2: accessible from the Internet, but traffic from the DMZ to
- 45:26Speaker 2: the internal network is heavily restricted by another firewall layer
- 45:30Speaker 2: protects the internal network. If a DMZ server gets compromised.
- 45:33Speaker 1: How do IDs fit in with firewalls?
- 45:35Speaker 2: Firewalls prevent IDs is detect an IDs monitors network traffic
- 45:40Speaker 2: or host activity, looking for signs of malicious behavior or
- 45:43Speaker 2: policy violations that might have gotten past the firewall or
- 45:47Speaker 2: originated internally.
- 45:48Speaker 1: How did they detect things?
- 45:49Speaker 2: Signatures that's a common method. Signature based detection looks for
- 45:53Speaker 2: known patterns, specific byte sequences and packets, screen signatures, connections
- 45:57Speaker 2: to known malicious ports, ports signatures, weird header combinations, header
- 46:01Speaker 2: conditioned signatures that match known attacks.
- 46:04Speaker 1: Network based versus host based.
- 46:06Speaker 2: NIDS network IDs watches traffic on a network segment. HIDS
- 46:11Speaker 2: host IDs runs on individual computers, monitoring system calls, logs,
- 46:15Speaker 2: file changes. IDs can also use anomaly detection, looking for
- 46:19Speaker 2: deviations from normal behavior, though that can have more false positives.
- 46:23Speaker 2: They might try to detect things like d DOS attacks
- 46:25Speaker 2: by looking for unusual traffic volumes.
- 46:27Speaker 1: Cloud computing security new challenges.
- 46:29Speaker 2: There definitely different models public private, hybrid and services sauce
- 46:34Speaker 2: pause IAS means shared responsibility and less direct control for
- 46:38Speaker 2: the customer. Key concerns, data breaches, often due to misconfiguration
- 46:42Speaker 2: by the customer. Weak identity and access management insecure APIs
- 46:47Speaker 2: system vulnerabilities in the cloud platform itself, DOS attacks, malicious
- 46:52Speaker 2: insiders at the provider. Trusting your provider and understanding their
- 46:55Speaker 2: security practices is crucial.
- 46:57Speaker 1: Cloud security as a service is also a thing.
- 46:59Speaker 2: Yeah, outsourceing security functions like identity management, SIME, security, information
- 47:03Speaker 2: at event management, et cetera to specialized cloud security providers.
- 47:06Speaker 1: And finally IoT security. Lots of small connected devices problems
- 47:11Speaker 1: big problems.
- 47:12Speaker 2: Devices are often resource constrained. Low power memory CPU makes
- 47:17Speaker 2: running traditional security difficult. Huge diversity devices long life cycles
- 47:21Speaker 2: often in frequent updates, and many IoT devices interact with
- 47:25Speaker 2: the physical world, so security failures can have physical consequences.
- 47:28Speaker 1: So what are the goals and how to achieve them?
- 47:31Speaker 2: Goals are protecting the device itself, protecting the data, maintaining functionality.
- 47:36Speaker 2: Lightweight cryptography is key crypto algorithms designed specifically for these
- 47:41Speaker 2: constrained environments, like sci fash for ms mentioned in the sources.
- 47:46Speaker 2: Secure communication needs to handle things like broadcast traffic and
- 47:49Speaker 2: replay attacks efficiently. Protocols like MINISECU and minisec B were mentioned,
- 47:54Speaker 2: using techniques like time based nonzs or bloom filters for
- 47:57Speaker 2: lightweight security.
- 47:58Speaker 1: One last thing the appendix mentioned perfect secrecy.
- 48:01Speaker 2: What's that Perfect secrecy is a theoretical ideal. It means
- 48:05Speaker 2: that ciphertext reveals absolutely zero information about the plaintext. Knowing
- 48:10Speaker 2: the cyphertext doesn't change the probabilities of what the plaintext
- 48:13Speaker 2: might have been.
- 48:14Speaker 1: Achievable only by.
- 48:15Speaker 2: The one time pad, which, as we said, is impractical.
- 48:18Speaker 2: It requires a truly random key as long as a
- 48:20Speaker 2: message used only once. Most crypto aims for computational security,
- 48:24Speaker 2: not perfect secrecy. Information theory gives formal ways to measure
- 48:27Speaker 2: information and secrecy. Other metrics like forward unpredictability are important
- 48:32Speaker 2: for things like prng's knowing past output doesn't help predict
- 48:35Speaker 2: future output.
- 48:36Speaker 1: Wow, we have definitely covered a massive amount of ground today. Cryptography,
- 48:41Speaker 1: network security. It's a huge field.
- 48:44Speaker 2: It really is, and constantly changing too. It's what keeps
- 48:48Speaker 2: our digital interactions well somewhat trustworthy.
- 48:50Speaker 1: Yeah, and what strikes me is how these seemingly abstract
- 48:54Speaker 1: mathematical ideas like factoring being hard or discrete logarithms directly
- 49:00Speaker 1: translate into protecting everyday things like online banking or secure messaging.
- 49:05Speaker 2: Absolutely or even things like that format preserving encryption, the
- 49:09Speaker 2: cleverness needed to make encrypted data still fit old systems.
- 49:12Speaker 2: It's quite a genius.
- 49:13Speaker 1: Definitely. Hopefully this deep dive has maybe sparked some more
- 49:17Speaker 1: questions for you listening, like how are quantum computers going
- 49:20Speaker 1: to affect all this?
- 49:21Speaker 2: That's a big one, a huge one. Research into post
- 49:24Speaker 2: quantum cryptography is incredibly active right now, trying to find
- 49:27Speaker 2: algorithms resistant to quantum.
- 49:29Speaker 1: Attacks, or maybe you're thinking more practically, how can you
- 49:32Speaker 1: or your organization actually implement these things better?
- 49:35Speaker 2: Right if you want to go deeper exploring the standards,
- 49:38Speaker 2: we mentioned from nist iee IETF is a great start.
- 49:42Speaker 2: Or pick one algorithm like AES or RSSA, or one
- 49:46Speaker 2: protocol like TLS or ip sec and really dig into
- 49:49Speaker 2: how it works.
- 49:50Speaker 1: Yeah, lots to explore.
- 49:51Speaker 2: Well, thank you for joining us on this deep dive.
- 49:53Speaker 2: We really hope it's given you a solid foundation and
- 49:55Speaker 2: maybe a new appreciation for the intricate and vital world
- 49:59Speaker 2: of security that holds our digital society together.