1 00:00:00,180 --> 00:00:08,280 Now, for example, say, if we create or something like, say, the let's go to your and he I don't 2 00:00:08,280 --> 00:00:21,750 down our cipher letters here and below, we would write down the potential decryption letters and here 3 00:00:21,900 --> 00:00:32,880 we would take forced c h g, h, h you and your we would take the other word that we have created that 4 00:00:32,880 --> 00:00:40,010 is b b y the M or m m y. 5 00:00:40,710 --> 00:00:49,350 Then let's take B or B B Y and and A and and y. 6 00:00:50,890 --> 00:01:00,160 So over here, if you look at it, each has a potential decryption letter of B, M, B or N, similarly, 7 00:01:00,160 --> 00:01:08,290 G has a potential decryption letters, you or A or you have the potential decryption letters. 8 00:01:08,310 --> 00:01:08,640 Why? 9 00:01:09,220 --> 00:01:14,830 So all the others are four letters besides this have no potential decryption letters in this particular 10 00:01:14,830 --> 00:01:15,340 example. 11 00:01:15,340 --> 00:01:15,670 Right. 12 00:01:16,030 --> 00:01:21,670 So a cipher letter mapping shows all the letters of the alphabet and their potential decryption letters. 13 00:01:21,890 --> 00:01:27,340 So as we start to gather encrypted messages, we'll find potential decryption letters for every letter 14 00:01:27,340 --> 00:01:28,110 in the alphabet. 15 00:01:28,450 --> 00:01:33,940 But the only cipher letters that is edgy and you are part of our example. 16 00:01:34,210 --> 00:01:37,590 We don't have potential decryption letters for other cipher letters. 17 00:01:37,900 --> 00:01:42,140 So notice that you has only two potential decryption, only one over here. 18 00:01:42,310 --> 00:01:48,220 That is why, because there are no overlaps between the candidates, which many of which ends with the 19 00:01:48,220 --> 00:01:49,330 letter by itself. 20 00:01:49,930 --> 00:01:55,750 So over here we can use a dictionary value to represent the site letter mapping us follow. 21 00:01:56,080 --> 00:02:05,560 For example, we may use your C4 or say G or in single codes we can use it something like it should 22 00:02:05,560 --> 00:02:12,970 be you then all a for example or for that case. 23 00:02:12,970 --> 00:02:27,150 If we take each, each can be equal to C be then M, B and similarly we can write down C you, which 24 00:02:27,180 --> 00:02:29,130 should be equal to either one. 25 00:02:29,740 --> 00:02:37,870 Now this dictionary has tremendous value that is apart from G h and you you will also have from ABC 26 00:02:37,870 --> 00:02:41,310 to does it and all the others will be basically blank. 27 00:02:41,950 --> 00:02:51,580 You may have C for example, E, which is equal to blank or C let's give comma B, B also has blank, 28 00:02:51,580 --> 00:02:54,730 then C comma C also has blank. 29 00:02:55,130 --> 00:03:00,190 Let's give A commonly also has blank like this for all the others apart from Chenu. 30 00:03:00,760 --> 00:03:07,660 So it shows the potential decryption letters for the G H and you and all the others will have like this 31 00:03:07,660 --> 00:03:09,810 blank as we have represented here. 32 00:03:10,360 --> 00:03:15,940 So because we can reduce the number of potential decryption letters for the cipher letter to just one 33 00:03:15,940 --> 00:03:21,880 letter by cross referencing the cipher little mappings to other encrypted words, we can find what that 34 00:03:21,880 --> 00:03:23,300 cipher letter decrypts to. 35 00:03:23,650 --> 00:03:29,680 Even if we can solve all twenty six cipher letters, we might be able to hack most of this letter mappings 36 00:03:29,980 --> 00:03:32,560 to decrypt most of the ciphertext. 37 00:03:32,890 --> 00:03:38,350 So now that we have covered some part of the basic concepts and some terminologies which we would be 38 00:03:38,350 --> 00:03:43,660 using in this session, let's look at the steps involved in hacking this process. 39 00:03:44,080 --> 00:03:46,490 So let's have an overview of the hacking process. 40 00:03:47,320 --> 00:03:49,330 So the hacking are simple. 41 00:03:49,330 --> 00:03:51,580 Substitution cipher is pretty easy. 42 00:03:51,580 --> 00:03:57,680 Using the four patterns, we can summarize the major steps of hacking process as number one, find the 43 00:03:57,680 --> 00:04:00,580 work pattern for each cipher vote in a ciphertext. 44 00:04:00,850 --> 00:04:07,240 Number two, find the English word candidates that each cipher vote would decrypt to number three, 45 00:04:07,420 --> 00:04:11,170 create a dictionary showing potential decryption letters for each side. 46 00:04:11,170 --> 00:04:15,100 Four letter to act as a cipher letter mapping for each cipher vote. 47 00:04:15,550 --> 00:04:20,950 Number four, combine the five four letter mappings into a single mapping, which we will call, say, 48 00:04:20,950 --> 00:04:22,930 for example, intercepted mappings. 49 00:04:23,380 --> 00:04:28,600 Number five, remove any sort cipher letters from the combined patterns on mappings. 50 00:04:28,900 --> 00:04:33,360 And finally, number six, decrypt the ciphertext with this solved cipher letters. 51 00:04:33,790 --> 00:04:39,910 Now, the more cipher vault in the ciphertext, the more likely it is for mappings to overlap with one 52 00:04:39,910 --> 00:04:44,590 another and the fewer the potential decryption letters for each ciphertext. 53 00:04:44,920 --> 00:04:49,330 This means that in a simple substitution cipher, say one line of text. 54 00:04:49,450 --> 00:04:54,900 So the python hacking advanced level code, this is hacking a simple substitution cipher. 55 00:04:54,910 --> 00:05:00,730 This whole particular line, before dividing into the source code, will have to look at how we can 56 00:05:00,730 --> 00:05:03,630 make the first step of hacking process easier. 57 00:05:03,940 --> 00:05:10,270 So again, in this we would be using the dictionary file used in the earlier session to get the word 58 00:05:10,270 --> 00:05:14,440 pattern for every word in the dictionary file and then saw them in the list. 59 00:05:14,830 --> 00:05:21,940 So coming to our verb pattern module now to calculate the word pattern for every word in the dictionary 60 00:05:22,000 --> 00:05:28,450 of the file, which we have, we would create another file which will check the or make the word patterns 61 00:05:28,450 --> 00:05:34,540 dot python file, and then we will place that particular file, which will have a program to get word 62 00:05:34,540 --> 00:05:39,720 pattern, for example, and it would return the damage of old patterns, which we're passing it as the 63 00:05:39,730 --> 00:05:40,390 parameter. 64 00:05:40,630 --> 00:05:47,320 Now, after creating this file, then only we can go ahead for creating a hacking example for a simple 65 00:05:47,320 --> 00:05:48,520 substitution cipher. 66 00:05:49,240 --> 00:05:55,360 So in the next session, we would see creating of the make vote part file and then we will use that 67 00:05:55,360 --> 00:06:00,880 file along with the dictionary files, which we have from the earlier sessions, and then we will create 68 00:06:00,880 --> 00:06:04,150 our hacking example for simple substitution cipher. 69 00:06:04,750 --> 00:06:06,160 So that's it from this session.