Network & Security


Master Modern Security and Cryptography by Coding in Python

Master the security of Stream Ciphers, Block Ciphers, Key Exchange, Public Key, Signatures, Shadow files all with Python

4.44 (253 reviews)


7.5 hours


Jun 2021

Last Update
Regular Price

Unlimited access to 30 000 Premium SkillShare courses

What you will learn

Understanding of modern day cryptography

Key learnings from classical encryption systems that make the foundation of modern day cryptography

Understand common mistakes and why it is so difficult to get cryptographic algorithms correct

Understand and implement encryption algorithms like Stream Ciphers, Block Ciphers, Public Key

Implement and learn Diffie-Hellman Key Exchange algorithm

How hash functions are used in Digital Signatures, HMAC and password validation

Understand all concepts in the TLS/SSL protocol stack

Best of all... learn it all by writing the examples in Python - The best way to learn is to implement and see it for yourself


Security and cryptography is a premise in any application on the internet today. For obvious reasons:

  • You need to protect data that you don't want anyone else to have access to.

  • The internet by itself is open and anyone can eavesdrop your personal information.

  • ...and you need to protect yourself against the possibility of simple breaches.

Why learn Security and Cryptography by programming with Python?

  • Cryptography is understood easiest by trying the mistakes yourself - no complex theory needed.

  • No high-level mathematical skill are needed with this easy approach to learn it.

  • Learn the security principles by programming examples to fully appreciate it.

  • You get to try fun stuff like breaking wrong use of ciphers and cracking your own password from a laptop.

How will you benefit from this course?

  • You will understand security and the principle of cryptography and cryptographic algorithms.

  • Avoid making security mistakes commonly with cryptographic algorithms.

  • Understand the full TLS/SSL stack.

  • Implemented and used One Time Pads, Stream Ciphers, Block Ciphers, Key Exchange, Public Key Encryption, Hash functions, Digital Signatures, HMAC, Shadow files and more.

  • Know how to use crypto-libraries properly without making mistakes.

  • Tried all bigger mistakes in cryptography and security.

  • Crack passwords from Shadow Files

If you want to become a comfortable about encryption and security you need to have some basic understanding of the underlying security concepts. Understanding the main mistakes will enable you to implement and cryptographic algorithms in a correct manner.

In this course we will cover all concepts and security concepts in cryptography to understand the full TLS/SSL protocol stack, how password validation is done and more. You will be learning along the way and implement the encryption and authentication algorithms along the way, making some mistakes to fully appreciate and understand the security flaws.

This course covers the following.

  • The biggest lesson in cryptography is best learned from the ancient Caesar Cipher - a lesson which is counterintuitive and needs a deep understanding to appreciate.

  • Why a large key-space itself does not ensure security is best understood by breaking the Substitution Cipher.

  • The ideal encryption of One Time Pad, the limitations of it, and why it is not ideal in real-life.

  • Stream Ciphers the real life of One Time Pads, why they are used, how easy it is to make mistakes, and how modern day algorithms (e.g. A5/1) did not follow the biggest lesson in cryptography.

  • Block Ciphers like DES, AES, and GOST with different modes of operations.

  • Show by example why Double DES does not add security but we need Triple DES.

  • Understand the challenge of Key Exchange Algorithms (to share a secret key without physical contact) and implement and understand the Diffie-Hellman algorithm.

  • Public Key encryption with RSA. Implement and understand the security of RSA. How wrong usage of RSA breaks it.

  • Hash functions. How to use them for Digital signatures. Password validation in the login process.

  • Understand and implement examples with HMAC.

  • Review that we fully understand TLS/SSL protocols and more.

The course is structures in an easy understandable way

  • It is built to step-by-step from the biggest learnings in classical encryptions.

  • How it was improved but still vulnerable.

  • Understand why ideal encryption systems are not useful and what compromises to take

  • Learn the modern algorithm types in the modern TLS/SSL stack

You code along - you only learn by trying yourself - 40+ coding exercises

  • At each step you make the implementation along with me.

  • You implement it on all stages to increase your understanding of security

  • Basically, we learn along the way with more than 40+ coding exercises.

What is needed to fully understand this course?

  • You have basic understand of Python (see prerequisite for full requirements)

  • Understand basic math from elementary school level.

Who is this course for?

  • You want to learn and understand protocols like TLS/SSL used for secure connections on the internet

  • Want to understand what security is and how systems are vulnerable

  • Those who want to try it with programming examples to fully understand the depth of each lesson

