WEBVTT - This file was automatically generated by VIMEO

0
00:00:11.500 --> 00:00:14.600
welcome to section 3 we have mainly focused

1
00:00:14.600 --> 00:00:16.000
 on encryption in section 2

2
00:00:16.700 --> 00:00:19.800
However, cryptography is not only about ensuring

3
00:00:19.800 --> 00:00:20.600
 confidentiality.

4
00:00:21.500 --> 00:00:24.200
Integrity and authentication are very important

5
00:00:24.200 --> 00:00:27.500
 Security Services required in several applications.

6
00:00:28.900 --> 00:00:31.300
In this section, we'll discuss how we can

7
00:00:31.300 --> 00:00:34.800
 achieve integrity and authentication using symmetric

8
00:00:34.800 --> 00:00:35.500
 key cryptography.

9
00:00:38.700 --> 00:00:41.200
In this first video, we will see what is

10
00:00:41.200 --> 00:00:44.600
 a cryptographic hashing and formally Define the

11
00:00:44.600 --> 00:00:47.500
 security guarantees that the hashing function should

12
00:00:47.500 --> 00:00:50.500
 provide to be called the cryptographic hashing function.

13
00:00:51.500 --> 00:00:54.700
We'll discuss through examples to Applications of

14
00:00:54.700 --> 00:00:55.900
 cryptographic action.

15
00:00:56.600 --> 00:00:59.600
We'll see what are today the secure hash

16
00:00:59.600 --> 00:01:02.800
 functions among the long lines of hash functions that

17
00:01:02.800 --> 00:01:05.400
 were standardized by nest and that many

18
00:01:05.400 --> 00:01:08.300
 of them are today vulnerable or completely broken.

19
00:01:10.600 --> 00:01:13.800
Hash function Maps the data of arbitrary length

20
00:01:13.800 --> 00:01:16.500
 into bitstreak or fixed length.

21
00:01:17.100 --> 00:01:20.400
We call that bit string hash or digest of

22
00:01:20.400 --> 00:01:20.700
 the data.

23
00:01:21.700 --> 00:01:24.100
In the figure, we see examples of digests.

24
00:01:24.700 --> 00:01:27.800
the digest of the image of Linux penguin

25
00:01:28.200 --> 00:01:31.300
the digest of the string ET phono

26
00:01:32.100 --> 00:01:37.500
and the digest of the Ubuntu 21.10 image

27
00:01:39.100 --> 00:01:42.600
Of course, this objects have very different lengths but using

28
00:01:42.600 --> 00:01:45.200
 the hush function shot 256.

29
00:01:46.200 --> 00:01:50.500
We obtained their digests which are all 256 bitlock.

30
00:01:51.800 --> 00:01:54.300
A cryptographic hash function is a hash

31
00:01:54.300 --> 00:01:57.000
 function that aims to guarantee a number of

32
00:01:57.500 --> 00:01:58.200
 security properties.

33
00:02:00.800 --> 00:02:03.600
First Security property is related to

34
00:02:03.600 --> 00:02:04.200
 collisions.

35
00:02:05.100 --> 00:02:09.000
Collisions happen when two distinct data x and

36
00:02:08.200 --> 00:02:10.900
 x Prime have the same digests.

37
00:02:12.100 --> 00:02:15.500
Collisions always exist as the space of digests is

38
00:02:15.500 --> 00:02:18.500
 finite. So there exist always two data

39
00:02:18.500 --> 00:02:19.400
 that that collide.

40
00:02:20.200 --> 00:02:23.700
So we don't want collision-free hashing but

41
00:02:23.700 --> 00:02:26.200
 rather a collision resistant hashing.

42
00:02:26.800 --> 00:02:29.200
Which means that it is

43
00:02:29.200 --> 00:02:32.800
 difficult competitionally difficult for an

44
00:02:32.800 --> 00:02:34.700
 adversary to find these collisions.

45
00:02:37.300 --> 00:02:40.300
The second property is related to

46
00:02:40.300 --> 00:02:42.000
 reversing the hash function.

47
00:02:43.200 --> 00:02:46.300
So an adversary that was given a digest

