1 00:00:00,300 --> 00:00:06,900 Welcome to the next session in Biton advanced level course or python hacking advanced, of course, 2 00:00:07,200 --> 00:00:13,290 in this session we have a look at programming Virginia for now, just an introduction. 3 00:00:13,290 --> 00:00:21,240 Thought about Virginia's Saiful, the Italian cryptograph named Giovanni Batista was the first person 4 00:00:21,510 --> 00:00:25,860 to describe the Virginia Saiful in the year fifteen fifty three. 5 00:00:26,190 --> 00:00:33,960 But it was eventually named after a French diplomat, Blaise David Kinuyo, one of many people who invented 6 00:00:33,960 --> 00:00:35,570 the SAIFUDDIN subsequently. 7 00:00:36,270 --> 00:00:44,940 Now this Virginia Saiful remains unbroken until British polymath Charles Babbage broke it in the 19th 8 00:00:44,940 --> 00:00:51,270 century, not because the original Saiful has too many plausible keys to the brute force. 9 00:00:51,570 --> 00:00:58,080 Even with our English detection module, it's one of the strongest Saiful discussed so far. 10 00:00:58,500 --> 00:01:01,530 So it's even invisible to the world. 11 00:01:01,530 --> 00:01:06,840 But an attack that we have learned in the earlier sessions, not topics which going to cover in this 12 00:01:06,840 --> 00:01:14,070 session are some keys and building strings using the list up and join forces now understanding force 13 00:01:14,070 --> 00:01:15,780 using multiple kilojoule. 14 00:01:15,780 --> 00:01:22,380 In the beginning, Saiful not unlike a Caesar salad for the original, Saiful has multiple keys because 15 00:01:22,380 --> 00:01:25,100 it uses more than one set of substitutions. 16 00:01:25,110 --> 00:01:30,810 Evgeniya Saiful is also known as all poly alphabetic substitution. 17 00:01:30,810 --> 00:01:38,440 Saiful, unlike with the simple substitution, Saiful frequency analysis alone will not defeat the Virginia 18 00:01:38,460 --> 00:01:39,030 Saiful. 19 00:01:39,240 --> 00:01:46,370 Instead of using a new Morigi between zero to twenty five as we did in the Sisa Saiful, we use a little 20 00:01:46,380 --> 00:01:52,800 key for the beginning of the beginning of is a CDs of letters such as an English word or single English 21 00:01:52,800 --> 00:01:55,780 word that is split into multiple single letters. 22 00:01:56,040 --> 00:01:59,220 Is that in plateau's in the plaintext. 23 00:01:59,700 --> 00:02:03,540 Now let's just try to do this manually for. 24 00:02:04,430 --> 00:02:16,010 So let's go to the back and see, for example, the beginning of saying this is the first stop is be 25 00:02:16,010 --> 00:02:16,650 over here. 26 00:02:17,150 --> 00:02:28,300 Second is I told and fourth letters of the plain text is the same that the Z and the fifth is a default 27 00:02:28,340 --> 00:02:28,830 safety. 28 00:02:28,880 --> 00:02:34,390 And the fourth letter of the plaintiff's second and second letter and so on. 29 00:02:34,430 --> 00:02:40,340 When we get the sixth letter of the plaintext, we we're to the Fourth Circuit now using the beginning 30 00:02:40,340 --> 00:02:46,700 of what is the same as using a multiple Caesar cipher instead of encrypting the whole plain text with 31 00:02:46,700 --> 00:02:47,980 one Caesar Saiful. 32 00:02:48,380 --> 00:02:52,910 We apply our differences aside for each letter of the plaintext. 33 00:02:53,240 --> 00:03:03,620 For example, the four suppy would be the AP 15 second would be c e i h told would be C is head twenty 34 00:03:03,620 --> 00:03:04,010 five. 35 00:03:04,340 --> 00:03:09,380 Then it may be is it twenty five against the would be eight zero. 36 00:03:09,800 --> 00:03:17,990 Now each piece converted into an integer also and so does a Caesar Saiful use for example a corresponds 37 00:03:17,990 --> 00:03:25,400 to see the Saiful key here that is zero and the B corresponds to the key one and so on opposite. 38 00:03:25,520 --> 00:03:30,490 So here we would replace C, A and Z to say twenty five in this case. 39 00:03:31,580 --> 00:03:35,610 So now let's look at an example. 40 00:03:35,610 --> 00:03:40,490 Now we'll have the following message like C let's go on a new line. 41 00:03:40,970 --> 00:03:53,620 Say Common sense is not so common and over here we will have the beginning of giving us a piece isn't. 42 00:03:57,950 --> 00:04:03,180 Now, for every character over here, this will not find it. 43 00:04:03,520 --> 00:04:08,310 What we would do is let's go to X and Hillary would see. 44 00:04:11,550 --> 00:04:32,690 Common sense is not so common now let's just place it properly so that we can place the beginning work 45 00:04:32,880 --> 00:04:41,430 below that, so we can combine that together because you just required characters to be displayed so 46 00:04:41,430 --> 00:04:46,150 the colvert could be or easily adjusted to the character of it. 47 00:04:46,980 --> 00:04:47,580 Now. 48 00:04:49,070 --> 00:04:57,470 Let's just place it over here and he'll be all right down to A, B, C, d, e, f, g, h, i, j, 49 00:04:57,500 --> 00:05:02,000 k, l, m and I will be cool as 50 00:05:05,120 --> 00:05:09,490 v, w, x, y, z. 51 00:05:09,890 --> 00:05:12,860 And over here we would just give the. 52 00:05:13,820 --> 00:05:22,100 He's for this starting from zero one, two, three, four, five, six, seven, eight, nine, 10, 53 00:05:22,610 --> 00:05:32,030 11, 12, 13, 14, 15, 16, 17, 18, 19, 20. 54 00:05:33,660 --> 00:05:38,790 Twenty four point five, and then we have taken this, let's write down 55 00:05:41,550 --> 00:05:46,470 every bit, we will repeat this key multiple times 56 00:05:52,470 --> 00:05:53,050 like this. 57 00:05:53,280 --> 00:06:02,370 So now if we are supposed to encrypt CESI in the plain text, would the subject be if we encrypt Ozzies, 58 00:06:02,400 --> 00:06:07,790 a cipher using a suppy corresponding numeric 15, which will result in a little. 59 00:06:07,830 --> 00:06:14,990 Ah, because if you see this too, if you see B, it is 15, 15 plus two comes to 17. 60 00:06:15,000 --> 00:06:16,310 That is OK. 61 00:06:16,330 --> 00:06:21,340 And this will repeat the process for each letter of the plaintext by cycling through this piece. 62 00:06:22,170 --> 00:06:28,830 So let us try and get to the output that we would get when we encrypt. 63 00:06:29,400 --> 00:06:36,720 So if we take this, you will get it for see the characters they are, then you will get it for all 64 00:06:37,170 --> 00:06:44,360 C, W, then L, L, because and Z that is common. 65 00:06:44,390 --> 00:06:51,750 Hence we will get the same character that also say or c e d m. 66 00:06:52,380 --> 00:06:54,600 S d q. 67 00:06:55,570 --> 00:06:58,540 Are M or I? 68 00:07:00,320 --> 00:07:14,480 A and B, who be you, and then if so, this would be actually your decrypted text so long ago, the 69 00:07:14,490 --> 00:07:21,110 Virginia Keys are there, they are more secure in the reason that the more wrong it is, the more combinations 70 00:07:21,110 --> 00:07:21,650 you would have. 71 00:07:22,130 --> 00:07:27,740 So the more likely in the beginning, the stronger the encrypted message will be against the brute force 72 00:07:27,740 --> 00:07:28,190 attack. 73 00:07:28,490 --> 00:07:34,990 So over here, the key that we have taken was a very poor choice because it has only five letters A 74 00:07:35,210 --> 00:07:41,210 or I'll give it the five letters will have only limited combinations because twenty six letters to the 75 00:07:41,210 --> 00:07:48,800 power of five point sixty five will be somewhere around one one eight eight one three seven six one. 76 00:07:49,160 --> 00:07:55,490 So 11 million keys are far too many for human to brute force, but a computer can try them all just 77 00:07:55,490 --> 00:07:56,560 in some few hours. 78 00:07:56,840 --> 00:08:03,250 So it would be or it would force try to decrypt the particular message using the key all five times 79 00:08:03,260 --> 00:08:06,410 E and check whether the resulting decryption was in English. 80 00:08:06,410 --> 00:08:11,840 It would then try to say by A, B or C until it goes to the key piece. 81 00:08:12,260 --> 00:08:18,540 And the good news is that for every additional letter, the key has the number of possible places that 82 00:08:18,560 --> 00:08:19,710 many twenty six times. 83 00:08:19,880 --> 00:08:27,020 So once there are of quadrants of possible what take a computer many years to break.