Let me tell you where we're going to go in the next few modules. So where we're going is a journey through encryption technology, that is crucial for blockchain technology. We start out with a simple example of a cipher, that we use a key to decrypt and the same key is used to decrypt. One of the problems with this is transporting the key. So you might send an encrypted message, but how do you transport the key? That might not be secure. So then we explore an idea of sharing a common secret, and then finally, we do asymmetric ciphers that allow for both the private and public key. But first, some definitions. Cryptology is not the study of the dead. So cryptology is a science that deals with two branches; cryptography and cryptanalysis. So cryptography is the science of making something secret, and cryptanalysis is the science of decoding. So you get something that is encrypted and you try to break the code. So we will focus mainly on the cryptography part. Notice there are three sub-branches of cryptography. We'll talk about the first two; the symmetric ciphers, the asymmetric ciphers. So a symmetric cipher has got a common key. So this stuff is been around for a long time. We will start our journey with the ancient Greeks. Indeed above 400 BC, there was the first attempt of a cipher system called the Polybius square. It's really simple. We've got a five by five grid, and we just fill out the letters of the alphabet. I'm using the English alphabet, and notice we have 26 letters. So one of the cells is going to be ambiguous, an i and a j. So the way to do this, we're going to encrypt the message, CAM, C-A-M. So C-A-M, we can easily read off the square. The C is basically in the first row, the third column. So 13, 1, 3. The A is first row, first column, 1, 1, 11. The third one M, is in the third row, and the second column, 32. So this is our encrypted version of CAM. Of course, this is not a great cipher because anybody with this grid can easily decrypt it. You just go, 13 is the first row, third column. It's a C. So it's not a very strong method, but it's interesting, that is so old. So things progressed. The next cipher is called the Caesar cipher. The idea here is we just shift the alphabet by a fixed amount. So in my example here, the shift is three. So a C becomes an F, an A becomes a D, and M becomes a P. So it's very straightforward. Indeed, the way that it was operationalized with two wheels. So the outer wheel and the inner wheel, and you could shift the inner wheel by the amount of the shift, and then just read the letters off very easily. So in our example, a shift of three. So what is interesting with this one is what happens if we shift, let's say one. Well A goes to B, B goes to C, but what about Z? Where does it go to? It turns out that it goes back to A. So we cycle around. So it's no surprise that this is a disk. This is what it actually look like with the Greek letters in it. So interestingly, this is an early example of modulo arithmetic. So if we shift 26, then we're back to where we started, A becomes A. If we shift 27, then we circle around, and an A becomes a B. So the shift is pretty effectively one. If we shift 54, that's the same as two. So 54 is 26, 26, and what's left over is two. So again, this is a very early example of modulo arithmetic, which is super important for encryption and what we're going to do today. So let's actually look at a different way to do this. I want to do this in Excel. So first, some definitions. So the plaintext is the message. So in our simple example, the message was CAM, C-A-M. The ciphertext is the encrypted message. In our example, FDP. So this particular type of cipher is what's known as a monoalphabetic cipher. So that means that each letter is associated with another letter. A Caesar cipher is not particularly effective, because you can undo it by trying 25 different shifts. So this is a cipher that obviously would not recommend, but we're going to learn from this and develop substitution ciphers that are much more sophisticated. So here's an example. So now what I'm going to do is to put the letters of the alphabet in the first row. Then below that, I'm going to put a keyword, cipher. So C-I-P-H-E-R. Then after the key word, I will just continue the alphabet. So after the R comes an S, a T, U, V, and I make sure I don't repeat any of the letters in the word cipher. So this provides a complete map of all of the letters and is much more sophisticated than a Caesar cipher. So this is also just one example of mixing the letters up, by reassigning letters, just one example. Indeed, there are huge number of examples. So it could be 26 factorial different ways to reorder. This is a very large number. So it would take years of computing time to undo this particular substitution cipher by brute force. But it turns out, we don't need brute force. Why? Well, it turns out with this type of cipher, it is vulnerable to what's known as frequency analysis. So it turns out that within the English language, certain letters are more frequent than other letters. You can see the vowels in particular, are much more frequent than the consonants. So what you can do is, look at the ciphertexts, you don't need to try different combinations by brute force. You actually just count the frequency of the letters, and you can deduce what the substitutes actually are, and you can break the cipher. So this particular type of cipher is really not secure. We need to go to the next level which we will do next with the Vigenere cipher.