WEBVTT

1
00:00:00.120 --> 00:00:04.040
<v Speaker 1>Welcome to the deep Dive. Today, we're jumping straight into

2
00:00:05.240 --> 00:00:09.480
<v Speaker 1>the really crucial world of cryptography and network security. That's right,

3
00:00:09.880 --> 00:00:11.839
<v Speaker 1>We've got a whole bunch of information here, and our

4
00:00:11.880 --> 00:00:14.800
<v Speaker 1>goal is really to give you the essential understanding, you know,

5
00:00:14.919 --> 00:00:18.039
<v Speaker 1>how our digital lives are protected without getting bogged down

6
00:00:18.079 --> 00:00:22.440
<v Speaker 1>in complexity. We'll explore everything from the basic mac behind

7
00:00:22.519 --> 00:00:27.679
<v Speaker 1>encryption to the measure securing modern networks and well the cloud.

8
00:00:27.800 --> 00:00:29.359
<v Speaker 2>Yeah, and to really get under the hood, we've been

9
00:00:29.359 --> 00:00:33.479
<v Speaker 2>looking at a pretty comprehensive textbook. It's actually aligned with

10
00:00:33.520 --> 00:00:36.359
<v Speaker 2>the ACMIE Computer Science standards.

11
00:00:36.479 --> 00:00:37.359
<v Speaker 1>Oh interesting, and.

12
00:00:37.320 --> 00:00:41.280
<v Speaker 2>It really highlights how fundamental information security is today. So

13
00:00:41.320 --> 00:00:44.159
<v Speaker 2>we're trying to pull out those key concepts relevant whether

14
00:00:44.159 --> 00:00:47.119
<v Speaker 2>you're say a tech professional or just curious about how

15
00:00:47.159 --> 00:00:48.439
<v Speaker 2>this all works exactly.

16
00:00:48.520 --> 00:00:50.600
<v Speaker 1>So if you've ever wondered about the you know, the

17
00:00:50.600 --> 00:00:53.359
<v Speaker 1>secret math keeping your data private online or the different

18
00:00:53.359 --> 00:00:56.000
<v Speaker 1>ways your information is shielded, then yeah, this deep dive

19
00:00:56.079 --> 00:00:56.520
<v Speaker 1>is for you.

20
00:00:57.000 --> 00:00:59.640
<v Speaker 2>We want to make these complex topics clear, maybe even

21
00:01:00.320 --> 00:01:02.320
<v Speaker 2>share a few surprising facts so you walk away with

22
00:01:02.359 --> 00:01:04.040
<v Speaker 2>some real aha moments.

23
00:01:04.159 --> 00:01:04.640
<v Speaker 1>Hopefully.

24
00:01:04.920 --> 00:01:08.959
<v Speaker 2>Okay, let's dive in right at the beginning. Number theory Okay,

25
00:01:09.439 --> 00:01:10.120
<v Speaker 2>So at.

26
00:01:10.000 --> 00:01:13.359
<v Speaker 1>The heart of well, a lot of modern cryptography is

27
00:01:13.439 --> 00:01:16.400
<v Speaker 1>number theory. We can kick things off with divisibility and

28
00:01:16.439 --> 00:01:19.719
<v Speaker 1>the Euclidean algorithm. Right, This gives us a really efficient

29
00:01:19.760 --> 00:01:22.799
<v Speaker 1>way to find the greatest common divisor of two numbers.

30
00:01:22.959 --> 00:01:26.879
<v Speaker 2>Okay, finding the GCD seems mathematical, but how does it apply.

31
00:01:27.359 --> 00:01:30.680
<v Speaker 1>Well, it might sound purely academic, but it's actually surprisingly

32
00:01:30.719 --> 00:01:36.719
<v Speaker 1>important in various crypto techniques. Think key generation and calculations

33
00:01:36.719 --> 00:01:37.920
<v Speaker 1>in modular arithmetic.

34
00:01:38.200 --> 00:01:42.599
<v Speaker 2>Ah. Right, And speaking of modular arithmetic, that's all about remainders,

35
00:01:42.640 --> 00:01:43.480
<v Speaker 2>isn't it exactly?

36
00:01:43.560 --> 00:01:45.680
<v Speaker 1>It's where you focus on the remainder after division. Like

37
00:01:45.719 --> 00:01:48.120
<v Speaker 1>a clock, you know, after twelve you wrap around back

38
00:01:48.159 --> 00:01:51.079
<v Speaker 1>to one. Okay, numbers wrap around after hitting a certain

39
00:01:51.159 --> 00:01:53.640
<v Speaker 1>value the modulus. So like if you calculate eleven to

40
00:01:53.640 --> 00:01:55.799
<v Speaker 1>the power of seven and then divide by thirteen, the

41
00:01:55.799 --> 00:01:59.159
<v Speaker 1>remainder you get is two one seventeen mod thirteen is two.

42
00:01:59.480 --> 00:02:02.640
<v Speaker 2>Right. Wrapping around is key, it really is. It seems simple,

43
00:02:02.799 --> 00:02:05.280
<v Speaker 2>but it's what makes certain operations easy one way but

44
00:02:05.400 --> 00:02:09.240
<v Speaker 2>incredibly hard to reverse. And that asymmetry that's a core

45
00:02:09.360 --> 00:02:13.080
<v Speaker 2>principle for secure communication and crypto, got it, And this

46
00:02:13.199 --> 00:02:16.599
<v Speaker 2>whole idea sets the stage for prime numbers.

47
00:02:16.280 --> 00:02:18.360
<v Speaker 1>Which everyone knows are important right now, number is only

48
00:02:18.400 --> 00:02:19.400
<v Speaker 1>divisible by one, and.

49
00:02:19.360 --> 00:02:24.360
<v Speaker 2>Themselves fundamental, absolutely fundamentally crypto. Their unique properties make them

50
00:02:24.599 --> 00:02:27.360
<v Speaker 2>perfect building blocks for keys and algorithms.

51
00:02:27.400 --> 00:02:30.479
<v Speaker 1>Okay, now here's where it gets maybe a bit more complex,

52
00:02:31.080 --> 00:02:33.280
<v Speaker 1>fermats and Euler's theorems.

53
00:02:32.960 --> 00:02:37.280
<v Speaker 2>Right, powerful stuff. Euler's theorem uses something called Eiler's totient function,

54
00:02:37.680 --> 00:02:40.120
<v Speaker 2>often written five N or fn.

55
00:02:40.400 --> 00:02:41.400
<v Speaker 1>And what does that function do?

56
00:02:42.120 --> 00:02:44.960
<v Speaker 2>It basically counts how many positive integers up to a

57
00:02:44.960 --> 00:02:47.240
<v Speaker 2>given number and don't share any common factors with n

58
00:02:47.319 --> 00:02:50.199
<v Speaker 2>apart from one. Okay, and the kind of interesting property

59
00:02:50.280 --> 00:02:53.240
<v Speaker 2>is that fn is always even if n is bigger

60
00:02:53.280 --> 00:02:56.520
<v Speaker 2>than two. Sounds abstract, I know, yeah, a bit, but

61
00:02:56.759 --> 00:02:59.879
<v Speaker 2>it actually has real implications for how cryptosystems are designed

62
00:03:00.240 --> 00:03:01.599
<v Speaker 2>and analyzed.

63
00:03:01.759 --> 00:03:02.199
<v Speaker 1>Interesting.

64
00:03:02.400 --> 00:03:05.400
<v Speaker 2>Okay, these theorems, they lead us towards discrete logarithms.

65
00:03:05.599 --> 00:03:08.439
<v Speaker 1>Discrete logarithms. What's the core idea there?

66
00:03:08.520 --> 00:03:13.520
<v Speaker 2>Okay? Imagine an equation hy equal g to the power

67
00:03:13.520 --> 00:03:16.759
<v Speaker 2>of x, all done modulo p, where p is a prime.

68
00:03:17.319 --> 00:03:20.560
<v Speaker 2>If you know g x and P, finding why is easy,

69
00:03:21.000 --> 00:03:25.800
<v Speaker 2>straightforward calculation. But the reverse problem finding x exactly if

70
00:03:25.840 --> 00:03:28.680
<v Speaker 2>you know YG and P, trying to figure out that

71
00:03:28.800 --> 00:03:33.800
<v Speaker 2>original exponent X is generally incredibly difficult, computationally hard.

72
00:03:33.919 --> 00:03:37.479
<v Speaker 1>Ah, and that difficulty is the security that's the bedrock

73
00:03:37.719 --> 00:03:39.000
<v Speaker 1>for many modern systems.

74
00:03:39.439 --> 00:03:42.639
<v Speaker 2>It's a hard problem, much like factoring very large numbers, which,

75
00:03:42.960 --> 00:03:44.840
<v Speaker 2>as we'll get to, is key for RSA.

76
00:03:45.120 --> 00:03:47.960
<v Speaker 1>Okay, so those are the mathematical foundations. Let's move into

77
00:03:48.000 --> 00:03:51.759
<v Speaker 1>symmetric ciphers now, starting with maybe the classical.

78
00:03:51.240 --> 00:03:52.520
<v Speaker 2>Techniques sounds good.

79
00:03:52.560 --> 00:03:56.479
<v Speaker 1>So first off, what makes us cipher symmetric? In simple terms,

80
00:03:56.639 --> 00:03:57.199
<v Speaker 1>the key.

81
00:03:57.120 --> 00:04:00.000
<v Speaker 2>Thing that defining characteristic is that you use the same

82
00:04:00.080 --> 00:04:03.520
<v Speaker 2>secret key for both encryption scrambling the message and decryption unscrambling.

83
00:04:03.639 --> 00:04:06.319
<v Speaker 1>Okay, one key does both jobs like a safe.

84
00:04:06.120 --> 00:04:08.479
<v Speaker 2>Key, precisely, lock and unlock with the same key.

85
00:04:08.639 --> 00:04:10.960
<v Speaker 1>Makes sense. So what were some of the early ways

86
00:04:11.000 --> 00:04:12.800
<v Speaker 1>people use this single key.

87
00:04:13.080 --> 00:04:17.839
<v Speaker 2>Well, classical methods mostly fall into two buckets, substitution and transposition.

88
00:04:18.319 --> 00:04:20.839
<v Speaker 1>Substitution that like replacing letters.

89
00:04:20.639 --> 00:04:25.040
<v Speaker 2>Yeah, basically replacing parts of the plaintext letters maybe groups

90
00:04:25.040 --> 00:04:28.240
<v Speaker 2>of letters with other symbols or letters. The classic Caesar

91
00:04:28.319 --> 00:04:31.240
<v Speaker 2>cipher is a simple example, just shift every letter a

92
00:04:31.279 --> 00:04:32.839
<v Speaker 2>fixed number of places.

93
00:04:32.519 --> 00:04:34.800
<v Speaker 1>Right A becomes D, B becomes etc.

94
00:04:35.360 --> 00:04:40.319
<v Speaker 2>Exactly. More complex ones like the Visioneer cipher use a keyword.

95
00:04:40.480 --> 00:04:43.240
<v Speaker 2>That keyword tells you how much to shift each letter,

96
00:04:43.639 --> 00:04:46.199
<v Speaker 2>making it harder to crack than a simple caesar.

97
00:04:46.560 --> 00:04:50.160
<v Speaker 1>Okay, and transposition sounds like just shuffling things around, That's

98
00:04:50.199 --> 00:04:50.759
<v Speaker 1>exactly it.

99
00:04:50.839 --> 00:04:53.720
<v Speaker 2>Transposition ciphers just rearrange the order of the letters or

100
00:04:53.759 --> 00:04:56.959
<v Speaker 2>other units in the plaintext. They don't change the letters themselves.

101
00:04:56.600 --> 00:04:58.120
<v Speaker 1>Like making an anagram.

102
00:04:57.600 --> 00:04:59.519
<v Speaker 2>Pretty much, yeah, shuffling the deck basically.

103
00:04:59.759 --> 00:05:02.759
<v Speaker 1>Now, when we talk about how strong these are, unconditional

104
00:05:02.800 --> 00:05:05.839
<v Speaker 1>security versus computational security, what's the difference?

105
00:05:05.920 --> 00:05:09.839
<v Speaker 2>Right? Unconditional security is the gold standard. Theoretically, it means

106
00:05:10.000 --> 00:05:14.319
<v Speaker 2>even an attacker with infinite computing power infinite time still

107
00:05:14.360 --> 00:05:16.920
<v Speaker 2>couldn't figure out the original message just from the ciphertext.

108
00:05:17.160 --> 00:05:20.759
<v Speaker 2>Why not because the ciphertext simply doesn't contain enough information.

109
00:05:21.600 --> 00:05:24.079
<v Speaker 2>The only cipher known to achieve this is the one

110
00:05:24.079 --> 00:05:24.560
<v Speaker 2>time pad.

111
00:05:24.759 --> 00:05:26.319
<v Speaker 1>Ah, the famous one time pad.

112
00:05:26.519 --> 00:05:29.199
<v Speaker 2>Yeah, but it needs a truly random key that's as

113
00:05:29.240 --> 00:05:31.680
<v Speaker 2>long as the message itself, and you can only use it.

114
00:05:31.600 --> 00:05:34.759
<v Speaker 1>Once, which is impractical.

115
00:05:34.240 --> 00:05:37.759
<v Speaker 2>Very impractical. Generating and securely sharing those long keys is

116
00:05:37.800 --> 00:05:42.600
<v Speaker 2>a nightmare. So most modern encryption aims for computational security instead,

117
00:05:43.120 --> 00:05:45.800
<v Speaker 2>which means it means that, yeah, theoretically it might be

118
00:05:45.800 --> 00:05:48.480
<v Speaker 2>possible to break the cipher, but the amount of computing

119
00:05:48.560 --> 00:05:52.720
<v Speaker 2>power and time needed is just astronomical, so enormous that

120
00:05:52.800 --> 00:05:55.319
<v Speaker 2>it's practically impossible in the real world, you know, within

121
00:05:55.360 --> 00:05:56.560
<v Speaker 2>any reasonable timeframe.

122
00:05:56.680 --> 00:05:59.160
<v Speaker 1>Okay, So the security relies on it being too hard

123
00:05:59.160 --> 00:06:00.319
<v Speaker 1>to compute the answer.

124
00:06:00.319 --> 00:06:03.319
<v Speaker 2>Exactly, the key length, the complexity of the algorithm, that's

125
00:06:03.360 --> 00:06:04.439
<v Speaker 2>what provides the barrier.

