 Hey guys, Mr. Gibson here ready for your next listening cryptography on this unit We're going to try and change tracks here a little bit We've been focusing mostly on creating cipher text using a bunch of different algorithms all different general substitution ciphers Caesar ciphers multiplicative cipher affine cipher all of these mono-alphabetic substitution ciphers have been the focus so far, but we're gonna we're gonna flip it backwards now We're gonna figure out how if we have cipher text and we don't have the key Could be figure out which method and which keys were used to generate the cipher text. This is what we call crypt analysis It's when we attempt to recover plain text without knowing anything about how it was the cipher text was created and The first method that we're going to look at using to determine plain text is what's called a brute force method brute force method is a method where You literally try all the possible keys for a given algorithm So say we have this cipher text here and we have some reason to believe it wasn't ciphered using the Caesar cipher We can talk a little bit later about how maybe we would know that but for now. Let's just make that assumption The good news a bit about the Caesar cipher is that there's only 26 possible keys So if we just try all 26 We could get 26 candidates for our plain text And because there's only 26 we can kind of stare at this for a minute and realize that Key 7 is the one that has a candidate that looks like it has some English language in it And we're done. We did all 26 and we did it and but the computer we as we've seen it It shouldn't be too hard to generate these 26 candidates One thing that you might notice here is that it was very visual What we had to do is actually visually inspect all 26 outputs or 26 candidates and figure out which one looks like it has English in it and for 26 of them, that's not too bad But let's let's look at another cipher the affine cipher and for the affine cipher There's a lot more possibilities. So when we start brute-forcing this or trying all the possible keys to create our candidates We're gonna have pages and pages and pages of candidates Because there's just so many key pairings and in fact we should know that there are 312 candidate text possible for the 312 keys that there are for the affine cipher and If you were eagle-eyed as I was going through all 312 You might have noticed that it was the additive key of 13 with the multiplicative key of 9 That is the one that generated something that looked like English and it looks like that But that again is very visual and when there's more than 26 and only 312 and in the grand scheme of things 312 Isn't that many possible keys? We're gonna study ciphers in this course that have thousands and millions of keys Trying to visually inspect and find the one that looks like English is not going to be the most efficient use of our time So our brute force works when the number of keys is relatively small and because we're not doing this by hand But with a computer when we say relatively small that could be in the thousands or several thousands Maybe even hundreds of thousands and it wouldn't be too hard for a computer to at least generate all those candidates But we're going to need a much more efficient way to score those candidates to figure out which one looks like English because We're not going to want to keep visually looking through the piles and piles of candidate text to figure out which one is actually our plain Text so that's where we're headed in this unit We're going to try and find a few ways to to recover those keys and recover the plain text without having to wade through a sea of Potential decrypted messages and that's brute forcing. Thanks for watching. We'll catch you on the next one