1 00:00:01,050 --> 00:00:04,930 In the last lecture, we talked about the digital signatures. 2 00:00:04,950 --> 00:00:09,600 Now let us have a practical look at how digital signatures work. 3 00:00:10,080 --> 00:00:18,060 The reason I have used graphics here and animations is for you to understand because I'm a man of practicality 4 00:00:18,060 --> 00:00:25,230 and pragmatism and I believe in using practical things to demonstrate I'm not just going to write out 5 00:00:25,230 --> 00:00:26,910 BOYENS and that you read them. 6 00:00:28,140 --> 00:00:30,610 So again, this is our dear friend Bob. 7 00:00:30,630 --> 00:00:38,600 He has a document and now he wants to send this document over email to Alice, obviously his friend, 8 00:00:38,610 --> 00:00:45,220 and now he wants Alice to believe that Bob has signed the document. 9 00:00:45,240 --> 00:00:49,770 Let's see, this is a contract and Bob has signed the contract. 10 00:00:49,800 --> 00:00:53,070 So Bob has to attach his digital signature. 11 00:00:53,820 --> 00:00:55,060 So how is the process? 12 00:00:55,560 --> 00:00:57,450 So this is the original document. 13 00:00:57,510 --> 00:00:59,640 OK, you're on the same page, everyone. 14 00:01:00,330 --> 00:01:05,010 Now, what Bob does is Bob hashes this original document. 15 00:01:05,340 --> 00:01:13,590 And even though the document is of five pages, 11 pages, 200 pages on one page, output of S.A.G. 16 00:01:13,590 --> 00:01:16,900 256 is going to be of a fixed length. 17 00:01:17,760 --> 00:01:20,540 So this is the hash of this document. 18 00:01:20,880 --> 00:01:29,730 And now what Bob does is Bob and Grip's this hash with his own private key. 19 00:01:30,540 --> 00:01:30,990 All right. 20 00:01:30,990 --> 00:01:33,750 He's not going to encrypt it. 21 00:01:33,750 --> 00:01:43,170 Alice's public key, because this time Alice wants to check if the document I have received is from 22 00:01:43,170 --> 00:01:45,900 Bob's and if Bob has signed. 23 00:01:46,410 --> 00:01:55,020 So if Alice is able to unlock this document or unlock this hash value with the help of Bob's public 24 00:01:55,020 --> 00:02:01,410 key, then only she'll believe that this document has been sent over by Bob. 25 00:02:02,760 --> 00:02:08,160 So, Bob, Bob does is Bob and this hash of this document. 26 00:02:08,760 --> 00:02:13,800 So Bob and groups this hash of this original document here. 27 00:02:16,590 --> 00:02:27,540 And what he does is he gets encrypted hash value, so and this is the digitally signed document, so 28 00:02:27,540 --> 00:02:35,410 digitally signed a document is a combination of the original document and the encrypted hash. 29 00:02:35,670 --> 00:02:42,750 So when you attach the original document, along with the encrypted hash and then send it over to someone 30 00:02:43,140 --> 00:02:47,070 that is known as a digitally signed document. 31 00:02:47,490 --> 00:02:48,030 OK. 32 00:02:50,000 --> 00:02:52,530 Now, let's have a look at this scenario. 33 00:02:53,180 --> 00:03:02,750 So now Alice has received the digitally signed document from Bob, and now Alice wants to know if Bob 34 00:03:02,750 --> 00:03:06,350 is the one who has sent and signed the document. 35 00:03:07,100 --> 00:03:14,750 So along with the digital sign document, she knows that it's a combination of original document and 36 00:03:14,750 --> 00:03:17,060 it's a combination of encrypted hash. 37 00:03:17,640 --> 00:03:26,710 As I told you a couple of minutes ago, that if not, this encrypted hash is this is an encrypted hatch. 38 00:03:26,720 --> 00:03:31,640 So if she wants to get the original hash, she has to decrypt the hash. 39 00:03:32,120 --> 00:03:39,920 Since Bob has encrypted this hash with his private key and we know that asymmetric encryption works 40 00:03:40,550 --> 00:03:47,390 if something is encrypted with private key and decrypted it publicly or vice versa of the same person. 41 00:03:48,260 --> 00:03:55,910 So now, since this hash is encrypted with Bob's private key, Alice has to find out his public key, 42 00:03:55,910 --> 00:03:57,330 which is publicly available. 43 00:03:58,040 --> 00:04:02,800 So what she does first is she has got the original document. 44 00:04:02,810 --> 00:04:09,650 So she again uses the same as a 256 algorithm to generate a hash value. 45 00:04:09,920 --> 00:04:14,050 OK, so now, Steve, she has this hash value over here. 46 00:04:14,450 --> 00:04:23,270 And again, she uses Bob's public key to get the hash, which was sent by both of the original document. 47 00:04:23,870 --> 00:04:27,120 So if these two hashes match. 48 00:04:27,140 --> 00:04:34,880 OK, so if these two hashes match, then Alice can see that the document has been digitally signed by 49 00:04:35,180 --> 00:04:44,180 document, obviously, because, see, this is the hash value of the document, which was first sent 50 00:04:44,180 --> 00:04:44,870 by the Bob. 51 00:04:44,870 --> 00:04:52,370 Let's go down to the back previous slide over here so we can see Bob has hash, the original document 52 00:04:52,370 --> 00:04:56,470 over here, and this is the hash value, which he has encrypted. 53 00:04:56,480 --> 00:04:59,840 So Alice is just following the reverse process of this. 54 00:04:59,840 --> 00:05:05,370 She's just following the reverse process of what Bob had done earlier. 55 00:05:06,320 --> 00:05:10,850 So this is very this is the way in which digital signatures work. 56 00:05:10,850 --> 00:05:18,440 And if these two hash values are exactly the same, we can see that Bob is the one who has signed the 57 00:05:18,440 --> 00:05:19,940 document digitally. 58 00:05:21,040 --> 00:05:26,740 I hope my explanation with graphics was pretty clear, if you if you have any doubts, please feel free 59 00:05:26,740 --> 00:05:27,310 to ask. 60 00:05:27,310 --> 00:05:30,460 I will be happy to answer your questions. 61 00:05:30,710 --> 00:05:36,190 And if not, I don't think will get a pretty clear explanation out there about digital signatures. 62 00:05:36,520 --> 00:05:40,870 But this is the best possible explanation that I've given to you. 63 00:05:41,380 --> 00:05:41,840 All right. 64 00:05:42,040 --> 00:05:45,570 So in the next lecture, we'll talk about SSL. 65 00:05:45,580 --> 00:05:48,360 That is secure sockets layer. 66 00:05:48,730 --> 00:05:51,130 I will see you in the next lecture.