126
00:06:05.319 --> 00:06:08.879
<v Speaker 1>So that leads us to modern symmetric ciphers. Let's start

127
00:06:08.879 --> 00:06:14.720
<v Speaker 1>with block ciphers and the famous data encryption standard DES OKAYDES.

128
00:06:15.079 --> 00:06:17.920
<v Speaker 2>What's the main difference between a block cipher and say,

129
00:06:18.279 --> 00:06:22.839
<v Speaker 2>stream cipher? Good question. Stream ciphers encrypted data bit by

130
00:06:22.879 --> 00:06:26.040
<v Speaker 2>bit or bite by bite as it comes in. Block ciphers, though,

131
00:06:26.120 --> 00:06:29.480
<v Speaker 2>operate on fixed sized chunks of plaintext. These chunks are

132
00:06:29.519 --> 00:06:30.079
<v Speaker 2>called blocks.

133
00:06:30.319 --> 00:06:31.959
<v Speaker 1>How big were the blocks for das?

134
00:06:32.000 --> 00:06:35.000
<v Speaker 2>The EES used sixty four bit blocks, and it used

135
00:06:35.000 --> 00:06:37.759
<v Speaker 2>a fifty six bit key. Each sixty four bit block

136
00:06:37.839 --> 00:06:39.360
<v Speaker 2>is processed as a single unit.

137
00:06:40.000 --> 00:06:44.399
<v Speaker 1>Our sources mentioned an ideal block cipher. What's that concept about? Ah?

138
00:06:44.519 --> 00:06:47.519
<v Speaker 2>Yeah, Feistal's idea. Think of an ideal block cipher as

139
00:06:48.040 --> 00:06:50.759
<v Speaker 2>like a perfect scrambler for blocks of a certain size.

140
00:06:51.000 --> 00:06:52.839
<v Speaker 2>For an n bit block, there are two to the

141
00:06:52.959 --> 00:06:56.639
<v Speaker 2>end possible inputs, right. An ideal cipher could map each

142
00:06:56.680 --> 00:06:58.199
<v Speaker 2>of those inputs to any of the two to the

143
00:06:58.279 --> 00:07:00.800
<v Speaker 2>m possible outputs in a totally and them looking but

144
00:07:00.879 --> 00:07:03.800
<v Speaker 2>reversible way. It gives you the maximum possible number of

145
00:07:03.879 --> 00:07:05.000
<v Speaker 2>encryption transformations.

146
00:07:05.079 --> 00:07:08.639
<v Speaker 1>Okay. The theoretical maximum and DS uses something called the

147
00:07:08.680 --> 00:07:12.399
<v Speaker 1>Feistyal cipher structure. Not quite ideal, but based on it exactly.

148
00:07:12.399 --> 00:07:14.600
<v Speaker 2>The Fystyal structure is a really clever design used in

149
00:07:14.639 --> 00:07:16.480
<v Speaker 2>many block ciphers des included.

150
00:07:16.519 --> 00:07:18.279
<v Speaker 1>How does it work? Basically, you take the.

151
00:07:18.240 --> 00:07:21.040
<v Speaker 2>Plaintext block, split it in half, then you run it

152
00:07:21.079 --> 00:07:23.879
<v Speaker 2>through a series of rounds. In each round, a special

153
00:07:23.920 --> 00:07:26.680
<v Speaker 2>function is applied to one half using a round key

154
00:07:26.759 --> 00:07:27.800
<v Speaker 2>derived from the main key.

155
00:07:28.040 --> 00:07:28.480
<v Speaker 1>Okay.

156
00:07:28.759 --> 00:07:31.920
<v Speaker 2>The result of that function is then combined, usually just exored,

157
00:07:32.079 --> 00:07:35.319
<v Speaker 2>with the other half. Then crucially, the two halves are swapped.

158
00:07:35.600 --> 00:07:36.759
<v Speaker 2>Repeat for several rounds.

159
00:07:36.800 --> 00:07:38.199
<v Speaker 1>And the clever part, the.

160
00:07:38.199 --> 00:07:40.439
<v Speaker 2>Really neat thing, is the function itself doesn't have to

161
00:07:40.439 --> 00:07:43.519
<v Speaker 2>be reversible for the whole encryption process to be reversible

162
00:07:44.160 --> 00:07:47.519
<v Speaker 2>because of that swap and XR structure. Decryption just runs

163
00:07:47.480 --> 00:07:50.360
<v Speaker 2>the process backward using the round keys in reverse order.

164
00:07:50.480 --> 00:07:54.000
<v Speaker 1>Ah. Okay, So DES sixty four bit block, fifty six

165
00:07:54.040 --> 00:07:57.800
<v Speaker 1>bit key, sixteen rounds of this feistyle process plus some

166
00:07:57.879 --> 00:07:59.079
<v Speaker 1>shuffling at the start and end.

167
00:07:59.160 --> 00:08:01.920
<v Speaker 2>That's the gist of it. Yeah, initial and final permutations.

168
00:08:02.160 --> 00:08:05.000
<v Speaker 1>What were the main worries about DES security over time?

169
00:08:05.279 --> 00:08:07.319
<v Speaker 2>The big one, really, the killer, was the fifty six

170
00:08:07.399 --> 00:08:10.240
<v Speaker 2>big key size. It seemed okay back in the seventies

171
00:08:10.240 --> 00:08:11.519
<v Speaker 2>when it was designed.

172
00:08:11.199 --> 00:08:13.439
<v Speaker 1>But computing power caught up massively.

173
00:08:14.000 --> 00:08:17.519
<v Speaker 2>The possibility of a brute force attack just trying every

174
00:08:17.560 --> 00:08:19.600
<v Speaker 2>single one of the two hundred and fifty six possible

175
00:08:19.639 --> 00:08:23.279
<v Speaker 2>keys became a very real threat. People started designing machines

176
00:08:23.279 --> 00:08:25.439
<v Speaker 2>specifically to crack DES.

177
00:08:25.279 --> 00:08:26.319
<v Speaker 1>And eventually they could.

178
00:08:26.480 --> 00:08:30.839
<v Speaker 2>Yep, those concerns were validated. DES just wasn't strong enough anymore,

179
00:08:30.879 --> 00:08:32.919
<v Speaker 2>which led to the need for replacement.

180
00:08:32.639 --> 00:08:35.679
<v Speaker 1>Which brings us neatly to the Advanced Encryption Standard AES,

181
00:08:35.840 --> 00:08:38.919
<v Speaker 1>the successor. How does AES differ from DES in terms

182
00:08:38.919 --> 00:08:40.480
<v Speaker 1>of design? Security?

183
00:08:40.679 --> 00:08:43.679
<v Speaker 2>As is quite different? Internally doesn't use that feistyle structure.

184
00:08:43.720 --> 00:08:45.639
<v Speaker 2>It works on larger blocks under twenty eight.

185
00:08:45.600 --> 00:08:48.279
<v Speaker 1>Bits, bigger blocks and bigger keys, much bigger keys.

186
00:08:48.320 --> 00:08:50.639
<v Speaker 2>AES supports key lengths of one hundred and twenty eight,

187
00:08:50.720 --> 00:08:52.519
<v Speaker 2>one hundred and ninety two or two hundred and fifty

188
00:08:52.519 --> 00:08:55.000
<v Speaker 2>six bits. That makes it vastly more resistant to broot

189
00:08:55.039 --> 00:08:55.960
<v Speaker 2>force attacks.

190
00:08:55.600 --> 00:08:59.039
<v Speaker 1>Than des Okay, and internally, how does it process that

191
00:08:59.080 --> 00:09:01.080
<v Speaker 1>one hundred and twenty eight It organizes the.

192
00:09:01.039 --> 00:09:03.080
<v Speaker 2>One hundred and twenty eight bits into a four by

193
00:09:03.159 --> 00:09:06.120
<v Speaker 2>four grid of bytes. This grid is called the state array.

194
00:09:06.320 --> 00:09:09.919
<v Speaker 2>The encryption process involves transforming the state array over multiple rounds.

195
00:09:09.960 --> 00:09:12.639
<v Speaker 1>And what are the main transformations in each as round?

196
00:09:12.639 --> 00:09:15.480
<v Speaker 2>There are four main steps repeated in each round byte

197
00:09:15.480 --> 00:09:17.840
<v Speaker 2>sub shift, rows, mixed columns, and ad.

198
00:09:17.720 --> 00:09:20.840
<v Speaker 1>Round key Okay, break those down briefly, BIGHTE.

199
00:09:20.519 --> 00:09:24.159
<v Speaker 2>Sub byte sub is a substitution step. Each byte in

200
00:09:24.240 --> 00:09:26.840
<v Speaker 2>the state array is replaced by another byte according to

201
00:09:26.879 --> 00:09:31.080
<v Speaker 2>a fixed lookup table called an s box. It provides nonlinearity.

202
00:09:31.240 --> 00:09:34.720
<v Speaker 2>This rose shift rows cyclically shifts the bytes in each

203
00:09:34.840 --> 00:09:38.000
<v Speaker 2>row of the state array. Row one shifts by one byte,

204
00:09:38.080 --> 00:09:40.600
<v Speaker 2>row two by two, and so on. This helps spread

205
00:09:40.679 --> 00:09:42.000
<v Speaker 2>changes across columns.

206
00:09:42.159 --> 00:09:44.039
<v Speaker 1>Mixed columns sounds important.

207
00:09:44.240 --> 00:09:47.440
<v Speaker 2>It is. It's a more complex mathematical step that mixes

208
00:09:47.440 --> 00:09:50.799
<v Speaker 2>the bytes within each column of the state. Uses operations

209
00:09:50.799 --> 00:09:51.799
<v Speaker 2>in a finite field.

210
00:09:51.960 --> 00:09:54.440
<v Speaker 1>Finite field like that modular arithmetic we.

211
00:09:54.399 --> 00:09:57.639
<v Speaker 2>Talked about sort of, Yeah, it's arithmetic with polynomials over

212
00:09:57.720 --> 00:10:00.480
<v Speaker 2>GF twenty eight. The key point is that this step

213
00:10:00.519 --> 00:10:03.200
<v Speaker 2>ensure is that changes in one byte quickly affect many

214
00:10:03.240 --> 00:10:06.720
<v Speaker 2>other bytes in the block. It provides diffusion, okay, strong mixing.

215
00:10:06.879 --> 00:10:09.480
<v Speaker 2>And the last step add round key ad ground key

216
00:10:09.519 --> 00:10:11.480
<v Speaker 2>is simple. It just xo R is the current statea

217
00:10:11.559 --> 00:10:14.200
<v Speaker 2>array with a round specific key that's derived from the

218
00:10:14.240 --> 00:10:16.919
<v Speaker 2>main AES key. This is where the secret key actually

219
00:10:16.919 --> 00:10:17.639
<v Speaker 2>gets mixed.

220
00:10:17.440 --> 00:10:20.559
<v Speaker 1>Into the data you mentioned. Mixed columns uses finite field math.

221
00:10:20.639 --> 00:10:23.279
<v Speaker 1>Can you give a slightly less mathy idea of what

222
00:10:23.320 --> 00:10:23.919
<v Speaker 1>it achieves?

223
00:10:24.320 --> 00:10:27.360
<v Speaker 2>Sure? Think of it like really thoroughly blending the ingredients

224
00:10:27.360 --> 00:10:30.639
<v Speaker 2>in each column of that four by four grid. Mathematically,

225
00:10:30.879 --> 00:10:34.480
<v Speaker 2>it involves treating each column like a polynomial and multiplying

226
00:10:34.559 --> 00:10:36.919
<v Speaker 2>it by a fixed polynomial using special rules.

227
00:10:37.120 --> 00:10:37.279
<v Speaker 1>Huh.

228
00:10:37.639 --> 00:10:40.240
<v Speaker 2>The result is that every bite in the output column

229
00:10:40.240 --> 00:10:42.840
<v Speaker 2>depends on all the bytes in the input column, great

230
00:10:42.879 --> 00:10:44.200
<v Speaker 2>for scrambling things up quickly.

231
00:10:44.279 --> 00:10:46.799
<v Speaker 1>And these round keys for ad round key. They come

232
00:10:46.840 --> 00:10:48.720
<v Speaker 1>from the main key, Yes.

233
00:10:48.679 --> 00:10:52.759
<v Speaker 2>Through a process called key expansion. The original one twenty eight, one, nine,

234
00:10:52.960 --> 00:10:55.320
<v Speaker 2>two or two hundred and fifty six bit key is

235
00:10:55.360 --> 00:10:58.240
<v Speaker 2>expanded into a whole schedule of round keys, one for

236
00:10:58.279 --> 00:10:59.639
<v Speaker 2>each round plus an initial one.

237
00:10:59.799 --> 00:11:01.559
<v Speaker 1>Is that expansion important for security too?

238
00:11:01.639 --> 00:11:04.639
<v Speaker 2>Absolutely? It's designed so that every bit of the original

239
00:11:04.720 --> 00:11:08.200
<v Speaker 2>key influences many bits of the round keys. This diffusion

240
00:11:08.559 --> 00:11:10.879
<v Speaker 2>is vital. Change one bit in the main key and

241
00:11:10.919 --> 00:11:14.120
<v Speaker 2>the round keys, and thus the encryption changed drastically.

242
00:11:14.240 --> 00:11:17.399
<v Speaker 1>Okay, AES sounds much more robust. Now, how are block

243
00:11:17.440 --> 00:11:20.919
<v Speaker 1>ciphers like AES actually used to encrypt say a large

244
00:11:20.919 --> 00:11:23.240
<v Speaker 1>file that gets us into these modes of operation? Right?

245
00:11:23.440 --> 00:11:26.840
<v Speaker 2>Exactly, a block cipher only encrypts one fixed size block

246
00:11:26.879 --> 00:11:30.120
<v Speaker 2>at a time. Modes of operation define how you apply

247
00:11:30.200 --> 00:11:34.240
<v Speaker 2>that block cipher repeatedly to handle data of any size. Right,

248
00:11:34.440 --> 00:11:38.120
<v Speaker 2>and different modes have different characteristics, different security properties, different

249
00:11:38.120 --> 00:11:39.240
<v Speaker 2>performance trade offs.

250
00:11:39.360 --> 00:11:42.320
<v Speaker 1>Let's run through the main ones. Electronic Codebook mode ECB

251
00:11:43.200 --> 00:11:43.960
<v Speaker 1>sounds basic.

252
00:11:44.279 --> 00:11:47.360
<v Speaker 2>It is the simplest. You just chop the plaintext into

