Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:07,190 --> 00:00:10,290
Let's do a quick lap to see how hashing works in the real world.
2
00:00:10,880 --> 00:00:15,980
So as we discussed, one of the biggest applications of hashing is to make sure that the file you have downloaded
3
00:00:16,309 --> 00:00:18,010
has maintained its integrity.
4
00:00:18,470 --> 00:00:23,090
And usually this happens because let's say there's a software, you may have come across it on another
5
00:00:23,090 --> 00:00:26,250
website, not the official website or someone may have shared it with you.
6
00:00:26,600 --> 00:00:28,520
So now you want to check the integrity.
7
00:00:30,550 --> 00:00:35,770
So first of all, we have included a file, letter or text in the resources, you should download it
8
00:00:36,220 --> 00:00:39,760
and then you need to calculate the MD5 hash of the file and note it down.
9
00:00:40,480 --> 00:00:46,360
Next, we are going to modify the file just slightly, will add a single comma, will recalculate the
10
00:00:46,360 --> 00:00:51,240
hash and compare it with the old one to see, you know, whether it changed or not and by how much.
11
00:00:51,670 --> 00:00:56,650
There are a number of websites which allow you to calculate hash without having to download any tools
12
00:00:56,650 --> 00:00:57,550
on your own system.
13
00:00:57,850 --> 00:01:00,580
So one of these is onlinemd5.com
14
00:01:01,540 --> 00:01:08,410
So as you can see, it allows you to calculate MD5, SHA-1 or SHA-256. We will go with MD5.
15
00:01:09,190 --> 00:01:12,530
So you can upload the file and then it's going to calculate the hash.
16
00:01:12,550 --> 00:01:15,800
So let's do that. So here's our file.
17
00:01:15,820 --> 00:01:17,440
I'm just going to paste it here.
18
00:01:19,650 --> 00:01:25,560
So this is the letter and the hash has already been calculated, you can see so this is the MD5
19
00:01:25,590 --> 00:01:28,430
hash of this file, so let's note it down.
20
00:01:30,480 --> 00:01:32,770
So this is the MD5 hash of this file.
21
00:01:33,600 --> 00:01:37,050
Now, let's modify this file by just adding a comma.
22
00:01:38,920 --> 00:01:39,880
Let's save it,
23
00:01:41,860 --> 00:01:44,860
and then repeat the process, so we've just added a comma.
24
00:01:47,030 --> 00:01:48,680
Let's recalculate the hash.
25
00:01:53,980 --> 00:01:54,820
Here we are.
26
00:01:59,130 --> 00:02:05,160
So as you can see, this was the first hash and this is the second hash, we just changed one comma
27
00:02:05,670 --> 00:02:10,340
and you can already see the significant difference between the two hashes.
28
00:02:10,949 --> 00:02:13,780
You may want to experiment with other types of files as well.
29
00:02:13,800 --> 00:02:18,750
For example, you can take an image and maybe change its brightness slightly, but you will see the
30
00:02:18,750 --> 00:02:21,630
same results even if you change one bit in a file.
31
00:02:21,960 --> 00:02:24,870
It is going to significantly change the hash.
32
00:02:25,560 --> 00:02:30,900
That is because the hash goes through a number of series of steps which are dependent on each other.
33
00:02:31,290 --> 00:02:35,270
So if your starting block is different, you're going to end up with a very different hash at the end.
34
00:02:35,310 --> 00:02:41,450
And another point I would like to clarify is that you cannot convert between hashes.
35
00:02:41,730 --> 00:02:47,670
So, for example, if you only have an MD5 hash available of a file, you cannot compare it with
36
00:02:47,670 --> 00:02:49,580
an SHA hash available of that file.
37
00:02:49,590 --> 00:02:52,410
You won't be able to convert between different hash formats.
38
00:02:53,070 --> 00:02:54,120
That concludes our lab.
39
00:02:54,510 --> 00:02:55,020
Thank you.
3937
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.