 Hey all, Mr. Gibson here, next lesson in cryptography. Today we're going to be talking about the Trithymius Cypher, which is one of our polyalphabetic cypher that uses the tabular recta. So we mentioned in a previous lesson that Johann Trithymius was the first person to really put out the idea of the tabular recta. And as such, he had some thoughts about how to generate that running key that you could use along with it. So the Trithymius Cypher is that method. It's an algorithm used to generate the running key. As originally envisioned by Johannes himself, not very secure. And we'll see why in just a moment. But we're going to look at all also that we can make a few improvements along the way. So here it is. So we've got this alphabet 26 letters. And we're going to move through it in a pattern to generate the running key. Now see if you can pick up on the pattern. It's pretty subtle. We start at A. We go to B. Then we go to C. And then we go to D. And then we go to E. And yeah, that's not very secure. That was it. There was no variation on that. Every single time you used his cypher, you would start at the letter A for your key and just move one letter at a time down the alphabet to generate your running key. You can almost can't even call that a key because there's no way to change it. There's one key for the system, and that's it. So if you know it was a Trithymius Cypher, you know the key. You know the method. It's very insecure. Now it turns out there are some ways that we can improve upon this. We just need some flexibility. Johannes was not very flexible. So we're going to introduce some flexibility into the system. So here we go. Let's update the Trithymius Cypher for our use. So the very first thing we could do is just pick a different letter to start at. The idea of moving down the alphabet isn't a bad one, but if you always start at A, you're not really changing much. So here's a situation where we start at the letter H, and we move one letter to the right. We'll call that our offset. You can describe that either numerically with a number, or you can just straight up specify, I'm starting at the letter H. And that acts as your key. So the fact that you could start at 26 different letters to start your running key means there's 26 possibilities here. So the security at this point is about on par as a Caesar Cypher, right? Our Caesar Cypher had 26 possible keys. This has 26 possible keys. It would be a little bit harder if you were to actually look at the output of your Cypher text and analyze that for frequency analysis. It would do a better job disguising it. So if somebody wasn't maybe sure on the Cypher that was used, they would look at the bar chart of a Cypher text created with this Trithymius Cypher, and it would not look like Caesar. So that might be a good way to kind of throw somebody off. But once they narrow it down the Trithymius, only 26 keys, they'll probably figure that out pretty quickly. Let's take a look at how this gets implemented in practice. So again, standard tabular recta, we've generated our running key starting at H, we have the plain text word nevel, and we work through the exact same way with our tabular recta, nothing different. We move down the line, find the row, find the column, find the intersection, or mathematically convert the key and the plain text to numbers, add a mod by 26. Nothing new here. All right, let's update the Trithymius once more. So in addition to saying where we're gonna start generating the running key, we can talk about how far we wanna step to get to the next letter in the running key. So in this example, we have an offset of 18, so we're starting at the letter S, and we're gonna move forward by three every time that we move down the alphabet. So we start at S, and then we move three spots to the right to get to V, three spots to the right to get to Y, three spots to the right to get to B, wrapping around, three spots to the right to get to E, and so on. We just keep going wrapping around and around and around, creating our new running key. Now the reason why that's really powerful is you've got 25 options on how to step forward. You could step one spot, two spot, three spot, all the way up to 25 spots. 26 spots would not be valid because that would just put you right back at the letter S. So we could say that we've got one through 25 or 25 options combined with the 26 options on where to start. We end up with 650 different keys that we could use with the Trithymius cipher. Now that's a lot more than we've actually seen so far. It's about double that what we saw we could do with the Affine cipher. So just with some slight tweaking on a really insecure cipher that Trithymius himself proposed, we get a lot more key options than we ever had with any of the other ciphers so far. And we're gonna see that's gonna be a long-time goal of this course is to keep finding tweaks on ciphers to increase the number of possible keys because that makes the likelihood of being successful on a brute force attack or even using chi-squared scoring in an automated way. It really reduces how likely it is that that's gonna let somebody crack the message. So there's our Trithymius cipher. You now know a few ways to generate that running key in collaboration with your tabular recta. We're off to a good start here on disguising our letter frequencies by using a polyalphabetic cipher. And we're doing that in a pretty easy to implement by hand way and we'll soon start to think about how can we use the computer to speed this up even further. Thanks for watching, we'll catch you in the next one.