253
00:11:47.360 --> 00:11:51.320
<v Speaker 2>blocks and encrypt each block independently using the same key.

254
00:11:51.480 --> 00:11:52.600
<v Speaker 1>What's the problem with that?

255
00:11:52.919 --> 00:11:56.600
<v Speaker 2>The huge weakness is that if you have identical plaintext blocks,

256
00:11:56.960 --> 00:12:00.000
<v Speaker 2>they will always encrypt the exact same ciphertext block.

257
00:12:00.320 --> 00:12:02.200
<v Speaker 1>So patterns remain visible totally.

258
00:12:02.320 --> 00:12:04.440
<v Speaker 2>You often see it demonstrated with images. You can still

259
00:12:04.440 --> 00:12:08.039
<v Speaker 2>make out the original image even after ECB encryption, because

260
00:12:08.080 --> 00:12:10.399
<v Speaker 2>areas of the same color encrypt to the same pattern.

261
00:12:10.720 --> 00:12:12.039
<v Speaker 2>Generally you avoid ECB.

262
00:12:12.360 --> 00:12:16.720
<v Speaker 1>Okay, then there's cipher blockchaining CBC mode. How does that

263
00:12:16.759 --> 00:12:17.440
<v Speaker 1>improve things?

264
00:12:17.639 --> 00:12:22.200
<v Speaker 2>CBC introduces dependency between blocks. Before encrypting a plaintext block,

265
00:12:22.600 --> 00:12:24.519
<v Speaker 2>you x R it with the ciphertext from.

266
00:12:24.360 --> 00:12:26.200
<v Speaker 1>The previous block, caning them together.

267
00:12:26.039 --> 00:12:29.360
<v Speaker 2>Exactly for the very first block. There's no previous cybertext,

268
00:12:29.559 --> 00:12:32.840
<v Speaker 2>so you use a random starting value called an initialization

269
00:12:32.960 --> 00:12:33.639
<v Speaker 2>vector or.

270
00:12:33.639 --> 00:12:35.759
<v Speaker 1>Five, and that hides the patterns.

271
00:12:36.000 --> 00:12:39.840
<v Speaker 2>Yes, because now each ciphertext block depends not just on

272
00:12:39.919 --> 00:12:43.159
<v Speaker 2>its corresponding plaintext block, but on all the plaintext blocks

273
00:12:43.159 --> 00:12:47.960
<v Speaker 2>before it. Repeating plaintext blocks won't produce repeating ciphertext blocks anymore,

274
00:12:48.039 --> 00:12:49.440
<v Speaker 2>assuming you use a unique IV.

275
00:12:49.679 --> 00:12:54.919
<v Speaker 1>Okay, what about cipher feedback CFB and output feedback OFB.

276
00:12:55.200 --> 00:12:57.159
<v Speaker 1>They sound like they might be used for streaming data.

277
00:12:57.320 --> 00:12:59.639
<v Speaker 2>You're right. They effectively turn a block cipher into a

278
00:12:59.679 --> 00:13:03.799
<v Speaker 2>stream cipher. How In CFB, you encrypt the previous ciphertext block,

279
00:13:04.000 --> 00:13:06.840
<v Speaker 2>then xor ru the result with the current plaintext block

280
00:13:06.960 --> 00:13:09.600
<v Speaker 2>to get the current ciphertext. That ciphertext then feeds into

281
00:13:09.600 --> 00:13:12.879
<v Speaker 2>the next step. Okay, ANDFB OFD is similar, but instead

282
00:13:12.879 --> 00:13:15.480
<v Speaker 2>of feeding back the ciphertext, it feeds back the output

283
00:13:15.559 --> 00:13:18.919
<v Speaker 2>of the block cipher encryption before the xor This generated

284
00:13:18.919 --> 00:13:22.159
<v Speaker 2>the keystream independent of the plaintext. You then xr this

285
00:13:22.279 --> 00:13:23.799
<v Speaker 2>keystream with the plaintext.

286
00:13:24.080 --> 00:13:26.279
<v Speaker 1>So OFB generates a stream of key bits.

287
00:13:26.519 --> 00:13:28.480
<v Speaker 2>Essentially, yes, like a stream cipher.

288
00:13:28.600 --> 00:13:31.159
<v Speaker 1>Encounter mode CTR that seems popular.

289
00:13:31.360 --> 00:13:34.120
<v Speaker 2>CTR mode is also like a stream cipher. It works

290
00:13:34.200 --> 00:13:36.960
<v Speaker 2>by encrypting a counter value. This counter is unique for

291
00:13:37.039 --> 00:13:39.840
<v Speaker 2>each block, usually combination of a nonce which is a

292
00:13:39.919 --> 00:13:41.279
<v Speaker 2>number used only once per.

293
00:13:41.200 --> 00:13:43.240
<v Speaker 1>Key, anance number use once got it.

294
00:13:43.200 --> 00:13:46.000
<v Speaker 2>And an incrementing counter value. You encrypt this unique counter

295
00:13:46.120 --> 00:13:49.559
<v Speaker 2>value and then xr the result with the plaintext block.

296
00:13:49.919 --> 00:13:53.600
<v Speaker 1>What's the advantage of CTR A big one is parallelization.

297
00:13:54.240 --> 00:13:57.240
<v Speaker 2>Since each block's encryption only depends on the counter, not

298
00:13:57.440 --> 00:14:02.320
<v Speaker 2>previous blocks, you can encrypt or decrypt multiple blocks simultaneously

299
00:14:02.919 --> 00:14:03.879
<v Speaker 2>speeds things up.

300
00:14:04.039 --> 00:14:06.240
<v Speaker 1>But that nonce is critical.

301
00:14:05.919 --> 00:14:08.919
<v Speaker 2>Absolute critical. You must never reuse the same nons counter

302
00:14:09.039 --> 00:14:12.360
<v Speaker 2>value with the same key. If you do, you completely

303
00:14:12.360 --> 00:14:14.879
<v Speaker 2>break the security for those blocks. It's like reusing a

304
00:14:14.919 --> 00:14:15.879
<v Speaker 2>one time pad key.

305
00:14:16.039 --> 00:14:19.000
<v Speaker 1>Okay, very important. We also saw something called format preserving

306
00:14:19.159 --> 00:14:21.320
<v Speaker 1>encryption FPV. What's that about?

307
00:14:21.759 --> 00:14:24.240
<v Speaker 2>FPE is a need idea. It encrypts data in such

308
00:14:24.240 --> 00:14:27.120
<v Speaker 2>a way that the ciphertext has the exact same format

309
00:14:27.120 --> 00:14:30.159
<v Speaker 2>as the original plaintext. So if you encrypt a sixteen

310
00:14:30.200 --> 00:14:34.000
<v Speaker 2>digit credit card number using FPE, the output will also

311
00:14:34.000 --> 00:14:36.519
<v Speaker 2>be a sixteen digit number. It won't be the original number,

312
00:14:36.759 --> 00:14:39.320
<v Speaker 2>or even a valid card number, but it'll look like one.

313
00:14:39.399 --> 00:14:40.399
<v Speaker 1>Why would you need that?

314
00:14:40.720 --> 00:14:44.600
<v Speaker 2>It's really useful in legacy systems or databases where changing

315
00:14:44.639 --> 00:14:48.000
<v Speaker 2>the data format is difficult or impossible. You can encrypt

316
00:14:48.039 --> 00:14:51.279
<v Speaker 2>sensitive data like credit card numbers or social security numbers,

317
00:14:51.519 --> 00:14:54.240
<v Speaker 2>but they still fit into the existing database fields or

318
00:14:54.320 --> 00:14:55.240
<v Speaker 2>application inputs.

319
00:14:55.360 --> 00:14:56.679
<v Speaker 1>How does it work? Generally?

320
00:14:56.879 --> 00:14:59.960
<v Speaker 2>Algorithms like f F one, f F two, f FI

321
00:15:00.080 --> 00:15:03.879
<v Speaker 2>three typically involve converting the plaintext to a number using

322
00:15:03.879 --> 00:15:06.759
<v Speaker 2>a pseudorandom function, often based on AES and sort of

323
00:15:06.759 --> 00:15:10.759
<v Speaker 2>feistle like structure and carefully using modular arithmetic to ensure

324
00:15:10.759 --> 00:15:13.440
<v Speaker 2>the output number stays within the required range and format.

325
00:15:13.559 --> 00:15:19.000
<v Speaker 1>Clever okay, Shifting gears now randomness crucial for keys ivs nonsays.

326
00:15:19.039 --> 00:15:22.519
<v Speaker 1>We have true random number generators trngs and pseudorandom number

327
00:15:22.519 --> 00:15:24.440
<v Speaker 1>generators pr g's big difference.

328
00:15:24.519 --> 00:15:27.720
<v Speaker 2>The fundamental difference is the source. Trngs tap into physical

329
00:15:27.759 --> 00:15:31.879
<v Speaker 2>processes that are inherently unpredictable. Think radioicive decay, thermal noise

330
00:15:31.919 --> 00:15:35.879
<v Speaker 2>in circuits, atmospheric noise, things that are truly random by nature.

331
00:15:36.000 --> 00:15:39.679
<v Speaker 1>Okay, real physical randomness and PRNGs pr.

332
00:15:39.559 --> 00:15:42.919
<v Speaker 2>And g's are algorithms. They're deterministic. You give them a

333
00:15:42.960 --> 00:15:46.159
<v Speaker 2>starting value called a seed, and they produce the sequence

334
00:15:46.200 --> 00:15:49.240
<v Speaker 2>of numbers that looks random but is actually completely determined

335
00:15:49.279 --> 00:15:51.480
<v Speaker 2>by the seed in the algorithm. If you know the seed,

336
00:15:51.559 --> 00:15:53.039
<v Speaker 2>you can predict the entire sequence.

337
00:15:53.159 --> 00:15:56.639
<v Speaker 1>So not truly random, but they aim for properties.

338
00:15:56.240 --> 00:16:00.759
<v Speaker 2>Like randomness exactly. Good PRNGs produce sequences that pass statistical

339
00:16:00.799 --> 00:16:04.159
<v Speaker 2>tests for randomness. They should have uniformity zeros and ones

340
00:16:04.279 --> 00:16:07.679
<v Speaker 2>roughly equal independence. Knowing part of the sequence doesn't help

341
00:16:07.679 --> 00:16:11.240
<v Speaker 2>predict the rest. Scalability generate long sequences.

342
00:16:11.159 --> 00:16:14.519
<v Speaker 1>And for crypto, the key is unpredictability.

343
00:16:13.639 --> 00:16:19.759
<v Speaker 2>Absolutely crucial. A cryptographically secure PRNG or csprng must be unpredictable.

344
00:16:20.000 --> 00:16:22.279
<v Speaker 2>Even if an attacker sees a large chunk of the output,

345
00:16:22.519 --> 00:16:24.240
<v Speaker 2>they shouldn't be able to figure out the next bit

346
00:16:24.519 --> 00:16:26.039
<v Speaker 2>or work backward to find the seed.

347
00:16:26.200 --> 00:16:29.919
<v Speaker 1>Okay, the sources mentioned. Linear congruental generators lcgs.

348
00:16:30.039 --> 00:16:32.799
<v Speaker 2>Lcgs are a common simple type of PRNG. They use

349
00:16:32.840 --> 00:16:36.399
<v Speaker 2>a formula like next number a precious number plus c

350
00:16:37.080 --> 00:16:41.320
<v Speaker 2>mod m relatively simple yes, with carefully chosen values for

351
00:16:41.440 --> 00:16:45.759
<v Speaker 2>AC and M, they can produce sequences with decent statistical

352
00:16:45.799 --> 00:16:50.360
<v Speaker 2>properties for some applications like simulations. A famous example uses

353
00:16:50.399 --> 00:16:53.240
<v Speaker 2>a one hundred and eight oh seven and m equals

354
00:16:53.279 --> 00:16:54.320
<v Speaker 2>to thirty one one.

355
00:16:54.519 --> 00:16:56.240
<v Speaker 1>But probably not good enough for crypto.

356
00:16:56.559 --> 00:17:00.360
<v Speaker 2>Generally, no standard lcgs are too predictable. Their internal state

357
00:17:00.440 --> 00:17:03.240
<v Speaker 2>is too simple. An attacker can often figure out the

358
00:17:03.240 --> 00:17:05.240
<v Speaker 2>parameters and the seed relatively easily.

359
00:17:05.279 --> 00:17:07.680
<v Speaker 1>So that's where cspr andngs come in. How are they built?

360
00:17:07.839 --> 00:17:12.400
<v Speaker 2>Csprngs are designed specifically to resist prediction. They often use

361
00:17:12.440 --> 00:17:16.039
<v Speaker 2>cryptographic primitives like block ciphers or hash functions as part

362
00:17:16.039 --> 00:17:20.640
<v Speaker 2>of their mechanism, like the CTRDRBG mentioned exactly. Ctrdrbgs is

363
00:17:20.640 --> 00:17:24.680
<v Speaker 2>a block cipher in countermode like ASCTR to generate the output.

364
00:17:24.880 --> 00:17:28.240
<v Speaker 2>They also have mechanisms to periodically recede themselves or update

365
00:17:28.279 --> 00:17:31.000
<v Speaker 2>their internal state based on new entropy, making them much

366
00:17:31.039 --> 00:17:32.240
<v Speaker 2>harder to predict or break.

367
00:17:32.480 --> 00:17:35.000
<v Speaker 1>And how does stream ciphers fit in with PRNGs.

368
00:17:35.079 --> 00:17:37.039
<v Speaker 2>You can think of a stream cipher as essentially a

369
00:17:37.039 --> 00:17:40.359
<v Speaker 2>CSPR and G combined with an xrr operation. The stream

370
00:17:40.400 --> 00:17:43.640
<v Speaker 2>cipher uses a short secret key to see to CSPR

371
00:17:43.680 --> 00:17:47.319
<v Speaker 2>and G. The CSPR and G then generates a long

372
00:17:47.400 --> 00:17:51.599
<v Speaker 2>sequence of pseudorandom bits that's the keystream. This keystream is

373
00:17:51.599 --> 00:17:54.839
<v Speaker 2>then xord with the plaintext bit by bit or byte

374
00:17:54.839 --> 00:17:57.240
<v Speaker 2>by byte to produce the cipher text.

375
00:17:57.079 --> 00:17:59.119
<v Speaker 1>Ah like a pseudorandom one time pad.

