1 00:00:00,450 --> 00:00:07,770 The ciphertext consists of the letters read from the top left box going down the column from the first 2 00:00:07,770 --> 00:00:11,320 column as well in the particular sheet that we have created. 3 00:00:12,000 --> 00:00:18,310 So how basically the code would be written now is it'll will start reading from top to bottom. 4 00:00:18,780 --> 00:00:23,040 So over here, say, for example, be a O. 5 00:00:23,310 --> 00:00:37,760 S next will be by see you as Sidiki are a h i s g then o n e n g. 6 00:00:38,040 --> 00:00:40,260 Now that symbol there and the dot. 7 00:00:40,680 --> 00:00:43,050 So this is all basically it is going to end. 8 00:00:44,100 --> 00:00:46,840 Now let us see this. 9 00:00:46,870 --> 00:00:52,890 We are related that not creating the particular encryption program here now to make the program for 10 00:00:52,890 --> 00:00:58,830 encrypting, you will need to translate this paper and pencil that we have done right now in the manual 11 00:00:58,830 --> 00:01:00,180 one into a python code. 12 00:01:00,630 --> 00:01:07,560 So now let's look again how to encrypt the string that we have using the key H to Python or characters 13 00:01:07,560 --> 00:01:11,700 position inside a particular string is it's no index. 14 00:01:11,850 --> 00:01:17,910 So we'll add an index as each letter in the particular string in its numbered index. 15 00:01:18,030 --> 00:01:22,920 So add the index for each letter in the string to the boxes in the original encrypting diagram. 16 00:01:23,220 --> 00:01:32,100 Now, for example, we would start over here and let's add here the index starting from say zero, then 17 00:01:32,970 --> 00:01:39,310 say one, two, three, four. 18 00:01:39,480 --> 00:01:42,510 So on in the last one. 19 00:01:43,020 --> 00:01:49,000 OK, so we would be adding the seven we have added. 20 00:01:49,200 --> 00:01:55,920 Similarly, we will do it for all of so we it will be from eight to 15, then 16 to twenty three and 21 00:01:56,130 --> 00:01:59,670 twenty nine because of this from starting from zero onwards. 22 00:02:00,660 --> 00:02:07,320 So just let's keep on writing the index values there that's done. 23 00:02:07,320 --> 00:02:15,360 10 15 move to the next one, say 18, 19. 24 00:02:17,190 --> 00:02:34,650 20, 21, 22, 20, three, four, five, six, twenty seven, twenty eight, and the last one. 25 00:02:34,770 --> 00:02:35,660 Twenty nine. 26 00:02:36,360 --> 00:02:39,720 So we have added the index to the each of these boxes. 27 00:02:39,930 --> 00:02:46,830 So these boxes show the first column which has the characters, which will be like zero eight, 16, 28 00:02:46,830 --> 00:02:53,980 20, for which the characters are capital P A or is the next column will have the characters on indexes. 29 00:02:54,000 --> 00:02:58,740 That is one nine seventeen twenty five which are Sivi c u. 30 00:02:58,740 --> 00:02:59,120 S. 31 00:02:59,730 --> 00:03:05,940 I notice the pattern emerging that the end column has all the characters in the particular string at 32 00:03:05,940 --> 00:03:14,310 index zero plus and minus one eight plus and minus one sixteen plus and minus one and twenty four plus 33 00:03:14,310 --> 00:03:15,150 and minus one. 34 00:03:15,510 --> 00:03:22,460 For example, if we write down something like over here, so zero plus zero equals to zero. 35 00:03:23,010 --> 00:03:32,190 Similarly seven plus zero equals two, one or two plus zero equals two. 36 00:03:32,640 --> 00:03:44,910 To similarly say three plus zero equals two three, four plus zero equals two four five plus zero equals 37 00:03:44,910 --> 00:03:52,380 two five six plus zero equals two six seven plus zero equals two seven. 38 00:03:52,770 --> 00:03:58,370 But when we come over here, say eight here also we C plus. 39 00:03:58,860 --> 00:04:01,260 So you will see eight plus zero. 40 00:04:01,650 --> 00:04:02,800 That's equal to eight. 41 00:04:03,420 --> 00:04:11,700 Now here we will add one to it and we would make it all rather we would make it something like, say, 42 00:04:11,730 --> 00:04:13,410 one plus eight. 43 00:04:13,590 --> 00:04:14,720 That's equal to nine. 44 00:04:15,090 --> 00:04:17,550 So we're going to take your one for substituting. 45 00:04:17,730 --> 00:04:20,880 So here again, we will see two plus eight. 46 00:04:21,270 --> 00:04:23,840 That's equal to in here. 47 00:04:23,880 --> 00:04:26,730 We will take, say, three plus eight. 48 00:04:27,090 --> 00:04:29,080 That's equal to eleven here. 49 00:04:29,130 --> 00:04:30,990 We would take four plus eight. 50 00:04:31,020 --> 00:04:32,270 That's equal to twelve. 51 00:04:32,730 --> 00:04:34,470 Similarly, five plus eight. 52 00:04:34,560 --> 00:04:38,700 That's equal to thirteen C six plus eight. 53 00:04:39,210 --> 00:04:40,580 That's equal to fourteen. 54 00:04:40,980 --> 00:04:46,380 And finally the seven plus eight, that's equal to fifty. 55 00:04:46,680 --> 00:04:50,490 But when we come over here, we again substitute zero plus sixteen. 56 00:04:50,790 --> 00:04:52,500 That's equal to sixteen. 57 00:04:52,980 --> 00:04:53,940 But over here. 58 00:04:57,740 --> 00:05:01,650 Let's make it one plus 16, that's equal to 17. 59 00:05:02,720 --> 00:05:07,300 Now we'll have to just decrease the size of it here. 60 00:05:07,310 --> 00:05:18,710 We would say to plus 16, that's equal to 80, then three plus 16, substitute for plus 16. 61 00:05:20,060 --> 00:05:22,490 It would be five plus 16. 62 00:05:24,160 --> 00:05:30,770 Then it would be six plus 16 and finally it would be seven plus 16. 63 00:05:31,450 --> 00:05:37,380 When we come down to the last row, we would make again zero plus twenty four equals twenty four. 64 00:05:37,780 --> 00:05:45,140 But over here we would substitute seven plus twenty four equals twenty five. 65 00:05:45,610 --> 00:05:57,760 Similarly say two plus twenty four, then say three plus twenty four and similarly four plus twenty 66 00:05:57,760 --> 00:06:03,460 four finally will make it this five plus twenty four. 67 00:06:04,870 --> 00:06:11,140 Now, in this way, we are going to get the index of each box, which will follow the predictable pattern. 68 00:06:11,470 --> 00:06:16,540 Now, there will be an exception for the last rule in the seventh and the eighth column, because when 69 00:06:16,540 --> 00:06:21,460 you see twenty four, that is seven minus one and twenty four plus eight minus one would be greater 70 00:06:21,460 --> 00:06:25,150 than twenty nine, which is the largest index in the string. 71 00:06:25,360 --> 00:06:31,630 Now in those cases you will have to only add zero eight 16 and in that is the scapegoat for that. 72 00:06:32,020 --> 00:06:34,570 So what's so special about the numbers. 73 00:06:34,570 --> 00:06:41,140 Zero eight sixteen twenty four in this case that these numbers you when you start from zero, you are 74 00:06:41,140 --> 00:06:41,620 the key. 75 00:06:41,650 --> 00:06:42,890 That is eight over here. 76 00:06:43,120 --> 00:06:45,450 So zero plus eight is what you get there. 77 00:06:45,700 --> 00:06:48,670 Similarly then you add eight plus eight, you get the 16. 78 00:06:48,850 --> 00:06:51,480 When you add 16 plus eight, you get the twenty fourth. 79 00:06:51,490 --> 00:06:58,330 Hence we are getting the first and zero then added to it, added to it and again added it as the key 80 00:06:58,330 --> 00:06:58,740 to it. 81 00:06:59,350 --> 00:07:01,570 So hence the result is coming like this. 82 00:07:01,840 --> 00:07:02,110 Fine. 83 00:07:02,350 --> 00:07:08,410 Now the last one, when you say twenty four plus eight, it would be 32, but 32 is larger than the 84 00:07:08,410 --> 00:07:09,370 length of the message. 85 00:07:09,550 --> 00:07:16,600 So you will stop at twenty four there and for the end column strength starting at the index and continue 86 00:07:16,600 --> 00:07:18,680 adding the eight to get the next index. 87 00:07:18,820 --> 00:07:24,700 Keep adding it as long as the index is less than the length of the message, that is less than 30 at 88 00:07:24,700 --> 00:07:26,980 which point move to the next column. 89 00:07:27,190 --> 00:07:33,520 So if we can imagine each column in a particular string, the result will be the list of the eight string 90 00:07:33,520 --> 00:07:34,840 that we will be getting. 91 00:07:34,990 --> 00:07:41,680 For example, in the first one you would be getting the string as B A whole is then you would be getting 92 00:07:42,050 --> 00:07:45,760 I see you as then city. 93 00:07:46,120 --> 00:08:00,760 They are a then say h l s g c o n e then say n g the particular symbol and let's cooperate on the symbol 94 00:08:00,760 --> 00:08:01,090 here. 95 00:08:05,650 --> 00:08:10,240 Similarly, here again, let's go on the same symbol 96 00:08:13,360 --> 00:08:19,740 two times, then you will have him and similarly here you would have the edge see E! 97 00:08:20,230 --> 00:08:23,820 So something like this is what basically we would be encrypting there. 98 00:08:24,040 --> 00:08:25,760 So now let's have a look. 99 00:08:25,870 --> 00:08:28,860 And we would create a particular program for the same one. 100 00:08:29,020 --> 00:08:33,130 And let's see if we get the similar output that we have created over here manually. 101 00:08:33,940 --> 00:08:38,490 So now we would go for the source code for transposition cipher encryption program. 102 00:08:39,370 --> 00:08:41,540 So we have come to the python environment. 103 00:08:41,580 --> 00:08:43,330 Now, let's create a new file here. 104 00:08:43,750 --> 00:08:54,590 And we would start by forcing Emboli Paperclip, after which we would define the mean here. 105 00:08:55,010 --> 00:09:00,220 We want to define see my messages, dear. 106 00:09:00,670 --> 00:09:04,570 Now, that's equal to the same string that we have taken, say, Biton. 107 00:09:07,120 --> 00:09:17,710 Hacking calls, message written, but also then we define here, say, my keister, and that's equal 108 00:09:17,710 --> 00:09:22,270 to eight as we have taken in the manual, one also that we should get the same output there. 109 00:09:22,510 --> 00:09:28,360 Then we would have the ciphertext Nestea and that's equal to now. 110 00:09:28,370 --> 00:09:33,760 Here we are going to call it encrypt message SDR. 111 00:09:34,060 --> 00:09:41,400 Which will he or we would be passing Mike ETR and my message STF. 112 00:09:41,980 --> 00:09:53,920 So after this we would see a print command and we would give you plenty cipher text to start with in 113 00:09:53,920 --> 00:09:57,610 that concatenate or pipeline symbol. 114 00:09:58,920 --> 00:10:05,460 And after that, we would copy encrypted text to the ciphertext clipboard, so we would say, here, 115 00:10:05,460 --> 00:10:14,190 use the paperclip dot copy method and see cipher text Steyr.