48
00:02:46.300 --> 00:02:47.400
 y of some X.

49
00:02:48.100 --> 00:02:51.200
We want him to be unable to find X.

50
00:02:52.300 --> 00:02:55.100
X is called the image of Y with respect to

51
00:02:55.100 --> 00:02:56.100
 the hash function h

52
00:02:57.100 --> 00:03:00.400
That's why we call this attack pretty image attack. So we would

53
00:03:00.400 --> 00:03:03.800
 like resistance to premage to first image attacks.

54
00:03:06.500 --> 00:03:09.900
The last property or guarantee is resistance to

55
00:03:09.900 --> 00:03:11.600
 Second pre-image attacks.

56
00:03:12.400 --> 00:03:15.400
So an adversary that was given a brimage

57
00:03:15.400 --> 00:03:15.600
 x

58
00:03:16.300 --> 00:03:19.800
is unable to find another primage X

59
00:03:19.800 --> 00:03:22.800
 Prime such that each of

60
00:03:22.800 --> 00:03:24.700
 X is equal to H of X Prime.

61
00:03:27.200 --> 00:03:30.900
Through examples of use cases will clarify these

62
00:03:30.900 --> 00:03:33.700
 guarantees and convince you why this properties

63
00:03:33.700 --> 00:03:34.100
 are important.

64
00:03:37.300 --> 00:03:40.400
The first application of cryptographic hashing

65
00:03:40.400 --> 00:03:42.000
 is integrity check.

66
00:03:42.900 --> 00:03:45.100
Let's imagine the scenario of

67
00:03:45.100 --> 00:03:48.800
 Bob that is about to download in OS image.

68
00:03:48.800 --> 00:03:51.500
 Let's say Ubuntu 21.10

69
00:03:52.400 --> 00:03:55.300
Unfortunately, there is the malicious men in

70
00:03:55.300 --> 00:03:59.200
 the middle that would like to modify this image into a

71
00:03:58.200 --> 00:04:01.600
 malicious image and let Bob install

72
00:04:01.600 --> 00:04:01.800
 it.

73
00:04:02.700 --> 00:04:05.000
If Pope installs the malicious image.

74
00:04:05.800 --> 00:04:08.300
The adversary might see Bob's activity.

75
00:04:09.100 --> 00:04:11.100
And gets access to his private data.

76
00:04:12.700 --> 00:04:15.600
However, Bob is cautious and follows

77
00:04:15.600 --> 00:04:17.400
 Integrity check practices.

78
00:04:18.300 --> 00:04:22.200
He obtained from the official website of Ubuntu the

79
00:04:21.200 --> 00:04:24.200
 shadow256. They rest

80
00:04:24.200 --> 00:04:26.500
 of the version of the osc intends to install.

81
00:04:27.600 --> 00:04:31.200
And before launching the installation, he computes

82
00:04:30.200 --> 00:04:33.400
 the shadow56 stages of the

83
00:04:33.400 --> 00:04:34.400
 malicious image.

84
00:04:35.400 --> 00:04:38.400
And sees that it does not match with the digest that is

85
00:04:38.400 --> 00:04:40.700
 displayed on the official website of Ubuntu.

86
00:04:42.200 --> 00:04:45.200
He then concludes that it didn't download a valid

87
00:04:45.200 --> 00:04:45.300
 image.

88
00:04:47.400 --> 00:04:48.700
so in this scenario

89
00:04:50.400 --> 00:04:51.000
there is not

90
00:04:51.400 --> 00:04:53.400
able to find or to construct

91
00:04:54.700 --> 00:04:58.300
Malicious image such that. It's try

92
00:04:57.300 --> 00:05:00.700
 to five six stages corresponds to

93
00:05:00.700 --> 00:05:03.200
 the shadow56 stages of the

94
00:05:03.200 --> 00:05:04.600
 valid Ubuntu image.

95
00:05:05.600 --> 00:05:08.800
And this is thanks to the fact that shot 256

96
00:05:08.800 --> 00:05:11.800
 is resistant to Second pre-image attack.