376
00:17:59.319 --> 00:18:01.799
<v Speaker 2>That's a great way to put it. The security hinges

377
00:18:01.960 --> 00:18:06.279
<v Speaker 2>entirely on the unpredictability of that keystream generated by the CSPRNG.

378
00:18:07.319 --> 00:18:12.200
<v Speaker 2>Our sources also briefly mentioned nonlinear feedback shift registers nfsrs

379
00:18:12.599 --> 00:18:14.920
<v Speaker 2>as another way to generate complex keystreams.

380
00:18:15.119 --> 00:18:18.240
<v Speaker 1>We talked about trng's maybe being slow, Is that still true?

381
00:18:18.400 --> 00:18:22.400
<v Speaker 2>Historically? Yes, generating true randomness from physical sources could be

382
00:18:22.480 --> 00:18:26.759
<v Speaker 2>slower than algorithmic PRNGs, but hardware trgs have improved a lot.

383
00:18:26.960 --> 00:18:28.200
<v Speaker 1>Like the Intel one mentioned.

384
00:18:28.279 --> 00:18:30.880
<v Speaker 2>Yeah, the Intel Digital Random Number Generator is built into

385
00:18:30.920 --> 00:18:34.519
<v Speaker 2>their processors. It uses onboard physical entropy sources to generate

386
00:18:34.599 --> 00:18:38.079
<v Speaker 2>high quality random numbers very quickly. This makes trngs much

387
00:18:38.160 --> 00:18:40.480
<v Speaker 2>more practical for things beyond just seating pr.

388
00:18:40.279 --> 00:18:42.839
<v Speaker 1>And G's all right. That covers symmetric crypto and randomness.

389
00:18:42.839 --> 00:18:46.759
<v Speaker 1>Now let's step into the other major paradigm, public key cryptography.

390
00:18:47.039 --> 00:18:48.119
<v Speaker 1>Totally different approach, you.

391
00:18:48.039 --> 00:18:52.559
<v Speaker 2>Said, completely different mindset. Yeah. Public key or asymmetric cryptography

392
00:18:53.079 --> 00:18:55.039
<v Speaker 2>uses two keys, a key.

393
00:18:54.920 --> 00:18:56.799
<v Speaker 1>Pair, two keys. How does that work.

394
00:18:57.000 --> 00:18:59.759
<v Speaker 2>There's a public key which you can share freely with anyone,

395
00:19:00.000 --> 00:19:03.400
<v Speaker 2>doesn't matter who sees it, and there's a corresponding private key,

396
00:19:03.680 --> 00:19:05.839
<v Speaker 2>which you must keep absolutely secret.

397
00:19:05.920 --> 00:19:08.279
<v Speaker 1>Okay, public and private What do they do?

398
00:19:09.000 --> 00:19:11.799
<v Speaker 2>The public key is typically used for encryption and the

399
00:19:11.839 --> 00:19:15.039
<v Speaker 2>private key is used for decryption, or, in the case

400
00:19:15.079 --> 00:19:17.839
<v Speaker 2>of digital signatures, the private key is used to sign

401
00:19:18.319 --> 00:19:20.680
<v Speaker 2>and the public key is used to verify the signature.

402
00:19:20.839 --> 00:19:24.079
<v Speaker 1>And this solves the key sharing problem of symmetric crypto.

403
00:19:24.240 --> 00:19:27.400
<v Speaker 2>Bingo. You don't need a pre shared secret. If someone

404
00:19:27.400 --> 00:19:29.559
<v Speaker 2>wants to send you an encrypted message, they just grab

405
00:19:29.599 --> 00:19:32.599
<v Speaker 2>your public key which is public, encrypt the message with it,

406
00:19:32.759 --> 00:19:35.839
<v Speaker 2>and send it over. Only you with your secret private

407
00:19:35.920 --> 00:19:37.000
<v Speaker 2>key can decrypt it.

408
00:19:37.160 --> 00:19:39.920
<v Speaker 1>That's clever. What are the main applications.

409
00:19:39.279 --> 00:19:44.480
<v Speaker 2>It's revolutionized digital security? Main uses are confidentiality as we

410
00:19:44.599 --> 00:19:48.039
<v Speaker 2>just described, secure key distribution helping parties agree on a

411
00:19:48.079 --> 00:19:52.960
<v Speaker 2>symmetric key, and crucially, authentication via digital signature is proving

412
00:19:52.960 --> 00:19:55.359
<v Speaker 2>who sent a message and that it wasn't tampered with.

413
00:19:55.759 --> 00:19:58.359
<v Speaker 1>RSA is the big name here, right. How does it work?

414
00:19:58.400 --> 00:19:59.119
<v Speaker 1>At a high level?

415
00:19:59.240 --> 00:20:03.160
<v Speaker 2>RSA is based on modular exponentiation. Using that public private

416
00:20:03.200 --> 00:20:06.759
<v Speaker 2>key pair. To encrypt a message M, you calculate c

417
00:20:07.359 --> 00:20:11.920
<v Speaker 2>me mod N. Here E and N together form the public.

418
00:20:11.640 --> 00:20:14.720
<v Speaker 1>Key okay message to the power of E modulo n

419
00:20:14.960 --> 00:20:16.000
<v Speaker 1>right to decrypt.

420
00:20:16.160 --> 00:20:19.160
<v Speaker 2>The person with the private key calculates M equal cd

421
00:20:19.400 --> 00:20:23.480
<v Speaker 2>mod N. Here D is the private key exponent relating.

422
00:20:23.200 --> 00:20:25.720
<v Speaker 1>To E and N, and the security comes from the.

423
00:20:25.640 --> 00:20:28.160
<v Speaker 2>Security relies on the difficulty of figuring out D if

424
00:20:28.160 --> 00:20:30.359
<v Speaker 2>you only know E and N, and that difficulty is

425
00:20:30.400 --> 00:20:33.160
<v Speaker 2>directly tied to the difficulty of factoring the large number

426
00:20:33.319 --> 00:20:36.119
<v Speaker 2>N into its original prime components H.

427
00:20:36.119 --> 00:20:39.920
<v Speaker 1>Factoring large numbers is hard. How are these keys N, E,

428
00:20:40.000 --> 00:20:41.559
<v Speaker 1>and D actually generated?

429
00:20:41.640 --> 00:20:44.880
<v Speaker 2>It starts by choosing two very large distinct prime numbers,

430
00:20:45.000 --> 00:20:47.799
<v Speaker 2>key and Q. These are kept secrets, okay, secret primes.

431
00:20:47.880 --> 00:20:50.240
<v Speaker 2>Then you calculate N nicols pq. This N is part

432
00:20:50.279 --> 00:20:53.279
<v Speaker 2>of the public key. Next you calculate something called Euler's

433
00:20:53.319 --> 00:20:56.279
<v Speaker 2>totient function of N, which for primes is f n

434
00:20:56.400 --> 00:20:57.440
<v Speaker 2>p one q one.

435
00:20:57.400 --> 00:20:58.960
<v Speaker 1>The totient function again yep.

436
00:20:59.599 --> 00:21:02.359
<v Speaker 2>Then you choose a public exponent such that E is

437
00:21:02.400 --> 00:21:06.240
<v Speaker 2>relatively prime to fn. They share no common factors other

438
00:21:06.319 --> 00:21:10.680
<v Speaker 2>than one often ease a small number like six, five, five, three, seven.

439
00:21:10.799 --> 00:21:12.000
<v Speaker 1>Okay, ees is chosen.

440
00:21:12.240 --> 00:21:15.160
<v Speaker 2>Then d D is the private exponent. It's calculated as

441
00:21:15.200 --> 00:21:19.400
<v Speaker 2>the modular multiplicative inverse of emodulo fn, meaning e D

442
00:21:19.640 --> 00:21:25.400
<v Speaker 2>mod fno one. Finding D efficiently typically uses the extended

443
00:21:25.400 --> 00:21:27.440
<v Speaker 2>Euclidean algorithm. Got it.

444
00:21:28.000 --> 00:21:30.720
<v Speaker 1>So knowing P and q makes finding D easy, but

445
00:21:30.799 --> 00:21:33.359
<v Speaker 1>without them it's hard because factoring N is hard.

446
00:21:33.480 --> 00:21:35.240
<v Speaker 2>Exactly. That's the core idea.

447
00:21:35.359 --> 00:21:37.960
<v Speaker 1>What are the ways attackers try to break RSA besides

448
00:21:38.039 --> 00:21:39.119
<v Speaker 1>just guessing keys?

449
00:21:39.400 --> 00:21:42.039
<v Speaker 2>Well? Brute forcing the key is infeasible if the key

450
00:21:42.079 --> 00:21:44.559
<v Speaker 2>is large enough. The main line of attack is mathematical.

451
00:21:44.599 --> 00:21:47.279
<v Speaker 2>Try to factor N. As computers get faster and factoring

452
00:21:47.319 --> 00:21:50.000
<v Speaker 2>algorithms improve RSA key sizes.

453
00:21:49.720 --> 00:21:51.319
<v Speaker 1>Need to increase any other attacks.

454
00:21:51.440 --> 00:21:54.200
<v Speaker 2>Yes, there are side channel attacks, like timing attacks, where

455
00:21:54.200 --> 00:21:57.119
<v Speaker 2>an attacker measures precisely how long decryption takes for different

456
00:21:57.119 --> 00:22:00.319
<v Speaker 2>cipher attexts. Variations in timing might leak information about the

457
00:22:00.319 --> 00:22:03.559
<v Speaker 2>private key. Defenses exist, but it's a concern.

458
00:22:03.680 --> 00:22:06.839
<v Speaker 1>This sounds like those trapdoor one way functions mentioned earlier.

459
00:22:07.119 --> 00:22:08.119
<v Speaker 1>What's the trap door here?

460
00:22:08.200 --> 00:22:11.599
<v Speaker 2>Precisely, a trapdoor one way function is easy to compute,

461
00:22:11.599 --> 00:22:14.200
<v Speaker 2>one way hard to reverse unless you have the secret

462
00:22:14.240 --> 00:22:15.240
<v Speaker 2>trapdoor information.

463
00:22:15.359 --> 00:22:17.039
<v Speaker 1>So in RSA encryption.

464
00:22:17.039 --> 00:22:21.319
<v Speaker 2>Mimod N is the easy forward direction. Reversing it finding

465
00:22:21.480 --> 00:22:24.640
<v Speaker 2>M from C without D is hard. The trap door

466
00:22:24.720 --> 00:22:26.720
<v Speaker 2>is the knowledge of the prime factors P and Q.

467
00:22:27.559 --> 00:22:29.559
<v Speaker 2>If you know P and Q, you can easily calculate

468
00:22:29.680 --> 00:22:32.599
<v Speaker 2>FN and then find D, opening the trap door and

469
00:22:32.640 --> 00:22:33.720
<v Speaker 2>making decryption easy.

470
00:22:33.880 --> 00:22:37.680
<v Speaker 1>Okay, Beyond RSA, what other public key systems are important?

471
00:22:37.759 --> 00:22:41.680
<v Speaker 2>Diffey Helman key exchange is fundamental. It's not for encryption itself,

472
00:22:41.799 --> 00:22:44.119
<v Speaker 2>but it lets two parties agree on a shared secret

473
00:22:44.200 --> 00:22:47.920
<v Speaker 2>key over an insecure channel without any prior secrets. Wow.

474
00:22:48.039 --> 00:22:51.519
<v Speaker 2>It uses modular exponentiation and the difficulty of the discrete

475
00:22:51.519 --> 00:22:54.400
<v Speaker 2>logarithm problem we talked about earlier. Each party mixes their

476
00:22:54.440 --> 00:22:57.839
<v Speaker 2>private number with a public base and modulus exchanges the results,

477
00:22:58.039 --> 00:23:00.279
<v Speaker 2>and then mixes the received value with their own private

478
00:23:00.319 --> 00:23:04.160
<v Speaker 2>number again. Magically, they both arrive at the same shared secret,

479
00:23:04.440 --> 00:23:06.279
<v Speaker 2>but an eavesdropper can't easily.

480
00:23:05.920 --> 00:23:07.880
<v Speaker 1>Compute it clever any others.

481
00:23:08.119 --> 00:23:12.039
<v Speaker 2>Elgamol is another system based on discrete logarithms, used for

482
00:23:12.079 --> 00:23:15.799
<v Speaker 2>both encryption and digital signatures. And then there's elliptic curve

483
00:23:15.839 --> 00:23:17.480
<v Speaker 2>cryptography ECC.

484
00:23:17.720 --> 00:23:19.799
<v Speaker 1>ECC is a big deal, now huge.

485
00:23:20.079 --> 00:23:24.079
<v Speaker 2>It provides security comparable to RSA, but with much smaller

486
00:23:24.119 --> 00:23:24.680
<v Speaker 2>key sizes.

487
00:23:24.759 --> 00:23:25.440
<v Speaker 1>Why is that good.

488
00:23:25.759 --> 00:23:29.519
<v Speaker 2>Smaller keys mean faster computations, less storage, less bandwidth needed.

489
00:23:29.960 --> 00:23:34.480
<v Speaker 2>That makes ECC ideal for resource constrained environments like mobile phones,

490
00:23:34.519 --> 00:23:37.799
<v Speaker 2>smart cards, IoT devices. It's based on the math of

491
00:23:37.839 --> 00:23:40.960
<v Speaker 2>elliptic curves over finite fields, which also leads to a

492
00:23:41.000 --> 00:23:42.960
<v Speaker 2>hard discrete logarithm like problem.

493
00:23:43.000 --> 00:23:47.119
<v Speaker 1>Okay, fascinating. Let's move to tryptographic hash functions. We touched

494
00:23:47.119 --> 00:23:49.680
<v Speaker 1>on them for signatures. What are their main properties?

495
00:23:49.799 --> 00:23:52.440
<v Speaker 2>Okay, hash functions they take an input of any size,

496
00:23:52.480 --> 00:23:54.400
<v Speaker 2>could be tiny, could be huge, and produce a fixed

497
00:23:54.440 --> 00:23:57.799
<v Speaker 2>size output. This output is the hash value or digest.

498
00:23:57.519 --> 00:23:59.480
<v Speaker 1>Fixed size output variable size input.

499
00:23:59.559 --> 00:24:02.759
<v Speaker 2>Got it properties? Easy to compute? The hash for any

500
00:24:02.759 --> 00:24:05.799
<v Speaker 2>input must be one way. Given just the hash, it's

501
00:24:05.839 --> 00:24:09.000
<v Speaker 2>infeasible to find the original input that's pre image resistance,

