 So let's look at a couple of classic ciphers. So in a classic substitution cipher, letters are replaced with letters. And so we might measure the strength of a substitution cipher by the size of its key space. Since the letter A can be replaced with one of 26 letters, and B with one of 25 letters, and C with one of 24 letters, and so on, then the key space of a substitution cipher is going to be 26 by 25 by 24, all the way down to 321, which is an enormous number. So it's a good cipher. Or is it? And the important thing to remember is that every system breaks at its weakest point, and in a cryptosystem, the weakest point is usually the human user. And so the problem is this. A substitution cipher requires the use of a substitution table, but tables pose security risks. They have to be used, and they have to be kept someplace. So that means it's possible for Eve to get in and find that substitution table. A classic solution is to use a keyword. And that works as follows. For a classic substitution, we'll choose a keyword and communicate it. The important thing here is that because the keyword is short but memorable, it doesn't have to be written down, and Eve can't look into Bob's head to find the keyword. Now, if Bob does need to encrypt something, he's going to produce the table as follows. First, he's going to strike out any repeated letters if there are any. So in this case, both the A and the I appear twice, so we'll get rid of the duplicate. He'll use the keyword as the first part of the substitution table. Now, unless the keyword is very long and contains all the letters of the alphabet, quite a few letters will remain, and so he'll just fill in the remaining letters. Typically in alphabetical order. And so let's encrypt the word algebra with the keyword cipher, with the keyword Yahub al-Kindi. Yahub al-Kindi, by the way, is an Arab mathematician who wrote one of the first treatises on cryptography. And so Bob can create the substitution table as he needs it, and then encrypt the message. We can do the same thing with a transposition cipher, so we'll pick a keyword, we'll strike out duplicate letters, and then we'll alphabetize and record the permutation. So we'll alphabetize the letters in our keyword, and to record our permutation, we want to track where everything goes. We can do that if we number the original places, and then identify where everything ended up. So the y in position one ended up at the end, the a in position two went to the beginning, the q in position three went to here, and so on, which gives us our permutation. Now since our word is shorter than our permutation table, we'll need to pad, so we'll add in a couple of random letters, and then we'll apply our permutation.