1 00:00:01,320 --> 00:00:09,300 Without wasting any much time, let us get started with the next important concept in cryptography that 2 00:00:09,300 --> 00:00:10,340 is Hachim. 3 00:00:10,770 --> 00:00:17,280 You must have heard about this dumb harshing, which is very common if you want to check something. 4 00:00:17,280 --> 00:00:24,120 So whenever you're going to download a software, you might see a line over there saying that, please 5 00:00:24,120 --> 00:00:25,450 check the hash here. 6 00:00:26,310 --> 00:00:28,260 So what exactly is harshing? 7 00:00:29,150 --> 00:00:37,550 Harshing is transforming the normal text, the normal message, our data into a Jibberish one. 8 00:00:38,360 --> 00:00:40,010 So it sounds funny, right? 9 00:00:40,020 --> 00:00:46,820 Why we should transfer transform something which is understandable into something which is not completely 10 00:00:46,820 --> 00:00:50,030 understandable, but it's it's abrupt text. 11 00:00:51,120 --> 00:00:53,250 So why we should do that? 12 00:00:53,820 --> 00:01:01,140 Well, hashing is a mathematical function which converts a numerical input value into another compressed 13 00:01:01,140 --> 00:01:03,770 numerical value of the same length. 14 00:01:04,200 --> 00:01:10,760 For example, if you enter my name is X, Y, Z, the output will be some gibberish data. 15 00:01:11,250 --> 00:01:17,200 And but if you enter, my name is ABC again, the output will be different. 16 00:01:17,610 --> 00:01:21,150 So no two hash values can be seen. 17 00:01:22,680 --> 00:01:30,950 So then when we pass the input to the hash function, the output is known as the message digest. 18 00:01:30,960 --> 00:01:38,070 Basically it digests the input and then gives us the output of the origin message, which is known as 19 00:01:38,070 --> 00:01:39,510 a message digest. 20 00:01:40,200 --> 00:01:46,500 So MI five, that is message digest, fifth version or secure hash algorithm. 21 00:01:46,830 --> 00:01:55,590 SHC one is two and three are three different hashing algorithms which are used now. 22 00:01:56,280 --> 00:02:03,870 Hashing algorithm is again our M.D., which is res integrated message digest function basically. 23 00:02:04,260 --> 00:02:11,610 So let us consider we have a document here and you want to transfer that document to Alice over the 24 00:02:11,610 --> 00:02:15,010 Internet, but it has some confidential data. 25 00:02:15,270 --> 00:02:20,300 OK, it has some confidential data and you don't want to transfer the original document as it is. 26 00:02:20,700 --> 00:02:31,050 So what you do is you give the original document into hash algorithm and together you get a hash document. 27 00:02:31,740 --> 00:02:35,240 So this is the working of a hash function. 28 00:02:35,820 --> 00:02:43,110 So when it comes to hashing, what you have to remember is these are the most common hashing algorithms. 29 00:02:43,470 --> 00:02:51,240 And all of this as this as a tool is widely used because it has more rounds, it has more keys to it, 30 00:02:51,810 --> 00:02:54,610 which prevents the data integrity. 31 00:02:55,200 --> 00:02:59,320 So when you when do you have to use a hash? 32 00:02:59,340 --> 00:03:04,320 OK, let's consider you are downloading a new program from Microsoft. 33 00:03:04,590 --> 00:03:12,600 And Microsoft has said that the hash value is A, B, C, D and E, so if you download the software, 34 00:03:12,810 --> 00:03:17,770 make sure that you hash this software and check if the values are seen. 35 00:03:18,360 --> 00:03:23,340 So if both the hash values are the same, then you have downloaded the original software. 36 00:03:24,270 --> 00:03:32,460 Let me tell you one thing that even a single character in the file changes, the entire hash value is 37 00:03:32,460 --> 00:03:33,370 going to change. 38 00:03:33,840 --> 00:03:35,440 This point is very important. 39 00:03:35,760 --> 00:03:41,080 So in order to maintain the integrity of data, you check the hash value. 40 00:03:42,180 --> 00:03:46,920 Another scenario can be, let's say Alice has said hello to Bob. 41 00:03:47,520 --> 00:03:54,500 Hello, I am Alice and I want to meet you at three p.m. and Bob receives a message. 42 00:03:54,510 --> 00:03:55,260 It's Hashd. 43 00:03:55,560 --> 00:04:01,140 And if you change the message to Hello, I am Alice, I want to meet you at three thirty. 44 00:04:01,530 --> 00:04:04,530 The hash value of both the messages will be different. 45 00:04:05,100 --> 00:04:09,810 So in that way, hashing is used in digital signature Ghadames. 46 00:04:10,140 --> 00:04:13,190 You must have heard of the word digital signatures. 47 00:04:14,100 --> 00:04:20,730 So in the next lecture we will have one fun activity that will be calculating different hashes and will 48 00:04:20,730 --> 00:04:26,190 see how changing one character can change the entire hash value. 49 00:04:26,580 --> 00:04:28,250 All right, stay tuned. 50 00:04:28,620 --> 00:04:30,210 Keep moving forward.