502
00:24:09.400 --> 00:24:13.680
<v Speaker 2>second pre image resistance. Given an input M one, it's

503
00:24:13.720 --> 00:24:16.319
<v Speaker 2>infeasible to find a different input M two that has

504
00:24:16.359 --> 00:24:20.799
<v Speaker 2>the same hash and collision resistance. It's infeasible to find

505
00:24:20.839 --> 00:24:23.119
<v Speaker 2>any two different inputs M one and M two that

506
00:24:23.240 --> 00:24:24.279
<v Speaker 2>hash to the same value.

507
00:24:24.359 --> 00:24:27.039
<v Speaker 1>Collision resistance sounds like the hardest property to achieve.

508
00:24:27.240 --> 00:24:30.039
<v Speaker 2>It generally is yeah, and good hash functions should also

509
00:24:30.079 --> 00:24:33.559
<v Speaker 2>make the output look random and spread inputs evenly across

510
00:24:33.559 --> 00:24:34.559
<v Speaker 2>the possible outputs.

511
00:24:34.640 --> 00:24:38.400
<v Speaker 1>So the goal isn't secrecy but integrity exactly.

512
00:24:38.599 --> 00:24:41.799
<v Speaker 2>The main purpose is data integrity. A hash acts like

513
00:24:41.799 --> 00:24:44.640
<v Speaker 2>a digital fingerprint, or check them for data. If you

514
00:24:44.720 --> 00:24:47.839
<v Speaker 2>change the data even slightly, the hash value will change completely,

515
00:24:48.000 --> 00:24:50.079
<v Speaker 2>hopefully so you can detect tampering.

516
00:24:50.400 --> 00:24:52.519
<v Speaker 1>How hard is it to brout force. A hash function

517
00:24:52.799 --> 00:24:54.400
<v Speaker 1>like finding a collision.

518
00:24:54.279 --> 00:24:56.000
<v Speaker 2>It depends on the output size of the hash. Let's

519
00:24:56.000 --> 00:24:56.480
<v Speaker 2>say embits.

520
00:24:56.559 --> 00:24:56.759
<v Speaker 1>Yeah.

521
00:24:56.799 --> 00:24:59.400
<v Speaker 2>Finding a pre image original input from hash takes roughly

522
00:24:59.400 --> 00:25:02.839
<v Speaker 2>two and uper on average, but finding a collision due

523
00:25:02.839 --> 00:25:06.160
<v Speaker 2>to the birthday paradox. The birthday paradox, yeah, the probability puzzle.

524
00:25:06.440 --> 00:25:09.039
<v Speaker 2>It means finding any two inputs that collide is much

525
00:25:09.039 --> 00:25:12.000
<v Speaker 2>easier than fighting an input. For a specific hash, it

526
00:25:12.039 --> 00:25:13.839
<v Speaker 2>only takes about two and two operations.

527
00:25:14.039 --> 00:25:16.319
<v Speaker 1>So for a two hundred and fifty six bit hash,

528
00:25:16.559 --> 00:25:19.400
<v Speaker 1>collisions take around two hundred and one hundred and twenty

529
00:25:19.400 --> 00:25:20.079
<v Speaker 1>eight steps.

530
00:25:20.200 --> 00:25:24.720
<v Speaker 2>Right, still astronomically large and infeasible for current computers, which

531
00:25:24.759 --> 00:25:27.440
<v Speaker 2>is why we use hashes like Saha two forty six.

532
00:25:27.680 --> 00:25:30.519
<v Speaker 1>Speaking of Saha, we saw SAHA five to twelve mention.

533
00:25:30.680 --> 00:25:31.880
<v Speaker 1>How does it work? Internally?

534
00:25:32.000 --> 00:25:35.519
<v Speaker 2>Roughly, Saha five twelve is part of the SAHA two family.

535
00:25:35.559 --> 00:25:38.920
<v Speaker 2>It's iterative. It processes the input message in big chunks

536
00:25:38.920 --> 00:25:41.680
<v Speaker 2>one hundred and twenty four bit blocks. It pads the

537
00:25:41.680 --> 00:25:44.720
<v Speaker 2>message so its length is right, and crucially, it includes

538
00:25:44.759 --> 00:25:48.039
<v Speaker 2>the original message link in the final processing steps. This

539
00:25:48.079 --> 00:25:51.200
<v Speaker 2>prevents certain attacks and in it uses the compression function.

540
00:25:51.519 --> 00:25:53.839
<v Speaker 2>This function takes the current message block and the result

541
00:25:53.839 --> 00:25:56.519
<v Speaker 2>from the previous blocks processing, mixes them up through a

542
00:25:56.519 --> 00:25:59.279
<v Speaker 2>series of complex operations eighty rounds for SAHA five to

543
00:25:59.319 --> 00:26:02.599
<v Speaker 2>twelve and produces a new intermediate hash value. This repeats

544
00:26:02.640 --> 00:26:03.279
<v Speaker 2>for all blocks.

545
00:26:03.519 --> 00:26:04.720
<v Speaker 1>Lots of mixing and churning.

546
00:26:04.799 --> 00:26:07.240
<v Speaker 2>Yeah, designed to ensure that every input bit affects many

547
00:26:07.279 --> 00:26:10.160
<v Speaker 2>output bits, making it hard to reverse or re find collisions.

548
00:26:10.200 --> 00:26:12.440
<v Speaker 1>And then there's SAHA three different design.

549
00:26:12.359 --> 00:26:15.680
<v Speaker 2>Very different. Saha three came out of a NIS competition

550
00:26:16.000 --> 00:26:19.400
<v Speaker 2>looking for a hash function with a fundamentally different structure

551
00:26:19.440 --> 00:26:22.920
<v Speaker 2>than SAHA one and SAHA two, just in case weaknesses

552
00:26:22.920 --> 00:26:23.920
<v Speaker 2>were found in that approach.

553
00:26:24.119 --> 00:26:25.839
<v Speaker 1>And it uses the sponge construction.

554
00:26:26.160 --> 00:26:28.400
<v Speaker 2>That's right. Think about like a sponge. It has an

555
00:26:28.440 --> 00:26:31.960
<v Speaker 2>internal state. In the absorbing phase, you feed the input

556
00:26:32.039 --> 00:26:35.119
<v Speaker 2>message blocks into the state, mixing them in. Then in

557
00:26:35.160 --> 00:26:38.400
<v Speaker 2>the squeezing phase, you squeeze out the hash output bits

558
00:26:38.400 --> 00:26:39.000
<v Speaker 2>from the state.

559
00:26:39.359 --> 00:26:41.319
<v Speaker 1>Interesting metaphor what does the mixing?

560
00:26:41.519 --> 00:26:45.440
<v Speaker 2>It uses a complex internal permutation function called kec apha.

561
00:26:45.960 --> 00:26:49.400
<v Speaker 2>This permutation involves several steps per round, things called theta row,

562
00:26:50.000 --> 00:26:53.640
<v Speaker 2>pie Chi and iota. She is the main nonlinear step

563
00:26:53.720 --> 00:26:57.400
<v Speaker 2>Pie rearranges bits, IOTA adds constants to break symmetry. It's

564
00:26:57.400 --> 00:27:00.839
<v Speaker 2>a very different way of scrambling the data compared to SAHA. Okay.

565
00:27:01.039 --> 00:27:04.440
<v Speaker 1>Now, Message authentication codes mcs. How do they relate to

566
00:27:04.480 --> 00:27:05.960
<v Speaker 1>hashes but add authentication?

567
00:27:06.519 --> 00:27:10.279
<v Speaker 2>Right? Both deal with integrity, but a MEMC as authentication

568
00:27:10.640 --> 00:27:12.039
<v Speaker 2>by involving a secret key.

569
00:27:12.240 --> 00:27:14.279
<v Speaker 1>A secret key a MA.

570
00:27:14.599 --> 00:27:17.759
<v Speaker 2>Is generated using a secret KEYK that's shared only between

571
00:27:17.759 --> 00:27:22.160
<v Speaker 2>the sender and receiver. The sender computes MAAC equals function

572
00:27:22.519 --> 00:27:26.319
<v Speaker 2>ok message. They send the message and the MAC and

573
00:27:26.359 --> 00:27:28.720
<v Speaker 2>the receiver. The receiver gets the message in the MAAC.

574
00:27:29.160 --> 00:27:31.880
<v Speaker 2>They know the secret KEYK, so they recompute the MAC

575
00:27:32.000 --> 00:27:35.480
<v Speaker 2>on the received message using K. If they're calculated, MA

576
00:27:35.480 --> 00:27:39.200
<v Speaker 2>matches the received MAC. They know two things, which are one,

577
00:27:39.319 --> 00:27:43.319
<v Speaker 2>the message hasn't been altered integrity. Two, the message must

578
00:27:43.319 --> 00:27:46.240
<v Speaker 2>have come from someone who knows the secret KEYK authentication.

579
00:27:46.400 --> 00:27:48.960
<v Speaker 1>So the key is the crucial difference from a plane

580
00:27:49.000 --> 00:27:50.000
<v Speaker 1>hash exactly.

581
00:27:50.319 --> 00:27:53.039
<v Speaker 2>An attacker without the key can't forge a valid MAC

582
00:27:53.200 --> 00:27:55.599
<v Speaker 2>for a modified message, nor can they pretend to be

583
00:27:55.640 --> 00:27:56.079
<v Speaker 2>the sender.

584
00:27:56.200 --> 00:27:59.480
<v Speaker 1>We saw HMAC and CMA mention specific type.

585
00:27:59.599 --> 00:28:03.319
<v Speaker 2>Yes, HMAC stands for hash base MAS it's a very

586
00:28:03.319 --> 00:28:06.319
<v Speaker 2>popular standard that uses a regular cryptographic hash function like

587
00:28:06.480 --> 00:28:09.039
<v Speaker 2>SAHA two five six combined with the secret key in

588
00:28:09.079 --> 00:28:12.720
<v Speaker 2>a specific double hashing construction. Its security has proven relative

589
00:28:12.720 --> 00:28:15.920
<v Speaker 2>to the underlying hash function. Okay and c CMAC is

590
00:28:16.039 --> 00:28:19.759
<v Speaker 2>cipher based MC. It uses a block cipher like AES

591
00:28:19.920 --> 00:28:23.200
<v Speaker 2>instead of hash function. It processes the message in blocks

592
00:28:23.279 --> 00:28:26.640
<v Speaker 2>using the secret key with special handling for the last block.

593
00:28:26.880 --> 00:28:29.720
<v Speaker 1>And authenticated encryption AE combining things.

594
00:28:29.559 --> 00:28:34.240
<v Speaker 2>Yeah AE or AED Authenticated encryption with associated data aims

595
00:28:34.240 --> 00:28:40.119
<v Speaker 2>to provide both confidentiality encryption and integrity authentication simultaneously in

596
00:28:40.200 --> 00:28:41.440
<v Speaker 2>one integrated.

597
00:28:40.960 --> 00:28:43.079
<v Speaker 1>Algorithm, more efficient, more secure.

598
00:28:42.839 --> 00:28:45.680
<v Speaker 2>Often both. Doing them together can avoid subtle errors that

599
00:28:45.720 --> 00:28:49.920
<v Speaker 2>might arise from combining separate encryption and am mag algorithms incorrectly.

600
00:28:50.480 --> 00:28:54.200
<v Speaker 2>GCM Gellois counter mode is a very widely used AAD

601
00:28:54.359 --> 00:28:55.400
<v Speaker 2>mode based.

602
00:28:55.119 --> 00:28:59.240
<v Speaker 1>On AES okay now digital signatures building on hashes and

603
00:28:59.279 --> 00:28:59.920
<v Speaker 1>public keys.

604
00:29:00.440 --> 00:29:03.839
<v Speaker 2>Digital signatures give us integrity and authentication like MC's, but

605
00:29:03.880 --> 00:29:06.480
<v Speaker 2>they use public key crypto. This adds a crucial.

606
00:29:06.119 --> 00:29:07.599
<v Speaker 1>Third property, non repudiation.

607
00:29:07.839 --> 00:29:09.519
<v Speaker 2>Non repudiation meaning.

608
00:29:09.480 --> 00:29:12.160
<v Speaker 1>Meaning the sender cannot later deny having sent the message

609
00:29:12.200 --> 00:29:15.279
<v Speaker 1>because creating the signature requires their unique private key, which

610
00:29:15.279 --> 00:29:16.279
<v Speaker 1>only they should possess.

611
00:29:16.319 --> 00:29:19.359
<v Speaker 2>How does it work. Defender takes the message, hashes it

612
00:29:19.400 --> 00:29:22.880
<v Speaker 2>to get a short digest, then they sign this hash

613
00:29:23.279 --> 00:29:28.119
<v Speaker 2>by encrypting it with their private key. This encrypted hash

614
00:29:28.359 --> 00:29:31.440
<v Speaker 2>is the digital signature attached to the message and verification.

615
00:29:31.759 --> 00:29:34.839
<v Speaker 2>Anyone can verify it using the sender's public key. The

616
00:29:34.880 --> 00:29:38.359
<v Speaker 2>receiver decrypts the signature using the sender's public key. This

617
00:29:38.440 --> 00:29:41.880
<v Speaker 2>recovers the original hash as computed by the sender. They

618
00:29:41.920 --> 00:29:45.039
<v Speaker 2>also independently compute the hash of the message they received.

619
00:29:45.480 --> 00:29:47.200
<v Speaker 2>If the two hashes match.

620
00:29:47.039 --> 00:29:48.559
<v Speaker 1>Then it's verified exactly.

621
00:29:48.960 --> 00:29:51.720
<v Speaker 2>It proves the message hasn't been altered since signing integrity,

622
00:29:52.079 --> 00:29:53.680
<v Speaker 2>and it proves it was signed by the owner of

623
00:29:53.720 --> 00:29:56.359
<v Speaker 2>that private key. Authentication and non repudiation.

624
00:29:56.519 --> 00:29:59.680
<v Speaker 1>So private key signs public key verifies opposite of public

625
00:29:59.759 --> 00:30:00.839
<v Speaker 1>key and encryption correct.

626
00:30:00.880 --> 00:30:04.640
<v Speaker 2>We saw dsa digital signature algorithm mentioned based on discrete

627
00:30:04.680 --> 00:30:09.519
<v Speaker 2>logs and RSAPSS. A more modern probabilistic scheme for RSA