The course has a 30 day money back guarantee that ensures if you are not satisfied, you will get your money back. Also, feel free to contact me directly if you have any questions.


Master Modern Security and Cryptography by Coding in Python
Master Modern Security and Cryptography by Coding in Python
Master Modern Security and Cryptography by Coding in Python
Master Modern Security and Cryptography by Coding in Python



Overview - What will you learn?


About me

Caesar Cipher - The biggest learning in Crypto (Kerckhoff's Principle)

Introduction to the problem cryptography solves

Introduction to Caesar Cipher

Implementing the Caesar Cipher (encryption)

Implement the encryption of Caesar Cipher

Implementing the Caesar Cipher (decryption)

Implement the decryption of Caesar Cipher

Understand the weakness of Caesar Cipher (Kerckhoff's Principle)

Implementing an Attack on Caesar Cipher

Implement an Attack on Caesar Cipher

Substitution Cipher - is security only dependent on the size of Key Space?

Introduction to permutations - you need them to understand Substitution Ciphers

Implementing a counter on how many permutations there are

Count number of permutations

Check the performance and understand how fast the space of permutations grows

How to check the performance

Presenting the result of the performance

Introduction to Substitution Cipher

Implementing the Substitution Cipher (encryption)

A simple implementation of Substitution Cipher

Implementing the Substitution Cipher (decryption)

A simple implementation of decryption of the Substitution Cipher

Introduction to Frequency Analysis

Implementation of frequency analysis

Frequency Analysis

Refactor our code

Refactoring our code

Making guesses (not lucky ones)

Making qualified guesses

Make a calculated guess of the key

Make a calculated guess of the key

Finalise the guess and read the encrypted text

Finalise the guess and read the encrypted message

One Time Pad (provable secure systems - what is the catch?)

Introduction to XOR - the most beautiful operation

Implementing an XOR example to understand it better


One Time Pad explained

Implementing the One Time Pad

One Time Pad

The security of One Time Pad explained - why is it provable secure?

Understand the security by implementation of it

Example showing that the One Time Pad cannot be broken

Stream Ciphers - The practical implementations of One Time Pads

Why One Time Pads are difficult and introducing the Stream Cipher

Implementation of our Stream Cipher

Your first Stream Cipher

Benefits of Stream Ciphers in practical use

Implementation to understand the benefit of Stream Cipher

Bit lost in transmission

Authenticity explains - does Stream Cipher have it?

Implementation of the Authenticity problem with Stream Ciphers

Authentication problem in Stream Ciphers

Re-use of keys in Stream Ciphers - Another Weakness

Implementation explaining the problem of re-use of keys in Stream Ciphers

Exploiting re-use of key in Stream Ciphers

Low entropy explained

Brute force of our Stream Cipher - More than one weakness revealed

Brute force attack on out Stream Cipher

Brute force attack on the full key space of the Pseudo Random Generator.

Modern day Stream Ciphers - A5/1

Block Ciphers - DES

Introduction to Block Ciphers

Introduction to DES

GOSH - Academically broken

Implementation that uses DES

A simple DES example

DES and modifying the cipher texts

Modifying the cipher text of block ciphers

Double DES implementation

A simple attack on a weakened Double-DES implementation

Double DES and Triple DES explained

Key Exchange

Key Exchange Problem Explained

Crash Course in Modular Calculations

Implementation of Modular Calculations in Python

Simple modular addition

Simple modular multiplication

A generator in modular multiplication

Diffie-Hellman Explained (the Key Exchange Protocol)

Implementing a Random Prime Generator

Generate a prime

Implementing a Group Generator

Get a generator

Implementing Diffie-Hellman Key Exchange

Full implementation of Diffie-Hellman

Diffie-Hellman and Security Considerations

Public Key Encryption Systems - RSA

Understand Asymmetric Encryption

What is and Understand RSA

Implementation of RSA in Python

Implement the RSA key generation functions

Implement the RSA key generation and send an encrypted message

The Security of RSA and how to Implement an Attack

Breaking the RSA by factoring

How Wrong Use of RSA Breaks it - By Example in Python

Wrong use of RSA

Security Considerations of RSA

Hash Functions

What is a Hash Function and What is a Good Hash Function

Implementation of Hash Functions in Python with hashlib

SHA256 use and simple modifying of message

How Digital Signatures works (uses hash functions) and implementation of it

Digital signature with RSA

Eve trying to modify a signed message - will Bob figure it out?

Modifying a signed message

How Passwords are Verified - with real example from Mac

Password validation process

Why use Salt and shown by implementation in Python

Why use Salt

Why iterate over hash function and demonstrated by implementation in Python

HMAC - What is a Message Authentication Code and how is it used

What is a HMAC?

Implementation of HMAC

HMAC example

What happens if Eve modifies a message - will Bob figure it out?

HMAC modifying the message

TLS/SSL protocol - Now we understand it all

TLS/SSL protocol


Yoshihito2 January 2021

I really liked the way he made this course which transitioned from the basic concepts to more advanced concepts. I think I have better understanding of security before I started this course.

Qiao8 December 2020

meet expections, learnt a lot. Want to dive deep so I think some papers or reading material or outside video may be a helper, personally I want to know more about RSA and about true random number generator, but I think some reading materials for each chapter are also appreciated. Thanks.

James5 December 2020

Only thing I wasn't too sure about was the python class but I'll see how the rest of the course goes :)

Brandon30 November 2020

This was one of the most fun courses I have taken on Udemy. Rune walks you through the implementation of a huge variety of modern cryptographic algorithms, so you will learn cybersecurity and Python programming at the same time (efficient!) and he makes it all feel very approachable. To get the most out of this course, you should try to implement the algorithms yourself first if you can, or try to really get a good understanding of what the code is doing afterwards if you can't. Spend some time playing with the concepts. I would say that you need at least an intermediate understanding of Python for this course. This includes data structures like lists, dictionaries, and classes, and functional programming like loops. Also, to the instructor: thank you so much for creating this excellent course!

Doug27 November 2020

The course was good. The instructor was knowledgeable and enthusiastic. The worked examples helped to understand the encryption algorithms and weaknesses. I would like to see the instructor make a second course that is a deeper dive into modern cryptographic methods, along with more explanation and theory to go with the worked examples.

Sriram24 October 2020

one of the best courses for the good hands-on exercises for the learning cryptography. I expect more courses in this area from you. I enjoyed learning this courses. Thank you very much for your knowledge sharing.

Manuel16 October 2020

Just started and the instructor's sense of humor is exactly what is needed in these times of covid. So far good stuff.

Juan28 September 2020

It seems to be a basic course. I will take it because I come from other language and I need to get used to python code.

Utku24 September 2020

It was a good course to get started with cryptography. But I think it would be better if there is more explanation about the math behind the algorithms.

Dhruval9 September 2020

I had zero knowledge about cryptography , but after this course I understood much about it. Concepts are explained nicely and also the practical implementation is good.I also liked quick responses of my doubts. Also liked the way of instructor explains. "YOU ARE AWESOME"

Navan5 September 2020

I personally believe the the explanation of the code could have been a teeny tiny bit better . However , when I had doubts , they were instantly clarified by Rune . He shows efforts towards his students and I believe he's here to do wonders. I have taken a lot of courses on udemy , however have never ever seen a teacher like him. The tutorials are fun and what can I say , he's one of the best teachers I have seen!

Krunal9 August 2020

This course is way beyond expectations. I started this course with some basic knowledge of python and cryptography. And guess what? By the end of this course I can write things myself. I loved the way how Rune explained the concepts, framed a story and then implement that story it to the code. The test after each session is what challenges you and gives you a chance to have more idea and experiment. I will recommend this course to all my classmates. Thanks Rune.

Lucio4 August 2020

Great I feel awesome all the time with an instructor like him makes things very simple and very awesome. I have great deal of understanding towards the coarse witch is very important to me especially if am to understand it. Thank you very much.

Adel30 July 2020

The BEST practical crypto courses that I ever took ! This is not a course about tools and modules used in crypto, this is a course about how to implement those algorithms ! The theory behind each algorithm is well explained, and algorithms follow the same rules, step by step and we code along with Rune. After each implementation, there's a coding exercise where you have to implement the algorithm learnt. Rune is always responsive in the QA forum and in direct message, every questions that I asked have answered extremely quickly with clear explanations. I recommend that course for everyone interested in cryptography, Rune has a Phd in cryptography and he works in the security fields, he master the subject, and he loves sharing his knowledge in a simple and practical way. Thanks Rune !

Joshua6 July 2020

The instructor makes the course very enjoyable to learn about the topics in the course, but also the instructor is very passionate about helping others understand what is going on with any questions pertaining to the course. Highly recommend!!


Udemy ID


Course created date


Course Indexed date
Course Submitted by