So I want to do an example now, a real example of cryptanalytic attack, okay? So, now let's start with the idea that we're going to have an encryption function and cryptographers would call it a cipher. That's what they like to use. So you now have encryption, but it's not going to be a very good one. [LAUGH] It's going to be a replacement or substitution cipher, where I take one character, replace it with another one, okay? Think letters, the one letter replace it with another, okay? And we're going to use probably the simplest of all substitution ciphers, the so-called Caesar cipher, where I'm just shifting letters in the alphabet. Let's say I'm shifting each English alphabetic letter two slots forward. So a becomes c, b becomes d, and so on. I get that that's not a very good encryption function, but it will illustrate the type of attack that I want to show you. Because there are clever ways to sort of combine brute force with heuristic into a program that allows you to decrypt, almost like magic, based on ingesting data. Let me show you how this would work. Now you know, all of you know, that if I look at a frequency distribution for an alphabet and we'll use English as the example. And there's going to be great predictive aspects of that frequency. For example, in English, the letter z or zed is certainly not going to be seen as frequently in English sentences or talk as the letter a or the letter e or the letter r. And we can be very mathematical about it. We can lay out the exact frequency distribution of the English language. We can lay that out. Okay, so we know that. And we know that if I start with a little sentence and start counting up letters, you know that it's not going to uncover the frequency distribution immediately, right? [LAUGH] It takes time. So as I ingest of sentence, paragraph, as page, ten pages, entire book, by the time I get through the entire book just counting letters and building the histogram, I'm pretty sure we've turned over the frequency distribution. We created it. The more data, the more exact match we have to the frequency distribution, that makes sense? Now, if I'm doing a ciphertext-only, cryptanalytic attack on a substitution cipher that shifts the alphabet forward a couple, then here's what that means. Where you had intended to say apple, and it would have been A-P-P-L-E, well, when you encrypt that, a becomes c, right? And p becomes r and the second p becomes r and so on, shifts forward. If I take that stream of encrypted output and I start building a histogram of that, here's what happens. The letters will magically create the histogram, the frequency distribution of the English language. But for the letters that they were intended to be, the idea would be that now a if it's a c, then where I see c's it becomes a in the frequency distribution, you follow? Or p becomes r. So whatever I typed as my book, my English book, a, b, c, the frequency distribution is going to be the way it was intended by the writer. But when I encrypt it, when I shift the letters, that frequency distribution is preserved. And as I ingest the cipher text, I can write a Python program or I can write a C program or whatever. That just index the data, builds the histogram, matches it up against the frequency distribution and voila, a ciphertext-only cryptanalytic attack using brute force ingest. That's a lot to say, but I think you understood what I said. It's kind of cool, right? Write a program that does the cryptanalysis in an automated way. Keep that in mind. It's kind of fun. It gives you an essence of how we might use computers and systems to combine group force heuristic and other types of things. It's a very effective ciphertext. So we'll see you next time.