628
00:30:09.640 --> 00:30:12.920
<v Speaker 2>signatures that adds randomness for better security uses something called

629
00:30:12.920 --> 00:30:16.920
<v Speaker 2>a mass generation function MGF. Yeah, hash based signatures like

630
00:30:17.000 --> 00:30:20.200
<v Speaker 2>lamport signatures exist too, though less common for general use.

631
00:30:20.240 --> 00:30:24.440
<v Speaker 2>They have different properties like being potentially resistant to quantum computers.

632
00:30:24.519 --> 00:30:27.960
<v Speaker 1>Okay, all this crypto realizes on keys. Key management and

633
00:30:27.960 --> 00:30:31.920
<v Speaker 1>distribution sounds like a major headache, especially for symmetric keys.

634
00:30:32.160 --> 00:30:34.440
<v Speaker 2>It's a huge challenge. How do you securely get that

635
00:30:34.519 --> 00:30:37.359
<v Speaker 2>shared secret key to everyone who needs it without it

636
00:30:37.519 --> 00:30:42.880
<v Speaker 2>being intercepted? Physical delivery trusted couriers doesn't scale well if

637
00:30:42.880 --> 00:30:46.279
<v Speaker 2>you have a large group managing individual keys between every

638
00:30:46.319 --> 00:30:50.000
<v Speaker 2>pair becomes unmanageable and non two keys. Yeah. This leads

639
00:30:50.000 --> 00:30:51.160
<v Speaker 2>to ideas like key.

640
00:30:50.960 --> 00:30:52.880
<v Speaker 1>Hierarchies, key hierarchies.

641
00:30:52.960 --> 00:30:55.640
<v Speaker 2>Yeah, you might have a masterp that's protected very carefully.

642
00:30:55.960 --> 00:30:58.559
<v Speaker 2>This master key is used only to encrypt other keys,

643
00:30:58.759 --> 00:31:02.160
<v Speaker 2>maybe session keys or key encryption keys kyks, which are

644
00:31:02.200 --> 00:31:05.480
<v Speaker 2>then used for actual data encryption. Limits the exposure of

645
00:31:05.519 --> 00:31:06.440
<v Speaker 2>the most critical key.

646
00:31:06.599 --> 00:31:10.200
<v Speaker 1>How does public key crypto help distribute symmetric keys.

647
00:31:10.400 --> 00:31:13.720
<v Speaker 2>It provides a great solution. If Alice wants to communicate

648
00:31:13.759 --> 00:31:18.240
<v Speaker 2>securely with Bob using fast symmetric encryption, she can generate

649
00:31:18.279 --> 00:31:22.200
<v Speaker 2>a temporary symmetric session key, Then she encrypts that session

650
00:31:22.279 --> 00:31:24.119
<v Speaker 2>key using Bob's public key.

651
00:31:24.599 --> 00:31:24.920
<v Speaker 1>Ah.

652
00:31:25.440 --> 00:31:29.039
<v Speaker 2>She sends this encrypted session key to Bob only Bob

653
00:31:29.359 --> 00:31:32.839
<v Speaker 2>with his private key, can decrypt it. Now, Alice and

654
00:31:32.880 --> 00:31:35.200
<v Speaker 2>Bob share a symmetric langing key they can use for

655
00:31:35.240 --> 00:31:36.400
<v Speaker 2>their conversation.

656
00:31:36.119 --> 00:31:38.480
<v Speaker 1>But you need to trust the public key absolutely.

657
00:31:38.640 --> 00:31:41.440
<v Speaker 2>If Mallory can trick Alice into using Mallory's public key

658
00:31:41.440 --> 00:31:44.319
<v Speaker 2>instead of Bob's a man in the middle attack, then

659
00:31:44.480 --> 00:31:48.880
<v Speaker 2>Mallory can decrypt the session key. So authenticating the public key.

660
00:31:48.720 --> 00:31:52.079
<v Speaker 1>Is vital, which brings us to distributing public keys. How's

661
00:31:52.079 --> 00:31:52.839
<v Speaker 1>that done? Safely?

662
00:31:53.039 --> 00:31:56.400
<v Speaker 2>Several ways? Simplest is just public announcement here's my key,

663
00:31:56.799 --> 00:31:59.920
<v Speaker 2>but very vulnerable to forgery. You could use a trusted

664
00:32:00.079 --> 00:32:04.319
<v Speaker 2>third party like a key distribution center KDC, but everyone

665
00:32:04.359 --> 00:32:06.640
<v Speaker 2>has to trust the KDC. The most common approach now

666
00:32:06.720 --> 00:32:07.319
<v Speaker 2>is public key.

667
00:32:07.240 --> 00:32:09.200
<v Speaker 1>Certificates like digital ID cards.

668
00:32:09.480 --> 00:32:12.759
<v Speaker 2>Essentially, yes, a certificate binds a public key to an

669
00:32:12.759 --> 00:32:15.960
<v Speaker 2>identity like a person or a website. It contains the

670
00:32:15.960 --> 00:32:19.559
<v Speaker 2>public key, information about the owner, validity period, et cetera,

671
00:32:20.079 --> 00:32:23.759
<v Speaker 2>and it's all digitally signed by a trusted certification authority

672
00:32:24.160 --> 00:32:24.839
<v Speaker 2>or CAA.

673
00:32:24.960 --> 00:32:27.720
<v Speaker 1>So you trust the CAA, therefore you trust the key

674
00:32:27.759 --> 00:32:28.640
<v Speaker 1>in the certificate.

675
00:32:28.720 --> 00:32:31.519
<v Speaker 2>That's the idea we saw X point five zero nine

676
00:32:31.599 --> 00:32:34.839
<v Speaker 2>mentioned that's the standard format for these certificates. They list

677
00:32:34.920 --> 00:32:39.640
<v Speaker 2>key elements like version, serial number, issuer, subject, public key info,

678
00:32:39.920 --> 00:32:42.279
<v Speaker 2>validy period, and the CAA signature.

679
00:32:42.839 --> 00:32:45.160
<v Speaker 1>And this whole system of CAAs and certificates is the

680
00:32:45.200 --> 00:32:46.880
<v Speaker 1>public key Infrastructure PKI.

681
00:32:47.079 --> 00:32:51.440
<v Speaker 2>Exactly. PKI is a whole ecosystem, the CAAs policies, procedures

682
00:32:51.480 --> 00:32:56.319
<v Speaker 2>software for managing these digital certificates throughout their life cycle, creation, distribution, revocation,

683
00:32:56.400 --> 00:32:59.160
<v Speaker 2>et cetera. It's how we establish trust in public keys online.

684
00:32:59.319 --> 00:33:02.200
<v Speaker 2>Sometimes you see certificate chains where one CAA certifies another

685
00:33:02.480 --> 00:33:04.400
<v Speaker 2>leading back to a trusted root CAA okay.

686
00:33:04.599 --> 00:33:08.759
<v Speaker 1>Establishing secure sessions often need specific protocols, like for key exchange.

687
00:33:08.799 --> 00:33:09.759
<v Speaker 1>What's important there?

688
00:33:09.880 --> 00:33:12.640
<v Speaker 2>The main goal is for two parties to securely agree

689
00:33:12.799 --> 00:33:16.880
<v Speaker 2>on a temporary secret key, a session key for symmetric encryption.

690
00:33:17.559 --> 00:33:20.240
<v Speaker 2>We already saw how basic public key encryption of a

691
00:33:20.319 --> 00:33:22.880
<v Speaker 2>session key can be vulnerable to man in the middle

692
00:33:22.920 --> 00:33:26.119
<v Speaker 2>attacks if the public key isn't authenticated.

693
00:33:25.559 --> 00:33:27.200
<v Speaker 1>So protocols need to prevent that.

694
00:33:27.440 --> 00:33:32.599
<v Speaker 2>Yes, good key establishment protocols often involve challenges nonss. Those

695
00:33:32.640 --> 00:33:36.240
<v Speaker 2>numbers use only once to prevent replay attacks, and ways

696
00:33:36.240 --> 00:33:39.759
<v Speaker 2>to authenticate the parties involved, perhaps using long term keys

697
00:33:39.839 --> 00:33:43.799
<v Speaker 2>or certificates, or involving trusted third parties. They need to

698
00:33:43.839 --> 00:33:46.839
<v Speaker 2>be carefully designed to resist various clever attacks.

699
00:33:46.960 --> 00:33:51.079
<v Speaker 1>Okay, let's shift to user authentication verifying identities online.

700
00:33:51.119 --> 00:33:54.680
<v Speaker 2>Basic principles, authentication is confirming someone is who they claim

701
00:33:54.720 --> 00:33:58.279
<v Speaker 2>to be. Usually two steps. Identification user says who they

702
00:33:58.319 --> 00:34:01.279
<v Speaker 2>are look a username, and verification user proves it like

703
00:34:01.319 --> 00:34:04.680
<v Speaker 2>with a password, fingerprint, or a key. Digital authentication uses

704
00:34:04.720 --> 00:34:06.640
<v Speaker 2>digital means for that verification step.

705
00:34:06.759 --> 00:34:09.440
<v Speaker 1>How can symmetric encryption be used for remote authentication?

706
00:34:09.880 --> 00:34:13.599
<v Speaker 2>Often through challenge response protocols. The server sends a random

707
00:34:13.679 --> 00:34:17.519
<v Speaker 2>challenge like a random number to the client. The client

708
00:34:17.639 --> 00:34:20.679
<v Speaker 2>encrypts that challenge using a secret key they share only

709
00:34:20.719 --> 00:34:24.039
<v Speaker 2>with the server. Huh. The client sends the encrypted response back.

710
00:34:24.960 --> 00:34:29.320
<v Speaker 2>The server, knowing the shared key, decrypts the response if

711
00:34:29.360 --> 00:34:32.519
<v Speaker 2>it matches the original challenge. The server knows the client

712
00:34:32.599 --> 00:34:36.360
<v Speaker 2>possesses the secret key, thus authenticating them without sending the

713
00:34:36.440 --> 00:34:37.880
<v Speaker 2>key itself over the network.

714
00:34:38.280 --> 00:34:41.880
<v Speaker 1>And asymmetric encryption for authentication.

715
00:34:41.559 --> 00:34:44.559
<v Speaker 2>Usually involves digital signatures and certificates. A client might sign

716
00:34:44.599 --> 00:34:47.280
<v Speaker 2>a challenge from the server using their private key. The

717
00:34:47.320 --> 00:34:50.880
<v Speaker 2>server verifies the signature using the client's public key obtained

718
00:34:50.880 --> 00:34:54.199
<v Speaker 2>from their certificate. This can be one way server authenticates

719
00:34:54.239 --> 00:34:56.800
<v Speaker 2>client or mutual they both authenticate each other.

720
00:34:56.880 --> 00:35:00.840
<v Speaker 1>Kerberos was mentioned widely used, especially in corporate networks.

721
00:35:01.119 --> 00:35:04.719
<v Speaker 2>Very widely used. Cordero's uses a trusted third party, the

722
00:35:04.840 --> 00:35:09.480
<v Speaker 2>Key Distribution Center KDC, and symmetric key crypto. It avoids

723
00:35:09.519 --> 00:35:12.079
<v Speaker 2>sending passwords across the network in plaintext.

724
00:35:12.320 --> 00:35:13.079
<v Speaker 1>How does it work?

725
00:35:13.199 --> 00:35:16.639
<v Speaker 2>Roughly, a user logs in authenticates once to the KDC.

726
00:35:17.280 --> 00:35:20.000
<v Speaker 2>The KDC gives them a special encrypted ticket called a

727
00:35:20.119 --> 00:35:24.599
<v Speaker 2>Ticket Granting Ticket PGT. When the user wants to access

728
00:35:24.599 --> 00:35:27.519
<v Speaker 2>a network service like a file server, they present the

729
00:35:27.559 --> 00:35:32.679
<v Speaker 2>TGT to the kdc's Ticket Granting Service PGS and request

730
00:35:32.679 --> 00:35:36.159
<v Speaker 2>a service ticket for that specific service. The TGS gives

731
00:35:36.159 --> 00:35:39.039
<v Speaker 2>them an encrypted service ticket. The user presents this ticket

732
00:35:39.039 --> 00:35:42.519
<v Speaker 2>to the actual service, proving they've been authenticated by the KDC.

733
00:35:43.360 --> 00:35:45.800
<v Speaker 2>Versions four and five to find the details. It also

734
00:35:45.840 --> 00:35:49.719
<v Speaker 2>supports inter realm authentication connecting different Carbero's domains.

735
00:35:49.880 --> 00:35:53.079
<v Speaker 1>What about federated identity management sounds useful?

736
00:35:53.159 --> 00:35:55.880
<v Speaker 2>It is. It lets users use one set of credentials,

737
00:35:55.920 --> 00:35:58.840
<v Speaker 2>like one log in to access services across multiple different

738
00:35:58.920 --> 00:36:00.800
<v Speaker 2>organizations or domain that trust each.

739
00:36:00.679 --> 00:36:02.599
<v Speaker 1>Other single sign on across different websites.

740
00:36:02.760 --> 00:36:05.559
<v Speaker 2>Essentially, yes, yes, you authenticate once with your home identity

741
00:36:05.559 --> 00:36:08.599
<v Speaker 2>provider and then other service providers in the federation trust

742
00:36:08.599 --> 00:36:12.360
<v Speaker 2>that authentication saves users from managing dozens of passwords and

743
00:36:12.400 --> 00:36:13.800
<v Speaker 2>improve security if done right.

744
00:36:13.920 --> 00:36:17.199
<v Speaker 1>Okay, let's move down the stack to transport level security

745
00:36:17.800 --> 00:36:22.079
<v Speaker 1>TLS SSSL SSH. What security do they provide?

746
00:36:22.239 --> 00:36:25.960
<v Speaker 2>TLS Transport layer security, the successor to SSL, is a

747
00:36:26.000 --> 00:36:30.280
<v Speaker 2>foundation for HTTPS. It provides secure communication between two applications

748
00:36:30.280 --> 00:36:37.360
<v Speaker 2>over a network, usually TCP key goals confidentiality, encryption, integrity,

749
00:36:37.519 --> 00:36:42.960
<v Speaker 2>detecting tampering, and often authentication verifying server identity sometimes client identity.

750
00:36:43.239 --> 00:36:47.519
<v Speaker 2>SSH SSH secure show is mainly for secure remote log

751
00:36:47.519 --> 00:36:51.880
<v Speaker 2>in and command execution, plus secure file transfers SFTP and tunneling