97
00:05:13.500 --> 00:05:16.500
Our second application for cryptographic hashing

98
00:05:16.500 --> 00:05:18.200
 is the commitment.

99
00:05:19.200 --> 00:05:22.200
To introduce. What is a commitment? Let's go back to

100
00:05:22.200 --> 00:05:24.700
 our good old friends Alice and pop.

101
00:05:25.600 --> 00:05:28.200
This time Alice and Bob want to play

102
00:05:28.200 --> 00:05:31.100
 Rock Paper Scissors game remotely.

103
00:05:32.200 --> 00:05:35.700
In physical world the two players Revere their

104
00:05:35.700 --> 00:05:39.400
 values simultaneously or Kazi simultaneously

105
00:05:38.400 --> 00:05:41.100
 in a way that none of

106
00:05:41.100 --> 00:05:44.400
 them is able to choose a winning value after seeing the

107
00:05:44.400 --> 00:05:45.700
 value of the other player.

108
00:05:46.900 --> 00:05:49.800
Remotely, this will be difficult to implement as

109
00:05:49.800 --> 00:05:52.400
 one of them will send his Value

110
00:05:52.400 --> 00:05:52.600
 First.

111
00:05:53.500 --> 00:05:56.400
The issue here. Is that the one who will send first

112
00:05:56.400 --> 00:05:59.800
 let's say Alice is going for sure to lose as

113
00:05:59.800 --> 00:06:03.100
 Bob will know her value before revealing

114
00:06:02.100 --> 00:06:05.600
 his own value and will on purpose truth paper.

115
00:06:07.200 --> 00:06:10.300
So we need commitment commitment is

116
00:06:10.300 --> 00:06:13.600
 a protocol that allows Alice to stick

117
00:06:13.600 --> 00:06:16.800
 to value that will remain hidden until

118
00:06:16.800 --> 00:06:18.700
 the moment. It must be revealed.

119
00:06:19.300 --> 00:06:20.500
And there would be no going back.

120
00:06:22.100 --> 00:06:25.300
Using a box analogy. Alice keeps her

121
00:06:25.300 --> 00:06:26.400
 chosen value Rock

122
00:06:27.300 --> 00:06:28.100
in a locked box

123
00:06:28.800 --> 00:06:30.400
and gives the box to Bob.

124
00:06:31.300 --> 00:06:34.200
Without the key Bob cannot read her value

125
00:06:34.200 --> 00:06:36.400
 and select the value that makes him win.

126
00:06:37.300 --> 00:06:40.900
Alice as well cannot change it because the box is in

127
00:06:40.900 --> 00:06:41.600
 Bob's position.

128
00:06:42.900 --> 00:06:45.400
When she will give him the key he can open

129
00:06:45.400 --> 00:06:47.300
 the box and then read the value.

130
00:06:48.400 --> 00:06:52.200
Let's see how we can construct commitment using cryptographic

131
00:06:51.200 --> 00:06:52.700
 eruption.

132
00:06:54.500 --> 00:06:56.300
Alice speaks some random value

133
00:06:57.100 --> 00:07:00.800
and she commits to the Rock value by sending Bob the

134
00:07:00.800 --> 00:07:02.300
 shadow256 stages.

135
00:07:03.600 --> 00:07:06.600
of the concatenation of the random and The

136
00:07:06.600 --> 00:07:07.200
 Rock Valley

137
00:07:08.500 --> 00:07:11.400
as soon as Bob sends his own value paper to

138
00:07:11.400 --> 00:07:11.800
 Alice.

139
00:07:12.700 --> 00:07:14.100
She knows that she has lost.

140
00:07:15.200 --> 00:07:16.500
But she's unable to cheat.

141
00:07:17.700 --> 00:07:20.500
Now she has to open the commitment in other

142
00:07:20.500 --> 00:07:20.700
 words.

143
00:07:21.500 --> 00:07:24.400
She reveals to Bob what was the value she

144
00:07:24.400 --> 00:07:24.700
 committed to?

145
00:07:25.800 --> 00:07:28.100
So she sends the random as well as the

146
00:07:28.100 --> 00:07:28.900
 value Rock.

