Master Modern Security and Cryptography by Coding in Python

Master Modern Security and Cryptography by Coding in Python

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 7.5 Hours | 6.86 GB

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

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 in 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

What you’ll 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
Table of Contents

Introduction
1 Overview – What will you learn
2 Prerequisite
3 About me

Caesar Cipher – The biggest learning in Crypto (Kerckhoff’s Principle)
4 Introduction to the problem cryptography solves
5 Introduction to Caesar Cipher
6 Implementing the Caesar Cipher (encryption)
7 Implementing the Caesar Cipher (decryption)
8 Understand the weakness of Caesar Cipher (Kerckhoff’s Principle)
9 Implementing an Attack on Caesar Cipher

Substitution Cipher – is security only dependent on the size of Key Space
10 Introduction to permutations – you need them to understand Substitution Ciphers
11 Implementing a counter on how many permutations there are
12 Check the performance and understand how fast the space of permutations grows
13 Presenting the result of the performance
14 Introduction to Substitution Cipher
15 Implementing the Substitution Cipher (encryption)
16 Implementing the Substitution Cipher (decryption)
17 Introduction to Frequency Analysis
18 Implementation of frequency analysis
19 Refactor our code
20 Making guesses (not lucky ones)
21 Make a calculated guess of the key
22 Finalise the guess and read the encrypted text

One Time Pad (provable secure systems – what is the catch)
23 Introduction to XOR – the most beautiful operation
24 Implementing an XOR example to understand it better
25 One Time Pad explained
26 Implementing the One Time Pad
27 The security of One Time Pad explained – why is it provable secure
28 Understand the security by implementation of it

Stream Ciphers – The practical implementations of One Time Pads
29 Why One Time Pads are difficult and introducing the Stream Cipher
30 Implementation of our Stream Cipher
31 Benefits of Stream Ciphers in practical use
32 Implementation to understand the benefit of Stream Cipher
33 Authenticity explains – does Stream Cipher have it
34 Implementation of the Authenticity problem with Stream Ciphers
35 Re-use of keys in Stream Ciphers – Another Weakness
36 Implementation explaining the problem of re-use of keys in Stream Ciphers
37 Low entropy explained
38 Brute force of our Stream Cipher – More than one weakness revealed
39 Modern day Stream Ciphers – A51

Block Ciphers – DES
40 Introduction to Block Ciphers
41 Introduction to DES
42 GOST – Academically broken
43 Implementation that uses DES
44 DES and modifying the cipher texts
45 Double DES implementation
46 Double DES and Triple DES explained

Key Exchange
47 Key Exchange Problem Explained
48 Crash Course in Modular Calculations
49 Implementation of Modular Calculations in Python
50 Diffie-Hellman Explained (the Key Exchange Protocol)
51 Implementing a Random Prime Generator
52 REMARK If you do not use Python 3.8 (read this) and a small correction
53 Implementing a Group Generator
54 Implementing Diffie-Hellman Key Exchange
55 Diffie-Hellman and Security Considerations

Public Key Encryption Systems – RSA
56 Understand Asymmetric Encryption
57 What is and Understand RSA
58 Implementation of RSA in Python
59 The Security of RSA and how to Implement an Attack
60 How Wrong Use of RSA Breaks it – By Example in Python
61 Security Considerations of RSA

Hash Functions
62 What is a Hash Function and What is a Good Hash Function
63 Implementation of Hash Functions in Python with hashlib
64 How Digital Signatures works (uses hash functions) and implementation of it
65 Eve trying to modify a signed message – will Bob figure it out
66 How Passwords are Verified – with real example from Mac
67 Why use Salt and shown by implementation in Python
68 Why iterate over hash function and demonstrated by implementation in Python

HMAC – What is a Message Authentication Code and how is it used
69 What is a HMAC
70 Implementation of HMAC
71 What happens if Eve modifies a message – will Bob figure it out

TLSSSL protocol – Now we understand it all
72 TLSSSL protocol

Next step and feedback
73 Thank you