752
00:36:52.199 --> 00:36:56.320
<v Speaker 2>similar goals confidentiality, integrity, and server authentication.

753
00:36:56.480 --> 00:36:58.719
<v Speaker 1>What's the basic architecture of TLS.

754
00:36:58.800 --> 00:37:01.599
<v Speaker 2>It's layered at the bottom is the TLS Record protocol.

755
00:37:01.800 --> 00:37:05.199
<v Speaker 2>It handles fragmentation, optional compression, encryption, and adds a may

756
00:37:05.280 --> 00:37:07.159
<v Speaker 2>see for integrity to the application data.

757
00:37:07.239 --> 00:37:08.159
<v Speaker 1>Okay, I above that.

758
00:37:08.320 --> 00:37:10.679
<v Speaker 2>Above that set several protocols. The most important is the

759
00:37:10.679 --> 00:37:13.559
<v Speaker 2>TLS handshake protocol. This is where the client and server

760
00:37:13.679 --> 00:37:17.960
<v Speaker 2>negotiates security parameters, exchange certificates, and establish the shared secret

761
00:37:18.000 --> 00:37:20.880
<v Speaker 2>keys for this session. There's also a change cipherspect protocol

762
00:37:20.920 --> 00:37:23.440
<v Speaker 2>to signal when the negotiated parameters become active, and an

763
00:37:23.480 --> 00:37:24.400
<v Speaker 2>alert protocol for.

764
00:37:24.440 --> 00:37:28.440
<v Speaker 1>Errors That handshake sounds critical. What are the main steps?

765
00:37:28.639 --> 00:37:31.559
<v Speaker 2>It's a back and forth conversation. Starts with a client Hello,

766
00:37:32.280 --> 00:37:35.920
<v Speaker 2>TLS version, supported random number, list of cipher suites.

767
00:37:35.960 --> 00:37:40.400
<v Speaker 1>The client likes cipher suites like combinations of algorithms.

768
00:37:39.840 --> 00:37:44.840
<v Speaker 2>Exactly encryption algorithm, key exchange method MAC algorithm. The server

769
00:37:44.920 --> 00:37:49.079
<v Speaker 2>responds with the server Hello, chosen version, chosen cipher suite,

770
00:37:49.079 --> 00:37:52.800
<v Speaker 2>its own random number, and crucially, its digital certificate.

771
00:37:52.440 --> 00:37:56.519
<v Speaker 1>Usually so the client can verify the server's identity right right.

772
00:37:56.719 --> 00:37:59.119
<v Speaker 2>The server might also requests the client certificate if client

773
00:37:59.199 --> 00:38:03.840
<v Speaker 2>authentication is it then comes the key exchange phase using RSA, Diffie,

774
00:38:03.840 --> 00:38:06.760
<v Speaker 2>Hellman or newer methods based on the chosen cyphersuite, where

775
00:38:06.760 --> 00:38:09.639
<v Speaker 2>they securely agree on a shared pre master secret okay.

776
00:38:09.800 --> 00:38:12.000
<v Speaker 2>This pre master secret is used to derive the actual

777
00:38:12.239 --> 00:38:15.639
<v Speaker 2>symmetric encryption keys and MBank keys for the session. Finally,

778
00:38:15.679 --> 00:38:18.719
<v Speaker 2>both send encrypted finished messages to confirm the handshake work,

779
00:38:19.039 --> 00:38:20.400
<v Speaker 2>and they derive the same keys.

780
00:38:20.559 --> 00:38:23.320
<v Speaker 1>Complex stance and SSH. How does it set up its

781
00:38:23.320 --> 00:38:24.079
<v Speaker 1>secure channel?

782
00:38:24.400 --> 00:38:28.480
<v Speaker 2>SSH also has layers. A transport layer protocol handles server authentication,

783
00:38:28.920 --> 00:38:33.599
<v Speaker 2>usually via host keys. The client checks, negotiates encryption integrity algorithms,

784
00:38:33.960 --> 00:38:37.840
<v Speaker 2>and performs the key exchange, often Diffie Hellman. Once the

785
00:38:37.880 --> 00:38:40.960
<v Speaker 2>secure channel is up, a user authentication protocol verifies the

786
00:38:40.960 --> 00:38:44.440
<v Speaker 2>client user password, public key, etc. Then the connection protocol

787
00:38:44.519 --> 00:38:48.599
<v Speaker 2>multiplexes different logical channels shale session file transfer over that

788
00:38:48.679 --> 00:38:49.480
<v Speaker 2>encrypted tunnel.

789
00:38:49.639 --> 00:38:52.599
<v Speaker 1>Let's switch to wireless network security Wi Fi? What makes

790
00:38:52.639 --> 00:38:53.639
<v Speaker 1>it inherently risky?

791
00:38:53.800 --> 00:38:57.119
<v Speaker 2>Broadcasting over the air radio waves go everywhere, easily intercepted

792
00:38:57.119 --> 00:39:01.639
<v Speaker 2>by anyone nearby, so main risks eavesdropping, message alteration or injection,

793
00:39:02.039 --> 00:39:05.239
<v Speaker 2>and denial of service. The client, the access point, the

794
00:39:05.280 --> 00:39:07.400
<v Speaker 2>airwaves all potential points of attack.

795
00:39:07.559 --> 00:39:10.559
<v Speaker 1>So how do we protect Wi Fi? WPA two WPA

796
00:39:10.679 --> 00:39:11.320
<v Speaker 1>three right.

797
00:39:11.360 --> 00:39:14.280
<v Speaker 2>The IE eighth two point one one I standard defines

798
00:39:14.360 --> 00:39:17.679
<v Speaker 2>modern Wi Fi security, implemented as WPA two and the

799
00:39:17.679 --> 00:39:22.000
<v Speaker 2>newer stronger WPA three. They provide key capabilities, strong authentication,

800
00:39:22.199 --> 00:39:26.360
<v Speaker 2>making sure only authorized devices join confidentiality using robust encryption

801
00:39:26.480 --> 00:39:29.519
<v Speaker 2>like AES and integrity preventing data tampering.

802
00:39:29.559 --> 00:39:30.679
<v Speaker 1>How does authentication work?

803
00:39:30.920 --> 00:39:34.280
<v Speaker 2>Often uses ie A two point one X and EAP

804
00:39:34.639 --> 00:39:39.360
<v Speaker 2>Extensible Authentication Protocol. This allows different authentication methods, often involving

805
00:39:39.400 --> 00:39:43.599
<v Speaker 2>a central authentication server, especially in enterprise networks. For home networks,

806
00:39:43.719 --> 00:39:47.000
<v Speaker 2>WPA two WPA three personal uses a pre shared key,

807
00:39:47.239 --> 00:39:50.559
<v Speaker 2>the Wi Fi password. WPA three improves on WPA two

808
00:39:50.559 --> 00:39:53.920
<v Speaker 2>with stronger key exchange and protection against offline dictionary attacks.

809
00:39:54.280 --> 00:39:57.480
<v Speaker 1>What about simpler things like hiding your network name SSID?

810
00:39:57.679 --> 00:39:58.239
<v Speaker 1>Does that help?

811
00:39:58.360 --> 00:40:01.880
<v Speaker 2>It adds a tiny bit of obscurity, maybe deters casual snooping,

812
00:40:02.360 --> 00:40:06.360
<v Speaker 2>but it's not real. Security tools can easily discover hidden SSIDs,

813
00:40:06.719 --> 00:40:09.559
<v Speaker 2>same with changing the default SSID name or maybe reducing

814
00:40:09.639 --> 00:40:13.559
<v Speaker 2>transmitter power. They're minor hurdles, not replacements for strong WPA

815
00:40:13.639 --> 00:40:16.320
<v Speaker 2>two WP three encryption with a strong unique password.

816
00:40:16.480 --> 00:40:20.280
<v Speaker 1>Mobile device security, phones, tablets unique challenges there.

817
00:40:20.039 --> 00:40:23.000
<v Speaker 2>Definitely, they're portable, easily lost or stolen. They connect to

818
00:40:23.079 --> 00:40:26.400
<v Speaker 2>untrusted networks frequently. They often mix perfonal and work data

819
00:40:26.800 --> 00:40:31.480
<v Speaker 2>key threats unauthorized data access, communication interception malware using a

820
00:40:31.480 --> 00:40:34.880
<v Speaker 2>compromise device to attack corporate networks. Security policies need to

821
00:40:34.880 --> 00:40:37.559
<v Speaker 2>assume devices can be compromised and address both company owned

822
00:40:37.559 --> 00:40:39.360
<v Speaker 2>and personal biod devices.

823
00:40:39.599 --> 00:40:46.039
<v Speaker 1>Okay. Electronic mail security SMAAM, SPF, d KIM making email safer.

824
00:40:46.280 --> 00:40:49.880
<v Speaker 2>Yeah. Email was originally designed without much security. Sm provides

825
00:40:49.960 --> 00:40:52.440
<v Speaker 2>end to end security for the email content. It uses

826
00:40:52.440 --> 00:40:56.679
<v Speaker 2>public key crypto for confidentiality, encryption using enveloped data format

827
00:40:57.159 --> 00:41:02.840
<v Speaker 2>and integrity authentication Digital signatures using signed data format needs certificates.

828
00:41:03.000 --> 00:41:06.079
<v Speaker 1>What about preventing email spoofing fake sender addresses?

829
00:41:06.159 --> 00:41:08.960
<v Speaker 2>That's where SPF and d KIM come. In SBFS sender

830
00:41:09.000 --> 00:41:11.760
<v Speaker 2>Policy framework, let's domain owners publish a list of servers

831
00:41:11.800 --> 00:41:14.599
<v Speaker 2>authorized to send email for their domain. Receiving source can

832
00:41:14.639 --> 00:41:17.800
<v Speaker 2>check this list okay and DKEM DKIM doing keys. Identified

833
00:41:17.800 --> 00:41:21.119
<v Speaker 2>mail adds a digital signature to outgoing emails tied to

834
00:41:21.119 --> 00:41:24.159
<v Speaker 2>the sending domain. Receiving servers can verify the signature using

835
00:41:24.199 --> 00:41:27.039
<v Speaker 2>a public key published in the domain's DNS records helps

836
00:41:27.039 --> 00:41:30.159
<v Speaker 2>confirm the email originated from that domain and wasn't altered.

837
00:41:30.119 --> 00:41:32.960
<v Speaker 1>And DN using DNSAC.

838
00:41:32.639 --> 00:41:37.119
<v Speaker 2>DAN DNS based authentication of named entities leverages the security

839
00:41:37.119 --> 00:41:41.960
<v Speaker 2>of dnssec secure DNS to help validate certificates. It allows

840
00:41:41.960 --> 00:41:45.400
<v Speaker 2>domain owners to publish information in DNS about the expected

841
00:41:45.440 --> 00:41:48.639
<v Speaker 2>certificates for their services, like TLS for mail servers or

842
00:41:48.760 --> 00:41:52.000
<v Speaker 2>seranim certificates. This can help detect man in the middle

843
00:41:52.039 --> 00:41:54.559
<v Speaker 2>attacks trying to present fake certificates just quickly.

844
00:41:54.559 --> 00:41:57.360
<v Speaker 1>The basic email architecture MUA's MTS.

845
00:41:57.639 --> 00:42:01.199
<v Speaker 2>MUA's mail user agents are your email clip Alliance Outlook webmail.

846
00:42:01.440 --> 00:42:04.239
<v Speaker 2>MTA's message transfer agents are the mail servers that relay

847
00:42:04.239 --> 00:42:08.480
<v Speaker 2>messages using SMTP Simple Mail Transfer Protocol. Users retrieve mail

848
00:42:08.480 --> 00:42:12.239
<v Speaker 2>from servers using protocols like IMP or POP. DNS is

849
00:42:12.320 --> 00:42:14.000
<v Speaker 2>used to find the right MTAs for a domain.

850
00:42:14.199 --> 00:42:18.159
<v Speaker 1>Okay, let's dive into IP security ip SC securing things

851
00:42:18.199 --> 00:42:19.079
<v Speaker 1>at the network layer.

852
00:42:19.199 --> 00:42:22.079
<v Speaker 2>Yes, IPsec operates at layer three. It provides a framework

853
00:42:22.119 --> 00:42:26.800
<v Speaker 2>for secure IP communication, confidentiality, integrity authentication between hosts or

854
00:42:26.840 --> 00:42:27.920
<v Speaker 2>between network gateways.

855
00:42:27.960 --> 00:42:32.280
<v Speaker 1>Like VPNs, use a Security Associations says fundamental concept.

856
00:42:32.760 --> 00:42:36.360
<v Speaker 2>NSA is a one way logical connection defining the security

857
00:42:36.400 --> 00:42:41.920
<v Speaker 2>services protocols, algorithms keys between two communicating entities. For two

858
00:42:41.960 --> 00:42:45.239
<v Speaker 2>way traffic, you usually need two essays, one in each direction.

859
00:42:46.000 --> 00:42:49.360
<v Speaker 2>Each SSAY has a unique identifier called the Security Parameter's

860
00:42:49.400 --> 00:42:51.239
<v Speaker 2>Index SPI, and.

861
00:42:51.159 --> 00:42:53.920
<v Speaker 1>The main ip SC protocols are AH and EESP.

862
00:42:54.119 --> 00:42:59.079
<v Speaker 2>Correct AH authentication header provides integrity and authentication for the

863
00:42:59.199 --> 00:43:02.840
<v Speaker 2>entire IP pack including parts of the header, but no encryption.

864
00:43:03.159 --> 00:43:07.199
<v Speaker 2>It protects against campering and spoofing. ESP encapsulating security payload

865
00:43:07.599 --> 00:43:11.400
<v Speaker 2>provides confidentiality by encrypting the IP payload. It can also

866
00:43:11.440 --> 00:43:14.960
<v Speaker 2>optionally provide integrity and authentication for the payload, but generally

867
00:43:14.960 --> 00:43:18.280
<v Speaker 2>not the outer ipheader. You can use ESP just for encryption,

868
00:43:18.480 --> 00:43:20.599
<v Speaker 2>or for both encryption and integrity authentication.

869
00:43:20.760 --> 00:43:22.519
<v Speaker 1>Transport mode versus tunnel.

870
00:43:22.239 --> 00:43:25.480
<v Speaker 2>Mode transport mode secure traffic directly between two end hosts.

871
00:43:25.880 --> 00:43:28.519
<v Speaker 2>The IPsec header is inserted between the original ipheader and

