 Hey y'all, this is your Gibson here with our next lesson in cryptography and in this lesson We're going to be moving into our unit on polyalphabetic ciphers. So learning how to use different Keys besides just the singular set of keys you've been using in our mono alphabetic ciphers to generate ciphertext with a little bit harder time for people to analyze and decrypt So let's move into it the the primary tool that we're going to be using in all of our polygraphic ciphers is known as a tabular Recta and the tabular Recta is Basically just a square table With a bunch of different alphabets in it all English, but they're kind of offset from each other from one row to the next This term was invented by a German author a monk Johannes Trithemius, and we'll see that one of the ciphers we're going to cover is named after Johannes And he was alive in 1415 hundreds or so and I guess that's a nice Picture of him there on the right One interesting fact I discovered when researching Johannes is that his most famous piece of work was actually on like the band Booked list for the Catholic Church, which he was a monk for From 1609 all the way up to 1900 and I guess the reason why is when you look at that book It looks like it's about magic and kind of Guess that was something not tolerated by the church at that time Specifically talking about how to use spirits to communicate over long distances, but it actually turns out that That book was encrypted so it uses what's called a cover text And which is more of a stegan a stegan a graphic tool to disguise not like the meaning that we use with ciphers But to actually hide it in an existing message So my guess would be is the magic text is a cover text for the true message Which is actually all about cryptography and steganography So there's three volumes of that they've all been decrypted and they're really all about this kind of code making and code breaking I suspect that when that true true Message was revealed is when it finally was able to come off the band book list there for them the church. So All right, let's learn how to use it So let's let's start with enciphering a message So we can see there's the tabular rector there on the right. We've got rows and columns We have kind of the top row a through z all of those letters They're going to be representative of our plain text and then we've got the first column a through z Which are going to represent our keyword letters and we're going to find the intersection of row and column in the middle And so all you know 26 by 26 letters there in the middle are representing our cipher text So we start out by creating what's known as a running key So because our key is not going to be fixed It's going to be changing depending on which character that we're trying to encipher We'll need some sort of pattern or way to generate Not a single key, but a collection of keys in order We call that collection of keys the running key because we can run out that pattern as long as we need to this one ran All the way out to a to z we probably didn't need that many if all we're going to encrypt is the message my secret So we'll just trim that back. So it ends at the letter h. So now we've got I mean we got there eight Letters in our running key to match up with the eight letters in our plain text and now let's actually use this so we're going to select the first row there our first column there and our letters and our message and We're going to make sure that the running key is perfectly aligned over our plain text So we'll take the key a and the plain text of M And then we're going to find the row that matches the keywords So we're going to look up that first column there find a and that's the row We're going to highlight and then we're going to go look for the column with the plain text letter M and highlight that In where the row and column we've highlighted intersect that is going to be our cipher text letter So in this case, I'll be the letter M a Mathematical way to think about that is if we convert convert both the plain text and the running key from letters to their corresponding integers Add them mod by 26. We can calculate The the cipher text letter that way as well that might sound a little bit familiar that sounds a lot like Caesar shift Right, we take our plain text convert to a number. We add the key to it mod by 26 So in that that's true all of our tabular recta base ciphers that we'll study in this unit are all based off of Caesar They're just kind of a modification of the Caesar cipher, which was one of our simpler ciphers But we're gonna see these modifications of rotating keys are gonna make this really a lot more powerful So, okay, our first letter in the cipher text is M. Let's move to the next pairing of letters So we're gonna take a B from the key and a Y from the plain text highlight those rows and columns and find the intersection of Z So again, we could do this mathematically We take the plain text Y the cipher the running key be convert them both the numbers add them by 26 We get 25 which is equivalent to Z And we can start following this pattern a little bit quicker now, so S and C intersect at you and we can keep moving our way down the line So then D and E intersect at H E and C intersect at G F and R intersect at W G and E intersect at K and H and T intersect at the letter a So we've got our cipher text message Let's look at deciphering a message So we'll take our cipher text here We've got our cipher text of h a x k o s w i I made a little bit simpler running key here So instead of rotating through the entire alphabet We just have kind of two letters that it alternates back and forth from so this is just a different way to set up a running key And we're gonna do the exact same process except we're gonna have to go in a slightly different order When we take that first pairing of letters just like before we're gonna use the key To help figure out which column sorry which row to highlight and Then now we're gonna look for the cipher text letter in that row H That matches and then we're gonna follow that column up to figure out the plain text letter that corresponds to it Which is E? So again the same letters correspond to the same things in the tabular recta But without the order that we're kind of highlighting things and is gonna change Before was highlight the row highlight the column and then look for the intersection now. It's going to be highlight the row Find where were the intersection occurred and then follow the column back up to where we started with Mathematically that's the same thing as taking your cipher text letter in your running key converting to integers and then subtracting So maybe that's no surprise if the encryption process for tabular recta was similar to the Caesar cipher The decryption process should be similar as well and low and behold it is so when we decrypt Caesar We take the cipher text letter and we subtract off the key. Well, that's exactly what we're doing here So we'll move through again K and a We highlight the row we find where the intersection occurred we follow the column back up and we get a Q Mathematically that's as if we took a and K converted to zero and ten We did zero minus ten to get negative ten negative ten mod twenty six is sixteen and that is equivalent to a Q So again, we can move a little bit quicker here to kind of get our last few letters So if we look at the row D find the intersection of the cipher text letter X and follow it up We get a U Next pairing of letters we get an a That's pairing of letters we get an L and we get the word equal Looks like I cut it short there because I was getting tired of all those letters and that's how we use a tabular recta So we can see there's a lot of parallels to the Caesar cipher that we've already been studying And we have this nice visual tool here that helps us make these calculations a little bit quicker I think that's the history behind that table is that we were you're able to use that table without having any knowledge of Arithmetic or modular arithmetic which back when this was really becoming popular in the 1500s Not a lot of people had access to knowing how to do arithmetic let alone modular arithmetic But they can follow rows and columns in a table pretty quickly and still gives them some pretty powerful ways to encrypt messages So what we're going to look at for the rest of this unit are the different ways to set up those running keys We're going to see some are more secure than others so that when you encrypt your message using the tabular recta You know how secure that encryption process was Thanks for watching. We'll catch you on the next one