147
00:07:29.800 --> 00:07:32.600
Bob discovers that you want and can verify

148
00:07:32.600 --> 00:07:35.200
 that at least did not cheat and did not change the

149
00:07:35.200 --> 00:07:35.600
 value.

150
00:07:36.900 --> 00:07:39.400
Obviously Bob is more motivated to do this

151
00:07:39.400 --> 00:07:40.800
 verification if he loses.

152
00:07:41.500 --> 00:07:45.200
But the protocol the commitment allows him

153
00:07:45.200 --> 00:07:48.800
 to do this verification whether he loses or humans.

154
00:07:50.100 --> 00:07:54.000
If Alice wants to cheat after she discovered Bob's value.

155
00:07:54.700 --> 00:07:57.600
and let's say she will change it to the value scissors

156
00:07:57.600 --> 00:07:57.700
 which

157
00:07:58.500 --> 00:07:59.400
can win

158
00:08:00.100 --> 00:08:03.800
then the dangerous computed by Bob and the one initially sent

159
00:08:03.800 --> 00:08:06.800
 by Alice do not much and Bob

160
00:08:06.800 --> 00:08:08.900
 will be able to detect the cheating.

161
00:08:11.900 --> 00:08:15.100
In this protocol the commitment constructed using

162
00:08:14.100 --> 00:08:18.300
 cryptographic hashing provided two

163
00:08:17.300 --> 00:08:18.800
 guarantees.

164
00:08:20.200 --> 00:08:23.500
The first guarantee is hiding is called hiding.

165
00:08:24.200 --> 00:08:27.700
Bob is not able to determine that Alice has

166
00:08:27.700 --> 00:08:31.200
 committed to given value as Bob

167
00:08:30.200 --> 00:08:33.900
 doesn't know the random value used and

168
00:08:33.900 --> 00:08:36.200
 Bob is enabled to reverse the hash function.

169
00:08:37.100 --> 00:08:40.700
This is thanks to the property of resistance of first

170
00:08:40.700 --> 00:08:43.800
 to First premature attack that chapter

171
00:08:43.800 --> 00:08:44.700
 56 has.

172
00:08:46.200 --> 00:08:49.000
The second guarantee is called biding.

173
00:08:49.700 --> 00:08:51.600
Alice is unable to cheat.

174
00:08:52.500 --> 00:08:55.600
Since for tricking Bob, she would have to invent in

175
00:08:55.600 --> 00:08:57.900
 your random value a random Prime.

176
00:08:58.600 --> 00:09:01.600
That collides with the first digest that

177
00:09:01.600 --> 00:09:02.000
 she set.

178
00:09:02.700 --> 00:09:06.100
But this fraud would imply that Alice can't

179
00:09:05.100 --> 00:09:08.300
 find collisions in the hash function

180
00:09:08.300 --> 00:09:12.400
 shadow56, which is considered computationally impossible.

181
00:09:14.300 --> 00:09:17.700
Commitments are not only useful to play Rock

182
00:09:17.700 --> 00:09:19.500
 Paper Scissors remotely.

183
00:09:20.100 --> 00:09:23.600
It represent an important cryptographic primitive or

184
00:09:23.600 --> 00:09:26.300
 tool in several security protocols.

185
00:09:27.400 --> 00:09:30.600
For example, they are used in zero knowledge

186
00:09:30.600 --> 00:09:33.600
 proofs that provide blockchains with

187
00:09:33.600 --> 00:09:34.400
 privacy.

188
00:09:35.400 --> 00:09:38.500
I invite you to look at this topic. It's very exciting

189
00:09:38.500 --> 00:09:42.100
 topic and consider today a quite hot research

190
00:09:41.100 --> 00:09:44.700
 topic in the area of blockchain and

191
00:09:44.700 --> 00:09:46.500
 privacy in blockchains.

192
00:09:49.200 --> 00:09:52.800
Okay, now that we understood some of the applications of

193
00:09:52.800 --> 00:09:55.600
 cryptographic hashing. Let's see in

194
00:09:55.600 --> 00:09:58.300
 the list the main cryptography cache

