
Welcome to The Mathematics of Cryptography. I'm James and this is simply an introduction to the course, what to expect, and to give you the notes that you will fill in during the course.
If you need an app for writing on the pdf, search for "pdf online" (formerly, Xodo) which is an app that works in your browser.
An introduction to secret messages, including the difference between a code and a cipher.
We take a look at one of the simplest kind of ciphers, and state some important definitions.
Modular arithmetic will be the most important mathematical idea of this course.
Solution Video to Modular arithmetic exercises.
Part 2 of our introduction to modular arithmetic, and our first real proof.
Solution video to Modular arithmetic exercises part 2.
We start to formalise some of the ideas of cryptography. We define additive ciphers, with some examples, and look at decryption of additive ciphers and the number of possibilities.
We look at the mathematical concept of common divisors and greatest common divisor and being coprime, with examples. We introduce Euclid's algorithm as a method to find the great common divisor.
We look at Bezout's identity, which writes the greatest common divisor as a combination of the two original numbers. We find this by reversing Euclid's algorithm.
Solution Video to common divisors and Euclid's algorithm exercises.
We introduce the multiplicative cipher, and how to find the inverse key for decryption. Then we take a quick look at affine ciphers.
Solution Video to Multiplicative and Affine ciphers exercises.
We look at the general substitution cipher, and its huge number of possibilities.
Solution Video to General Substitution ciphers exercises.
Frequency analysis isn't a difficult idea, yet it completely breaks the general substitution cipher.
Solution Video to frequency analysis exercises.
We take a look at a different kind of cipher, this time it is a cipher that mixes up the order of the letters, like an anagram. But, underneath we will discover the same maths as the substitution cipher.
We will look at a procedure that allows you to send a message without exchanging keys, and discuss the advantages and disadvantages of this idea.
We take a look at a cipher that is more difficult to break because it uses a different cipher for each letter of the message.
Solution Video to Vigenere cipher exercises.
We take a look at the Kasiski test, one of the first methods found that helped break the Vigenere cipher.
We recap some of the important ideas from probability which we will need in the next lecture.
We introduce the idea of the index of coincidence, which measures the strength of a cipher.
We find a formula for approximating the key length.
Solution Video to breaking Vigenere exercises.
Is there such a thing as an unbreakable code?
We introduce the infamous Enigma machine, as used by Germany in World War II.
We take a look at the maths of combinations and permutations.
We look at the total number of Enigma settings.
Solution Video to Enigma exercises.
We look at one of the methods to break Enigma, as used by the British codebreakers of Bletchley Park. These principles were the basis of codebreaking machines known as the bombe.
We look at the bombe menu, an idea that improved the performance of the bombe codebreaking machines.
Solution Video to breaking Enigma exercises.
We describe Diffie Hellman key exchange which is a method for the send and receiver to create a shared secret key. This can be done using exponents, as is the case in the El Gamel cipher, or using elliptic curves.
Solution Video to Diffie Hellman exercises.
This is a method of encryption often found on the internet. The idea is to create a public encryption key, and to keep a secret, private, decryption key.
We take a look at two mathematical theorems on which RSA depends. They are Fermat's Little Theorem and the Chinese Remainder Theorem.
We look at how the RSA decryption key is created.
Solution Video to RSA exercises.
We look at some of the elementary ways that RSA can be broken if used incorrectly.
Solution Video to breaking RSA exercises.
How do we know if a message really is from who it is meant to be from? We take a look at one of the advantages of public key encryption, like RSA, and that is in the authentication of messages.
In this last lecture, we take a look at the future of cryptography, including ideas such as quantum key exchange.
Cryptography is the science of secrets and secret messages. In this course we will learn more about the mathematics behind codes and code breaking.
The course will start with easy ciphers and how they were broken, before moving to more sophisticated ciphers including the famous World War II Enigma machine and modern internet encryption.
The course contains over 6 hours of lectures, with an additional 2 hours of exercises and solution videos.
Topics covered in the course include:
Monoalphabetic ciphers;
Modular arithmetic;
Polyalphabetic ciphers;
The Enigma Machine; and
Public Key Cryptography.
During this course we will introduce many important mathematical concepts including modular arithmetic, sets, functions, probability, statistics, combinatorics and number theory.
Ciphers and techniques in the course include:
Substitution ciphers;
Transposition ciphers;
Commuting ciphers;
Frequency analysis;
The Vigenere cipher;
The Kasiski test;
Index of Coincidence;
The Friedman test;
Diffie-Hellman;
Elliptic curve cryptography;
RSA internet encryption; and
Digital signatures.
Finally, we will end the course with a brief look at the future of cryptography.
The course is intended to be self-contained and comes with a set of notes that you can complete as we go through the course.
The course comes with many exercises after each section, with solutions, that allow you to test what you have learnt.
Cryptography touches on a broad range of topics and is one of the most fascinating applications of maths. By the end of this short course, we will have introduced several fundamental ideas in mathematics, and even answer whether there such a thing as an unbreakable code.