Master RSA Encryption in Python: Step-by-Step Tutorial π
Learn how to implement RSA asymmetric encryption from scratch with this easy-to-follow Python tutorial. Perfect for beginners and coding enthusiasts!

Michael Grieco
17.8K views β’ Feb 10, 2020

About this video
In this video, we go through the RSA Asymmetric Key Encryption algorithm first with pen and paper then through its implementation in Python. I used Python due to its natural, built-in big number libraries.
Includes random key generation with large prime numbers.
Time Stamps:
β’ Explanation, pen/paper example: 0:00 - 25:52
β’ Python implementation: 25:52 - 1:13:33
Mathematical concepts covered: one-way function, modular exponentiation, modular multiplicative inverse, extended euclidean algorithm, prime numbers, rabin-miller
β’ RSA Overview: https://en.wikipedia.org/wiki/RSA_(cryptosystem)#Code
β’ ASCII Table: http://html-codes.info/ascii/standard/What-is-the-ASCII-value-of-letter
β’ Low Prime Numbers List: https://pastebin.com/2yGpCpJr
β’ Prime Number Checker: https://www.numberempire.com/primenumbers.php
β’ Rabin-Miller Algorithm: https://www.geeksforgeeks.org/primality-test-set-3-miller-rabin/
β’ Website: https://michaelg29.github.io/
β’ Twitter: https://twitter.com/MichaelGrieco10
β’ Discord: https://discord.gg/Uj54bDF
β’ This Github Repo: https://github.com/michaelg29/yt-challenges
β’ This Playlist: https://www.youtube.com/playlist?list=PLysLvOneEETP-XQZQ6VTdMIHmxbGxX6nX
Includes random key generation with large prime numbers.
Time Stamps:
β’ Explanation, pen/paper example: 0:00 - 25:52
β’ Python implementation: 25:52 - 1:13:33
Mathematical concepts covered: one-way function, modular exponentiation, modular multiplicative inverse, extended euclidean algorithm, prime numbers, rabin-miller
β’ RSA Overview: https://en.wikipedia.org/wiki/RSA_(cryptosystem)#Code
β’ ASCII Table: http://html-codes.info/ascii/standard/What-is-the-ASCII-value-of-letter
β’ Low Prime Numbers List: https://pastebin.com/2yGpCpJr
β’ Prime Number Checker: https://www.numberempire.com/primenumbers.php
β’ Rabin-Miller Algorithm: https://www.geeksforgeeks.org/primality-test-set-3-miller-rabin/
β’ Website: https://michaelg29.github.io/
β’ Twitter: https://twitter.com/MichaelGrieco10
β’ Discord: https://discord.gg/Uj54bDF
β’ This Github Repo: https://github.com/michaelg29/yt-challenges
β’ This Playlist: https://www.youtube.com/playlist?list=PLysLvOneEETP-XQZQ6VTdMIHmxbGxX6nX
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
17.8K
Likes
320
Duration
01:13:44
Published
Feb 10, 2020
User Reviews
4.6
(3)