195
00:09:58.300 --> 00:10:01.100
 functions that were standardized by nest.

196
00:10:02.100 --> 00:10:06.300
First md5 it was designed in 1993 and

197
00:10:05.300 --> 00:10:09.100
 has a digest of 128 bits.

198
00:10:10.400 --> 00:10:14.400
Shaziru was published in 1993 and

199
00:10:13.400 --> 00:10:17.100
 has digest of 160 bits.

200
00:10:18.100 --> 00:10:21.500
Shaun was published two years later with also

201
00:10:21.500 --> 00:10:23.500
 160 bit length of Digest.

202
00:10:24.800 --> 00:10:28.400
Several vulnerabilities were found in md5. She

203
00:10:27.400 --> 00:10:29.300
 has zero and Shawan.

204
00:10:29.800 --> 00:10:33.100
And today they are considered completely broken and

205
00:10:32.100 --> 00:10:34.300
 not recommended for use.

206
00:10:35.600 --> 00:10:39.300
Today the recommended hash functions are Chateau

207
00:10:38.300 --> 00:10:40.600
 and shatri.

208
00:10:41.700 --> 00:10:45.300
the both of them come with different digest

209
00:10:44.300 --> 00:10:49.400
 sizes either 224 256

210
00:10:50.100 --> 00:10:53.900
384 and 512 bits so

211
00:10:53.900 --> 00:10:56.700
 there are different modes. You can use which

212
00:10:56.700 --> 00:10:59.000
 mode corresponds to your application.

213
00:11:00.400 --> 00:11:03.600
The naming Chateau entry might be

214
00:11:03.600 --> 00:11:06.900
 misleading as we might think that these two

215
00:11:06.900 --> 00:11:09.100
 hash functions belong to the same

216
00:11:09.100 --> 00:11:12.300
 family of hash functions while it's not

217
00:11:12.300 --> 00:11:12.600
 the case.

218
00:11:13.600 --> 00:11:16.100
Chateau is build on the design that belongs to

219
00:11:16.100 --> 00:11:19.800
 the same family of designs as the previous track while

220
00:11:19.800 --> 00:11:21.500
 schatri started a completely.

221
00:11:22.600 --> 00:11:24.300
new internal design

222
00:11:25.700 --> 00:11:28.700
Chateau is built using Miracle

223
00:11:28.700 --> 00:11:29.500
 dumgar structure.

224
00:11:30.300 --> 00:11:33.400
Chatri is built using the sponge structure with the

225
00:11:33.400 --> 00:11:34.400
 ketchak permutation.

226
00:11:36.200 --> 00:11:39.600
In terms of security both Chateau and share 3 are highly

227
00:11:39.600 --> 00:11:40.800
 secure hash functions.

228
00:11:41.600 --> 00:11:44.600
They provide security against Collision attacks

229
00:11:44.600 --> 00:11:46.300
 and pre-image attacks.

230
00:11:47.500 --> 00:11:50.900
However, chethri provides higher resistance

231
00:11:50.900 --> 00:11:53.300
 to the category of attacks that

232
00:11:53.300 --> 00:11:54.700
 we not discussed today.

233
00:11:55.500 --> 00:11:58.200
They are called the length extension attacks.

234
00:11:58.800 --> 00:12:01.200
So if in your use case this attacks are

235
00:12:01.200 --> 00:12:03.100
 applicable then share 3 is a better choice.

236
00:12:06.800 --> 00:12:09.800
We reach the end of our first video that was

237
00:12:09.800 --> 00:12:12.200
 dedicated to cryptographic hashink.

238
00:12:12.800 --> 00:12:15.500
Where we also have seen some of its applications.

239
00:12:16.600 --> 00:12:19.900
In the next video, we will continue with applications of

240
00:12:19.900 --> 00:12:21.200
 cryptographic caching.

241
00:12:21.900 --> 00:12:25.000
And we will study the message authentication codes

242
00:12:24.800 --> 00:12:27.300
 that were build to provide

243
00:12:27.300 --> 00:12:28.200
 Authentication.

244
00:12:29.100 --> 00:12:30.800
So see you in the next video.