872
00:43:28.519 --> 00:43:31.800
<v Speaker 2>the payload, good for host to host. Security tunnel mode

873
00:43:31.920 --> 00:43:35.480
<v Speaker 2>encapsulates the entire original IP packet inside a new IP

874
00:43:35.599 --> 00:43:39.039
<v Speaker 2>packet with IP six protection. The original packet becomes the

875
00:43:39.039 --> 00:43:41.679
<v Speaker 2>payload of the new outer packet. This is used typically

876
00:43:41.719 --> 00:43:44.960
<v Speaker 2>between gateways like firewalls or routers to create a secure

877
00:43:45.079 --> 00:43:48.920
<v Speaker 2>VPN tunnel across an untrusted network like the Internet. Traffic

878
00:43:48.960 --> 00:43:51.679
<v Speaker 2>between networks protected by the gateways goes through the tunnel.

879
00:43:51.880 --> 00:43:54.360
<v Speaker 2>You can also combine essays like using both AH and

880
00:43:54.679 --> 00:43:56.480
<v Speaker 2>ESP in what's called an SA bundle.

881
00:43:56.880 --> 00:43:59.719
<v Speaker 1>And setting up these s is done by IKE. Internet

882
00:43:59.800 --> 00:44:00.400
<v Speaker 1>Key Exchange.

883
00:44:00.480 --> 00:44:03.239
<v Speaker 2>Yes. IKE versions one and two is the protocol used

884
00:44:03.280 --> 00:44:06.960
<v Speaker 2>to negotiate the IPS essays. It handles authentication of the peers,

885
00:44:07.199 --> 00:44:11.079
<v Speaker 2>negotiation of cryptographic algorithms, and generation and exchange of the

886
00:44:11.119 --> 00:44:14.280
<v Speaker 2>secret keys used by AH and ESP. It's quite complex,

887
00:44:14.440 --> 00:44:16.599
<v Speaker 2>involving multiple phases and message exchanges.

888
00:44:16.719 --> 00:44:22.960
<v Speaker 1>Okay, Moving up network Perimeter security firewalls, intrusion detection systems IDs.

889
00:44:23.039 --> 00:44:24.519
<v Speaker 1>What's the firewall's main job?

890
00:44:24.760 --> 00:44:27.199
<v Speaker 2>A firewall is like a gatekeeper for your network. It

891
00:44:27.280 --> 00:44:29.880
<v Speaker 2>sits at the perimeter and inspects incoming and outgoing traffic,

892
00:44:30.239 --> 00:44:33.360
<v Speaker 2>blocking anything that doesn't meet the configured security rules. Controls

893
00:44:33.400 --> 00:44:34.480
<v Speaker 2>access different types.

894
00:44:34.639 --> 00:44:35.880
<v Speaker 1>Packet filtering Yes.

895
00:44:36.559 --> 00:44:39.599
<v Speaker 2>Basic packet filters look at packet headers source to destination

896
00:44:39.679 --> 00:44:43.800
<v Speaker 2>IP ports and make simple allowed made decisions based on rules.

897
00:44:44.400 --> 00:44:47.719
<v Speaker 2>Stateful firewalls are smarter. They track the state of connections

898
00:44:47.880 --> 00:44:51.280
<v Speaker 2>so they can allow return traffic for connections initiated from inside.

899
00:44:51.280 --> 00:44:57.159
<v Speaker 2>For example, application level gateways proxies understand specific application protocols

900
00:44:57.199 --> 00:45:01.039
<v Speaker 2>like HTTP, FTP and can force much more granular policies.

901
00:45:01.119 --> 00:45:03.000
<v Speaker 1>We saw an example rule and its weakness.

902
00:45:03.119 --> 00:45:05.760
<v Speaker 2>Yeah, simple packet filters might just allow traffic to say

903
00:45:06.079 --> 00:45:09.599
<v Speaker 2>port eighty standard web without really knowing if it's legitimate

904
00:45:09.599 --> 00:45:14.320
<v Speaker 2>Web traffic. Stateful and application gateways provide better security. Often

905
00:45:14.360 --> 00:45:18.000
<v Speaker 2>networks use a DMZ demilitarized zone a DMZ a separate

906
00:45:18.000 --> 00:45:20.880
<v Speaker 2>network segment between the internal network and the Internet. You

907
00:45:20.920 --> 00:45:24.360
<v Speaker 2>put public facing servers web email in the DMZ. They're

908
00:45:24.400 --> 00:45:26.800
<v Speaker 2>accessible from the Internet, but traffic from the DMZ to

909
00:45:26.800 --> 00:45:29.679
<v Speaker 2>the internal network is heavily restricted by another firewall layer

910
00:45:30.159 --> 00:45:33.119
<v Speaker 2>protects the internal network. If a DMZ server gets compromised.

911
00:45:33.280 --> 00:45:35.400
<v Speaker 1>How do IDs fit in with firewalls?

912
00:45:35.559 --> 00:45:40.119
<v Speaker 2>Firewalls prevent IDs is detect an IDs monitors network traffic

913
00:45:40.239 --> 00:45:43.639
<v Speaker 2>or host activity, looking for signs of malicious behavior or

914
00:45:43.679 --> 00:45:46.960
<v Speaker 2>policy violations that might have gotten past the firewall or

915
00:45:47.000 --> 00:45:48.079
<v Speaker 2>originated internally.

916
00:45:48.119 --> 00:45:49.239
<v Speaker 1>How did they detect things?

917
00:45:49.239 --> 00:45:53.000
<v Speaker 2>Signatures that's a common method. Signature based detection looks for

918
00:45:53.079 --> 00:45:57.639
<v Speaker 2>known patterns, specific byte sequences and packets, screen signatures, connections

919
00:45:57.639 --> 00:46:01.840
<v Speaker 2>to known malicious ports, ports signatures, weird header combinations, header

920
00:46:01.880 --> 00:46:04.480
<v Speaker 2>conditioned signatures that match known attacks.

921
00:46:04.800 --> 00:46:06.920
<v Speaker 1>Network based versus host based.

922
00:46:06.760 --> 00:46:11.199
<v Speaker 2>NIDS network IDs watches traffic on a network segment. HIDS

923
00:46:11.280 --> 00:46:15.400
<v Speaker 2>host IDs runs on individual computers, monitoring system calls, logs,

924
00:46:15.400 --> 00:46:18.960
<v Speaker 2>file changes. IDs can also use anomaly detection, looking for

925
00:46:19.000 --> 00:46:22.679
<v Speaker 2>deviations from normal behavior, though that can have more false positives.

926
00:46:23.039 --> 00:46:25.280
<v Speaker 2>They might try to detect things like d DOS attacks

927
00:46:25.320 --> 00:46:27.159
<v Speaker 2>by looking for unusual traffic volumes.

928
00:46:27.159 --> 00:46:29.239
<v Speaker 1>Cloud computing security new challenges.

929
00:46:29.280 --> 00:46:33.880
<v Speaker 2>There definitely different models public private, hybrid and services sauce

930
00:46:34.079 --> 00:46:37.960
<v Speaker 2>pause IAS means shared responsibility and less direct control for

931
00:46:38.000 --> 00:46:42.559
<v Speaker 2>the customer. Key concerns, data breaches, often due to misconfiguration

932
00:46:42.639 --> 00:46:47.079
<v Speaker 2>by the customer. Weak identity and access management insecure APIs

933
00:46:47.360 --> 00:46:52.000
<v Speaker 2>system vulnerabilities in the cloud platform itself, DOS attacks, malicious

934
00:46:52.000 --> 00:46:55.440
<v Speaker 2>insiders at the provider. Trusting your provider and understanding their

935
00:46:55.480 --> 00:46:56.960
<v Speaker 2>security practices is crucial.

936
00:46:57.199 --> 00:46:59.320
<v Speaker 1>Cloud security as a service is also a thing.

937
00:46:59.400 --> 00:47:03.199
<v Speaker 2>Yeah, outsourceing security functions like identity management, SIME, security, information

938
00:47:03.239 --> 00:47:07.039
<v Speaker 2>at event management, et cetera to specialized cloud security providers.

939
00:47:06.559 --> 00:47:11.320
<v Speaker 1>And finally IoT security. Lots of small connected devices problems

940
00:47:11.360 --> 00:47:11.960
<v Speaker 1>big problems.

941
00:47:12.079 --> 00:47:17.039
<v Speaker 2>Devices are often resource constrained. Low power memory CPU makes

942
00:47:17.079 --> 00:47:21.840
<v Speaker 2>running traditional security difficult. Huge diversity devices long life cycles

943
00:47:21.880 --> 00:47:25.519
<v Speaker 2>often in frequent updates, and many IoT devices interact with

944
00:47:25.519 --> 00:47:28.719
<v Speaker 2>the physical world, so security failures can have physical consequences.

945
00:47:28.840 --> 00:47:31.320
<v Speaker 1>So what are the goals and how to achieve them?

946
00:47:31.480 --> 00:47:35.960
<v Speaker 2>Goals are protecting the device itself, protecting the data, maintaining functionality.

947
00:47:36.639 --> 00:47:41.079
<v Speaker 2>Lightweight cryptography is key crypto algorithms designed specifically for these

948
00:47:41.079 --> 00:47:45.280
<v Speaker 2>constrained environments, like sci fash for ms mentioned in the sources.

949
00:47:46.039 --> 00:47:49.320
<v Speaker 2>Secure communication needs to handle things like broadcast traffic and

950
00:47:49.360 --> 00:47:54.199
<v Speaker 2>replay attacks efficiently. Protocols like MINISECU and minisec B were mentioned,

951
00:47:54.440 --> 00:47:57.320
<v Speaker 2>using techniques like time based nonzs or bloom filters for

952
00:47:57.440 --> 00:47:58.320
<v Speaker 2>lightweight security.

953
00:47:58.440 --> 00:48:01.000
<v Speaker 1>One last thing the appendix mentioned perfect secrecy.

954
00:48:01.119 --> 00:48:05.239
<v Speaker 2>What's that Perfect secrecy is a theoretical ideal. It means

955
00:48:05.280 --> 00:48:10.199
<v Speaker 2>that ciphertext reveals absolutely zero information about the plaintext. Knowing

956
00:48:10.199 --> 00:48:13.559
<v Speaker 2>the cyphertext doesn't change the probabilities of what the plaintext

957
00:48:13.639 --> 00:48:14.159
<v Speaker 2>might have been.

958
00:48:14.280 --> 00:48:15.599
<v Speaker 1>Achievable only by.

959
00:48:15.480 --> 00:48:17.880
<v Speaker 2>The one time pad, which, as we said, is impractical.

960
00:48:18.159 --> 00:48:20.199
<v Speaker 2>It requires a truly random key as long as a

961
00:48:20.239 --> 00:48:24.280
<v Speaker 2>message used only once. Most crypto aims for computational security,

962
00:48:24.480 --> 00:48:27.880
<v Speaker 2>not perfect secrecy. Information theory gives formal ways to measure

963
00:48:27.920 --> 00:48:31.960
<v Speaker 2>information and secrecy. Other metrics like forward unpredictability are important

964
00:48:32.000 --> 00:48:35.400
<v Speaker 2>for things like prng's knowing past output doesn't help predict

965
00:48:35.400 --> 00:48:36.159
<v Speaker 2>future output.

966
00:48:36.480 --> 00:48:41.760
<v Speaker 1>Wow, we have definitely covered a massive amount of ground today. Cryptography,

967
00:48:41.880 --> 00:48:44.760
<v Speaker 1>network security. It's a huge field.

968
00:48:44.679 --> 00:48:48.079
<v Speaker 2>It really is, and constantly changing too. It's what keeps

969
00:48:48.079 --> 00:48:50.679
<v Speaker 2>our digital interactions well somewhat trustworthy.

970
00:48:50.960 --> 00:48:54.719
<v Speaker 1>Yeah, and what strikes me is how these seemingly abstract

971
00:48:54.840 --> 00:48:59.880
<v Speaker 1>mathematical ideas like factoring being hard or discrete logarithms directly

972
00:49:00.119 --> 00:49:05.880
<v Speaker 1>translate into protecting everyday things like online banking or secure messaging.

973
00:49:05.480 --> 00:49:08.960
<v Speaker 2>Absolutely or even things like that format preserving encryption, the

974
00:49:09.079 --> 00:49:12.559
<v Speaker 2>cleverness needed to make encrypted data still fit old systems.

975
00:49:12.559 --> 00:49:13.719
<v Speaker 2>It's quite a genius.

976
00:49:13.719 --> 00:49:17.000
<v Speaker 1>Definitely. Hopefully this deep dive has maybe sparked some more

977
00:49:17.079 --> 00:49:20.880
<v Speaker 1>questions for you listening, like how are quantum computers going

978
00:49:20.880 --> 00:49:21.559
<v Speaker 1>to affect all this?

979
00:49:21.679 --> 00:49:24.039
<v Speaker 2>That's a big one, a huge one. Research into post

980
00:49:24.119 --> 00:49:27.440
<v Speaker 2>quantum cryptography is incredibly active right now, trying to find

981
00:49:27.480 --> 00:49:29.559
<v Speaker 2>algorithms resistant to quantum.

982
00:49:29.199 --> 00:49:32.039
<v Speaker 1>Attacks, or maybe you're thinking more practically, how can you

983
00:49:32.280 --> 00:49:35.119
<v Speaker 1>or your organization actually implement these things better?

984
00:49:35.480 --> 00:49:38.079
<v Speaker 2>Right if you want to go deeper exploring the standards,

985
00:49:38.079 --> 00:49:42.199
<v Speaker 2>we mentioned from nist iee IETF is a great start.

986
00:49:42.559 --> 00:49:46.519
<v Speaker 2>Or pick one algorithm like AES or RSSA, or one

987
00:49:46.559 --> 00:49:49.480
<v Speaker 2>protocol like TLS or ip sec and really dig into

988
00:49:49.519 --> 00:49:50.079
<v Speaker 2>how it works.

989
00:49:50.199 --> 00:49:51.360
<v Speaker 1>Yeah, lots to explore.

990
00:49:51.559 --> 00:49:53.639
<v Speaker 2>Well, thank you for joining us on this deep dive.

991
00:49:53.760 --> 00:49:55.840
<v Speaker 2>We really hope it's given you a solid foundation and

992
00:49:55.880 --> 00:49:59.400
<v Speaker 2>maybe a new appreciation for the intricate and vital world

993
00:49:59.400 --> 00:50:01.719
<v Speaker 2>of security that holds our digital society together.
