1 00:00:00,360 --> 00:00:03,420 So now let us understand, encrypting with them a fine. 2 00:00:04,350 --> 00:00:11,910 Now, one downside to using the multiplicative cipher is that the letter capitally always maps to letter 3 00:00:11,910 --> 00:00:12,630 capitally. 4 00:00:12,900 --> 00:00:19,770 The reason is that capital is the index number and zero multiplied by anything will be zero. 5 00:00:20,250 --> 00:00:26,310 Now, we can fix this particular issue by adding a second key to perform a single cipher encryption 6 00:00:26,310 --> 00:00:30,800 after the multiplicative ciphers, multiplication and modding is done. 7 00:00:31,260 --> 00:00:36,120 Not this extra step changes the multiplicative cipher into a fine. 8 00:00:36,780 --> 00:00:43,460 Not a fine cipher has to say, for example, key and B not 60. 9 00:00:43,470 --> 00:00:49,910 E is the integer you use to multiply the letters number and multiply the plaintext by eight. 10 00:00:49,920 --> 00:00:55,650 You are key to the product and then you're more the sum by 66 as you did in the original. 11 00:00:56,850 --> 00:01:02,880 So this means that the Afie inside four has six to six times as many possibilities as a multiplicative 12 00:01:02,880 --> 00:01:03,300 cipher. 13 00:01:03,660 --> 00:01:09,030 It also ensures that the letter A. does always encrypt itself. 14 00:01:09,320 --> 00:01:16,260 OK, now if we come to the decrypting with the fine sign now in the Sisa Saiful, you used addition 15 00:01:16,260 --> 00:01:21,860 to encrypt and subtraction to decrypt in the afine side, for you have used multiplication to encrypt. 16 00:01:22,140 --> 00:01:28,470 Naturally, you might think you can divide to decrypt the defined safe, but if you try this, you will 17 00:01:28,470 --> 00:01:35,190 see that it doesn't work to decrypt with your fine cipher, you need to multiply the keys modular involves. 18 00:01:35,610 --> 00:01:40,470 Now this reveals the more operations from the encryption process. 19 00:01:40,740 --> 00:01:49,980 A modular inverse of two numbers is represented by an expression say for example, A multiplied by modulo 20 00:01:49,980 --> 00:01:52,530 M if it's equal to one. 21 00:01:53,080 --> 00:01:58,770 OK, now where the AI is the modular inverse and anima two numbers. 22 00:01:59,190 --> 00:02:05,610 For example, the modular inverse of five more seven would be some number I would fire into. 23 00:02:05,610 --> 00:02:07,560 I am modulo seven is equal to one. 24 00:02:08,010 --> 00:02:14,490 Now you can brute force this calculation for example like one is is in the modular inverse of five more 25 00:02:14,490 --> 00:02:21,180 seven because firing the one modulo seven is five and second is in the modular inverse of five more 26 00:02:21,180 --> 00:02:25,560 seven because firing the two modulo seven constantly. 27 00:02:25,980 --> 00:02:33,180 So three is the modular inverse of five and seven because if you see five in two three modules when 28 00:02:33,180 --> 00:02:33,980 it comes to one. 29 00:02:34,440 --> 00:02:40,280 So although the encryption and the decryption keys for the Caesar cipher part of the offensive four 30 00:02:40,290 --> 00:02:45,600 are the same, the encryption key and the decryption keys for multiplicative side four are two different 31 00:02:46,380 --> 00:02:52,240 encryption keys can be anything you choose as long as it's relatively blind to the size of this Envisat 32 00:02:52,470 --> 00:02:54,460 which in this case is it? 33 00:02:54,870 --> 00:03:00,240 And if you choose the key fifty three for encrypting with the fine for decryption key in the modular 34 00:03:00,240 --> 00:03:03,140 inverse of fifty three more sixty six. 35 00:03:03,510 --> 00:03:11,460 So that in that case you will have to check for in numerical one because say for example if you see 36 00:03:11,460 --> 00:03:12,330 fifty three. 37 00:03:13,570 --> 00:03:21,490 Multiplied by one more and this whole we would put it in a bracket to Morillo 66. 38 00:03:21,520 --> 00:03:22,890 Now this comes to 53. 39 00:03:23,260 --> 00:03:24,660 So one is not possible. 40 00:03:24,700 --> 00:03:33,020 Similarly, if we just cooperate on this multiple times and just replace this value 53 into two. 41 00:03:33,580 --> 00:03:35,680 Now, this comes to say 40. 42 00:03:36,100 --> 00:03:42,060 If we say 53 into three, and that comes to say twenty seven. 43 00:03:42,580 --> 00:03:47,090 If we say fifty three into four and this comes to say 14. 44 00:03:47,650 --> 00:03:51,730 And here if we say 53 to five, this comes to one. 45 00:03:51,890 --> 00:03:59,220 OK, so now in this case, because now your five is a modular inverse of fifty three and sixty six, 46 00:03:59,710 --> 00:04:02,200 you know that they are fine for decryption keys. 47 00:04:02,200 --> 00:04:09,180 Also five, decrypt a ciphertext letter, multiply that number by five and then model 266. 48 00:04:09,550 --> 00:04:13,610 And the result is the number of original plaintext letters that you have. 49 00:04:14,050 --> 00:04:21,310 So since six to six characters in this set, let's end the war of particular words, the cat using the 50 00:04:21,320 --> 00:04:22,240 key 53. 51 00:04:22,300 --> 00:04:28,880 OK, so if we say over here, OK, now save you capital C will be at the indexical. 52 00:04:29,080 --> 00:04:37,510 OK, so if we say two multiplied by fifty three that will come to say one zero six, which is larger 53 00:04:37,510 --> 00:04:40,210 than this implicit size because the size is sixty six. 54 00:04:40,690 --> 00:04:43,690 So we need two more, one zero six by sixty six. 55 00:04:43,990 --> 00:04:52,060 So if we say one zero six modulo six to six, if this comes to the results for the character of the 56 00:04:52,060 --> 00:04:56,650 index 14, the symbol set that is equal to say zero. 57 00:04:56,860 --> 00:05:00,060 OK, so the symbol C encrypts now. 58 00:05:00,070 --> 00:05:04,690 So if we give you a B, this falls to zero. 59 00:05:05,460 --> 00:05:08,980 I will use the same step for the next letter that is available. 60 00:05:09,340 --> 00:05:16,680 Now this we have done it for C, so if we take a look now the string is at the index number twenty six, 61 00:05:16,680 --> 00:05:18,150 which is equal to twenty six. 62 00:05:18,580 --> 00:05:26,600 And if we say twenty six multiplied by fifty three then modulo sixty six. 63 00:05:26,620 --> 00:05:33,460 Now that comes to say fifty eight and the index at fifty eight is equal to seven. 64 00:05:33,910 --> 00:05:36,970 OK, so we have that eight to seven. 65 00:05:37,580 --> 00:05:42,010 OK now this ring that is being that is Malti. 66 00:05:42,420 --> 00:05:46,960 OK, so over here, this comes at an index of forty five. 67 00:05:47,500 --> 00:05:57,070 So if we see forty five multiplied by fifty three modulo six to see this comes to nine and the index 68 00:05:57,070 --> 00:05:59,990 nine you have the capital G. 69 00:06:00,520 --> 00:06:06,490 So therefore diversity has been encrypted to zero seven right now. 70 00:06:06,520 --> 00:06:14,110 Similarly, if you have to decrypt this zero seven back to the original then we'll have to multiply 71 00:06:14,110 --> 00:06:18,990 the modular inverse that is say fifty three modulo sixty six. 72 00:06:19,330 --> 00:06:21,210 OK, now this comes to five. 73 00:06:21,460 --> 00:06:23,950 So the symbol zero is that the index 40. 74 00:06:24,220 --> 00:06:24,620 Right. 75 00:06:24,850 --> 00:06:29,180 So we say 40 multiplied by five. 76 00:06:29,590 --> 00:06:32,210 Then again modulo sixty six. 77 00:06:32,320 --> 00:06:39,180 And this comes to two which is the index of capital C, symbol seven. 78 00:06:39,430 --> 00:06:40,380 Is that the index. 79 00:06:40,390 --> 00:06:41,110 Fifty eight. 80 00:06:41,500 --> 00:06:47,880 So if we just take it over here, the first one that is we have ok. 81 00:06:48,270 --> 00:06:51,970 OK, so all the index is 40. 82 00:06:52,130 --> 00:06:58,240 OK now the next index is seven seven letters of the index of that is the fifty eight. 83 00:06:58,870 --> 00:07:08,410 So now if we try to do fifty eight multiplied by five modulo sixty six that comes to twenty six. 84 00:07:08,980 --> 00:07:10,590 OK, which is equal to eight. 85 00:07:10,810 --> 00:07:14,590 And then the symbol capital G the index is nine. 86 00:07:14,800 --> 00:07:23,980 OK, and here we say nine multiplied by five modulo sixty six which is equal to forty five, which is 87 00:07:23,980 --> 00:07:32,530 equal to be for the ciphertext zero seven G has encrypted or decrypted back to see eighty with these 88 00:07:32,530 --> 00:07:36,410 capital, which is original plaintext just as expected. 89 00:07:36,920 --> 00:07:37,270 Right.