The Mathematics of Cryptography with Dr James Grime (Udemy.com)
From Caesar to Enigma, and beyond
Created by: James Grime
Last updated August 2025
Our take
Based on the ratings of 424 students, a sample of their written reviews and the syllabus, as the course stood in August 2025. No course pays to be reviewed.
Dr James Grime, known from Numberphile, covers cryptography from Caesar shifts to RSA in about eight hours across 45 lectures. Roughly two of those hours are exercises and solution videos. The syllabus spends the most time on monoalphabetic ciphers, over three hours, then moves through polyalphabetic ciphers, Enigma and public key methods like Diffie-Hellman and elliptic curves. It's a math course first. There's no coding, and the requirements ask for comfortable algebra. It suits curious teenagers, students and adults who want the numbers behind the history.
Reviewers like Grime's enthusiasm and the way hard ideas get broken into small, digestible steps. One student enjoyed finally doing the math behind things usually shown only as flowcharts. The complaints are specific. Two reviewers find the handwritten notes on screen hard to read, one felt parts were read from a script, and a two-star reviewer found errors in the first quiz answers that were fixed in the PDF but not in the video. Still, only 8 of 424 ratings fall below three stars.
The course was last updated in August 2025, and the material is mostly history and number theory that doesn't go stale. With about 4,300 students it's a niche pick, but a well-liked one at 4.6 stars. For anyone who wants the math of Enigma and RSA without a programming detour, it's an easy recommendation. Security engineers who need applied crypto should look elsewhere.
Pros
- Grime's enthusiasm keeps a tough subject from feeling dry or overwhelming, reviewers say
- You work through the real math of Kasiski, Friedman, Diffie-Hellman and RSA, not just diagrams
- Exercises after every section with solution videos and a companion set of notes
- Rated 4.6 from 424 reviews, with 292 five-star ratings
Cons
- Handwritten notes on screen are hard to read, a complaint that comes up more than once
- Some quiz answer errors were corrected in the PDF but not in the lecture videos
- No coding or practical implementation, so little direct use for security work
I really enjoyed actually doing the math of all these things I hear about but only ever see flowcharts or diagrams of
Beginner in cryptography, but you need solid school algebra. A good fit for keen teens and non-mathematicians who are comfortable with equations.
What you will learn
- Understand the methods of classical cryptography such as monoalphabetic ciphers, polyalphabetic ciphers and transposition ciphers.
- Understand the mathematics of modular arithmetic.
- Understand and apply the methods of classical cryptanalysis such as the Kasiski Test and Friedman Test.
- Understand the Enigma Machine and the method used to break Enigma in World War II.
- Understand the mathematics of RSA internet encryption.
Course content
7 sections · 45 lectures · 8.3 hours of video
- 1Welcome and Resources 1 free preview1 lecture · 4 min
- 2Introduction1 lecture · 9 min
- 3Monoalphabetic Ciphers 1 free preview18 lectures · 3.4 hours
- 4Polyalphabetic Ciphers8 lectures · 1.4 hours
- 5Enigma7 lectures · 1.3 hours
- 6Public Key Cryptography9 lectures · 1.8 hours
- 7The Future1 lecture · 12 min
Who it is for
The instructor says it suits
- Young people who want to see mathematics beyond the classroom.
- Students who want to learn more about mathematics.
- Non-mathematicians and the mathematically curious.
- Anyone who wants to learn more about the maths and science of Enigma.
- People who want to see the applications of mathematics.
- Anyone who wants to learn more about classical and modern encryption.
What you need before you start
- Arithmetic skills, such as addition, multiplication and division.
- Algebra skills, such as, expanding brackets, rearranging formulas, and solving equations.
- Any other mathematical ideas, such as modular arithmetic, will be introduced in the course.
How it compares
Against the other 163 rated Udemy courses in Math on CourseDuck:
- Rating4.6 out of 5higher than 38% of them
- Reviews424#59 of 164 by number of reviews
- Length8.3 hoursshorter than 60% of them
- Last updatedAugust 2025more recently than 60% of them
Course Description
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.
Instructor Details
- 4.6 Rating
424 Reviews
James Grime
Dr James Grime is a mathematician and public speaker from the UK. James travels the world giving public talks on the history and mathematics of codes and code breaking. James has taught at the University of York, the University of Cambridge, and the Open University. James is also a presenter of the YouTube channel numberphile.
More Math courses
Linear Algebra and Geometry 2 (2026)
5.0 (328 Reviews)
Provider: Udemy
Time: 47.1h
$12.99
Original priceBecome a Calculus 3 Master (2026)
4.9 (2,396 Reviews)
Provider: Udemy
Time: 24.6h
$22.99
Original pricePrecalculus 1: Basic notions (2026)
4.9 (1,477 Reviews)
Provider: Udemy
Time: 52.3h
$12.99
Original priceDifferential Equations with the Math Sorcerer (2026)
4.9 (704 Reviews)
Provider: Udemy
Time: 11.6h
$10.99
Original priceCalculus 2 with the Math Sorcerer (2026)
4.9 (691 Reviews)
Provider: Udemy
Time: 36.8h
$11.99
Original price
Reviews
By Martin Krauskopf on 8/14/2026
James's excitement must excite everyone else about the topic. :) But you asked for feedback after the first two short lessons. Let's see what's next.
By Clive Wilson on 8/27/2025
I knew James Grime from YouTube, he is a very engaging presenter. Slightly disappointed the he got up some previously written text and just read from it, he can do better than that.
By Michael O'Neill on 3/25/2025
I liked the instructor but on the first quiz there were two errors in his answers. This is a math course and wrong answers on quizzes are really unacceptable. Plus he has been aware that his answers are wrong for more than two years and has not corrected the lecture where he gives the answers. He did correct on the pdf answer sheet, but it should be in his lecture because that is where you expect an explanation. I requested a refund but Udemy won't give it to me, even though I bought the course today and only got to the first quiz.
By Anonymized User on 10/2/2023
I really enjoyed this course. The maths was gentle and explained very clearly. Having the notes mostly done was a real luxury. Thanks for putting this together, I am inspired to study this topic in more depth.
By Marco Antonio Béjar Villalba on 6/20/2023
Excellent course!!!! I'm an IT professional looking to fill the gaps that I have on security, and this course looked quite nice. I like mathematics so I considered that this could help me to understand some aspects that of cryptography. And guess what!!?? Yes, I'm quite happy for having taken this nice and fancy course. The instructor has a really nice way to explain, he has a nice accent that can be understood easily (at least for me that I'm not a native English speaker), the examples are easy to understand, I had to watch some videos twice though. Of course I don't think this is the way that cryptography is applied in real life strictly speaking, but the course gives a very reasonable idea of how cryptography is implemented.
By Sergey Ten on 5/29/2023
Very engaging instructor, gives a good perspective of how we got from the simple Caesar cypher to more advanced techniques via the continuous leverage of modulo arithmetic.
By Anonymized User on 4/23/2023
I love how Dr Grime starts with simple mono/polyalphabetic ciphers and shows you the maths behind the simple forms of encrypting/decrypting the ciphers; then based on this simple forms of ciphers he introduces some of the theories that underpin advanced forms of cryptography (which you don't get to, until later). I ended up needing to use a lot of external resources too (like Khans) to reinforce some of the learnings - and it was really hard to read Dr. Grime's writing [I can't tell you how many times, in reviewing the video, I thought he wrote 2 instead of Q]. This is also not the first time I've gone through this subject matter in some detail, but I learn new things every time which helps me understand some of the more obscure ideas I missed on the previous passes; and I'm sure I will be going through it again in the future. Overall, it was an excellent resource - so much so that I purchased a personal company on Udemy (originally took it on a business subscription) - so that I could reference the course in the future.
By Bryan Williams on 8/26/2022
This was a wonderful course. There are great exercises reinforcing the superb lectures. I learned the answers to so many questions I've been curious about for the last 30 years. It might be just me, but I had some trouble with watching the video while filling in the notes. Finding where to write in the notes took me longer when the space was small or at the beginning or end of a line. It would have been easier if each location was underlined, especially since I printed the normal-size pdf which is formatted differently than those in the onscreen large format. I had to pause the videos quite regularly to keep up because of having to search for where to write.
By Nicola Moro on 4/12/2022
This course is an absolute perfect match for me! Really simple and fluid to follow and understand, and the exercises are interesting and leave you with additional knowledge. Thanks Dr. Grime, this is an amazing job for a course!
By Rose on 4/3/2022
This course offers the mathematics of code and code-breaking, and suitable for students and general public, even if your background is not in STEM. If you love puzzles and comfortable with numbers, this course is good for you. Dr. Grime is a well-known science communicator with years of experience presenting to academics and general audience, so you will have engaging experience and be inspired with new knowledge. You will not feel bored, a lot of pop-culture reference and cheesy jokes in the lessons to keep you entertained. There is a handbook with blank spaces to be filled as you go through the lesson. I find it as a clever way to engage with the lesson without too much distraction of note-taking. The instructor will guide you through the courses with the basics each code system. The maths level required is around high-school level, mainly about modular arithmetics and probability. Some parts of the lesson could be quite confusing if you're not familiar with the concepts, but you can always pause and replay the videos. I am very satisfied with this course and recommend it to anyone who is interested in applied maths. I hope Dr. Grime would have other interesting courses in the future.
Quality Score
No CourseDuck member has rated this course yet. Taken it? Give each part a thumbs up or down.
Overall Score : 92 / 100






