Cryptography lecture notes
Front page
Latest update: 24/02/2021.
This page contains some useful information related to the course and the lecture notes. Note that there are some useful buttons above the text, in particular one to download the notes as a well-formatted PDF, for offline use.
Prerequisites
The course assumes that you are familiar with previous maths courses from your degree. In particular, we will be using concepts from Probability theory and Discrete mathematics, and make extensive use of modular arithmetic. Refreshers for these topics can be found in Appendix D and Section 5.3.
Exercises
Besides the exercise lists that you will have for practices or seminars, these notes also have some exercises embedded into the explanations. These are mostly easy exercises, designed to be a sort of ‘sanity check’ before moving to the next topic. Hence, our recommendation is that you stop and think about every exercise you encounter in these notes, instead of rushing through the content. You might not always be able to write a full and formal solution, but make sure to get at least an intuition on each exercise before moving on.
SageMath
SageMath (often called just Sage) is a powerful computer algebra system that we will use during the course to illustrate many concepts. It follows the Python syntax, which you will be familiar with, and comes equipped with many functions that are useful for cryptography.
These notes will sometimes provide chunks of Sage code, so that you can play with some of the schemes that we will introduce. You are also encouraged to try and implement other schemes, or use Sage to double-check your solutions to exercises.
There are two ways that you can use Sage:
- Download it from https://www.sagemath.org/download.html. This will allow you to run SageMath locally. It also comes packaged with a Jupyter-style notebook, for ease of use.
- Use it online at https://cocalc.com/app. This also comes in both terminal and notebook flavors. CoCalc has a freemium model, and in the free version you will get an annoying message telling you that your code will run really slow. Nevertheless, the free version is more than enough for the purpose of this course.
The documentation at https://doc.sagemath.org/ is pretty good, although most of the functions that we will use are self-explanatory.
Bibliography
Boaz Barak. An Intensive Introduction to Cryptography. Available freely from https://intensecrypto.org/public/.
Richard Crandall and Carl B Pomerance. Prime numbers: a computational perspective, volume 182. Springer Science & Business Media, 2006.
Jonathan Katz and Yehuda Lindell. Introduction to modern cryptography. CRC press, 2020.
Christof Paar and Jan Pelzl. Understanding cryptography: a textbook for students and practitioners. Springer Science & Business Media, 2009.
Mike Rosulek. The Joy of Cryptography, 2017. Available freely from http://web.engr.oregonstate.edu/~rosulekm/crypto.
Changelog
- 24/02/2021. Sections 9 and 10 and Appendix C added.
- 12/02/2021. Section 8 added. Some typos fixed in Sections 6, 7 and Appendix B.
- 05/02/2021. Section 7 and Appendix B added. Minor fixes in Section 6. CRT moved to Section 5.
- 26/01/2021. Section 6 and Appendices A and D.4 added.
- 21/01/2021. Minor fixes and additions in Sections 4 and 5.
- 18/01/2021. Remainder of Section 5 uploaded. Some typos fixed in Sections 3 and 4.
- 13/01/2021. Section 4 uploaded.
- 08/01/2021. Section 3 uploaded.
- 07/01/2021. Section 5.3 and refreshers in Appendix D added. Added code for LFSR. Some typos fixed in Sections 1 and 2.
- 04/01/2021. Sections 1 and 2 uploaded.