1 00:00:02,280 --> 00:00:09,240 In the last lecture, we talked about the different types of encryption, let us get started with the 2 00:00:09,240 --> 00:00:11,040 different types of ciphers. 3 00:00:11,070 --> 00:00:13,780 Well, the first is the classical cipher. 4 00:00:14,580 --> 00:00:17,490 And in this and there are modern ciphers. 5 00:00:17,490 --> 00:00:23,120 So classical ciphers were used in the war time period in order to send messages. 6 00:00:23,130 --> 00:00:26,350 And at that time, cryptography was not developed. 7 00:00:26,820 --> 00:00:29,340 So what is the first classical cipher? 8 00:00:29,370 --> 00:00:37,980 Well, the first classical cipher is substitution, cipher substitution ciphers and cryptic plain text 9 00:00:37,980 --> 00:00:46,200 by swapping each letter or symbol in the plain text by a different symbol as directed by the key. 10 00:00:47,010 --> 00:00:51,200 Now, when you are going to encrypt, we have already seen that we need a key. 11 00:00:51,630 --> 00:00:57,690 So we have encryption algorithm, we have the key and then we get the data. 12 00:00:59,520 --> 00:01:07,140 So perhaps the most simplest substitution cipher is the SESAR cipher, which is named after the man 13 00:01:07,140 --> 00:01:08,760 who used it for the first time. 14 00:01:09,960 --> 00:01:13,200 A cipher is perhaps better known to the captain. 15 00:01:13,200 --> 00:01:21,200 Midnight Colgrove sees a cipher maybe differentiated from other, more complex substitution cipher, 16 00:01:21,210 --> 00:01:25,150 but that is one of the most easiest SESAR cipher. 17 00:01:26,550 --> 00:01:27,690 So let us see. 18 00:01:28,440 --> 00:01:36,030 You have to encrypt this as B and why you want to tell someone that I am a spy. 19 00:01:36,580 --> 00:01:46,260 And the key here is, let's say E so the key here is e what you are going to do is you are going to 20 00:01:46,260 --> 00:01:52,710 apply this key and then you are going to get the encrypted text, which is. 21 00:01:54,740 --> 00:02:01,370 Now, if you use a numbering alphabet here, if you use this series, just let me show you the series 22 00:02:01,370 --> 00:02:01,960 right here. 23 00:02:03,860 --> 00:02:12,410 Yeah, so I was talking about this series, so now here every single letter has a number associated. 24 00:02:12,410 --> 00:02:18,000 For example, zero is E, 18 is S, 23 is X. 25 00:02:18,680 --> 00:02:27,110 So when you write spy, OK, when you when you write spy over here, what exactly it's doing is. 26 00:02:29,160 --> 00:02:33,370 S is 18, so s is it here? 27 00:02:34,200 --> 00:02:40,620 B, B is 15, so B is 15. 28 00:02:41,430 --> 00:02:45,500 Y is twenty four wise twenty four. 29 00:02:45,960 --> 00:02:51,690 And the key here is for the key here is for so remember one thing. 30 00:02:52,050 --> 00:02:53,430 Plain text. 31 00:02:53,580 --> 00:02:55,230 OK, plain text. 32 00:02:56,180 --> 00:03:02,500 Plus, the key gives you the ciphertext city. 33 00:03:02,740 --> 00:03:13,070 All right, so our plaintext is this key is for so substitution cipher does is it adds all the digits 34 00:03:13,070 --> 00:03:18,560 or 18 plus four gives us twenty two. 35 00:03:18,580 --> 00:03:29,660 So 18 plus four gives us 20 to 15 plus four gives us nineteen and twenty four plus four gets twenty 36 00:03:29,690 --> 00:03:30,200 eight. 37 00:03:32,030 --> 00:03:39,200 OK, so 22 here is W 22, here is W. 38 00:03:40,750 --> 00:03:43,480 19, here is D.. 39 00:03:45,060 --> 00:03:46,710 Now, do we have 28? 40 00:03:46,740 --> 00:03:56,340 Well, this is twenty five, twenty six, twenty seven, and then you have twenty eight, so. 41 00:03:57,720 --> 00:04:04,070 If you are a spy and if you want to tell your friend that you are a spy, you just tell him that, OK, 42 00:04:04,380 --> 00:04:09,270 the key is E and you give this ciphertext. 43 00:04:09,480 --> 00:04:13,920 So when he can, you know, have this WTC. 44 00:04:16,540 --> 00:04:22,270 Now, let's say your friend has this WPEC and now he's confused about how you're going to decrypt it. 45 00:04:22,780 --> 00:04:26,020 Well, you have these letters and you have the key. 46 00:04:26,020 --> 00:04:30,320 So friend knows the keys and friend your friend knows these letters. 47 00:04:30,820 --> 00:04:37,240 So what he has to do is while encrypting, you added so much decrypting, he has to subtract. 48 00:04:37,600 --> 00:04:47,110 So 20 to minus four gives him 18, 19, minus four gives him 15. 49 00:04:48,660 --> 00:04:51,150 Twenty eight minus four gives him. 50 00:04:52,650 --> 00:04:53,720 What does it give? 51 00:04:54,040 --> 00:05:03,000 No, so in that case, what he has to do is if it's greater than 25, he has to jump back four places 52 00:05:03,420 --> 00:05:08,780 here and he has to add twenty eight minus four anyways, is 24. 53 00:05:10,110 --> 00:05:13,560 So 18 again, he checks is as 15. 54 00:05:13,560 --> 00:05:19,440 He checks is B and twenty four he checks is via hurry. 55 00:05:19,800 --> 00:05:21,700 So he got the word spy. 56 00:05:22,050 --> 00:05:27,870 This is how substitution ciphers actually work. 57 00:05:28,440 --> 00:05:33,840 So this is just a basic example of how you encrypt and how you decrypt. 58 00:05:33,840 --> 00:05:42,720 So if I, if I take a different Molcho all the way right here, this process, this process here is 59 00:05:42,720 --> 00:05:49,590 encryption process and this process here is the decryption process. 60 00:05:49,980 --> 00:05:53,280 So you have done encryption and you have the decryption. 61 00:05:53,280 --> 00:06:00,990 And that is how SESAR cipher or the substitution ciphers used to work in the early periods. 62 00:06:01,860 --> 00:06:06,650 Not the next type of cipher we are going to see is transposition ciphers. 63 00:06:06,900 --> 00:06:10,530 But before that I would just like to clear my screen. 64 00:06:13,050 --> 00:06:20,370 Now, let's continue with the next type of Saiful, which is transpositions, Saiful transpositions 65 00:06:20,370 --> 00:06:27,210 Saiful is another form of an ciphering technique and it involves rearranging of the letters of a plain 66 00:06:27,210 --> 00:06:28,230 text message. 67 00:06:28,830 --> 00:06:35,340 So if you want to, let's say write again, spy, then you rearrange it using a key. 68 00:06:35,700 --> 00:06:41,340 But this time you do not add, you just rearrange or you just shift by some particular numbers. 69 00:06:42,780 --> 00:06:46,320 So what is about classical ciphers? 70 00:06:46,320 --> 00:06:49,170 All substitution ciphers is the key is very weak. 71 00:06:49,170 --> 00:06:54,810 And if someone finds out a key, then there is no point in having that encryption at all. 72 00:06:56,200 --> 00:07:04,120 No modern type of ciphers are based on two factors, the first factor being and the first factor being 73 00:07:04,120 --> 00:07:05,030 the private key. 74 00:07:05,560 --> 00:07:12,820 So modern ciphers are basically based on two types, on the type of key and on the type of data. 75 00:07:14,020 --> 00:07:21,100 So when it comes to the type of key, there are two keys which we had discussed, public and private 76 00:07:21,100 --> 00:07:21,350 key. 77 00:07:21,370 --> 00:07:24,870 So this private key stays with you. 78 00:07:25,360 --> 00:07:27,970 You do not tell anyone about this private key. 79 00:07:28,300 --> 00:07:30,910 And the public key is to public knowledge. 80 00:07:30,910 --> 00:07:33,390 Anyone in the world can know your public. 81 00:07:34,360 --> 00:07:41,500 So I hope now you have got more hints to the question which I had told you to look upon in the last 82 00:07:41,500 --> 00:07:41,970 lecture. 83 00:07:43,150 --> 00:07:52,070 And then based on type of data, whether it is a stream cipher or whether it is a block cipher seems 84 00:07:52,100 --> 00:07:52,800 a trifle. 85 00:07:52,810 --> 00:07:58,120 See, I'm sorry, stream cipher is basically a bit by bit. 86 00:07:58,240 --> 00:08:03,160 You know, it's it's a stream of data that gets encrypted simultaneously. 87 00:08:03,160 --> 00:08:12,190 So ACMS encryption, ICMS encryption becomes encryption, whereas in case of Block Saiful a block of 88 00:08:12,190 --> 00:08:19,510 data, a chunk of data comes into the algorithm, it gets encrypted and then only the next data, next 89 00:08:19,510 --> 00:08:21,300 block of data gets encrypted. 90 00:08:21,310 --> 00:08:28,420 So it's a it's not a continuous thing, but it's a block by block thing, a block of 64 bits or a block 91 00:08:28,420 --> 00:08:32,290 of let's say eight bits or a block of 128 bits. 92 00:08:33,340 --> 00:08:39,700 So what happens in case of block cipher is sentences may get break and it becomes very difficult to 93 00:08:39,700 --> 00:08:41,590 rearrange to get a meaningful data. 94 00:08:41,920 --> 00:08:46,420 But when it comes to Stream Saiful, the data gets encrypted in one go. 95 00:08:47,560 --> 00:08:51,070 Now this was about the different types of ciphers. 96 00:08:51,490 --> 00:08:59,260 In the next lecture we'll talk about the most important and the most fundamental topic of symmetric 97 00:08:59,260 --> 00:08:59,860 encryption. 98 00:09:00,220 --> 00:09:00,760 All right. 99 00:09:01,000 --> 00:09:03,480 I will see you in the next lecture.