RSA is named after Ron Rivest, Adi Shamir and Leonard Adleman (Rivest-Shamir-Adleman; RSA) and the details for the algorithm were first published in 1977. English mathematician, Clifford Cocks developed a similar system in 1973 however his work was classified by GCHQ until 1997.
RSA is an asymmetrical encryption algorithm that relies on prime numbers, the larger the prime number the better for cryptography.
I originally took a look at creating RSA keys on Christmas Eve (my original Python is here in my GitHub) but found later steps in the course include creating RSA keys in Python and a few hints.
Part of the “Encryption & Cryptography” course is to generate an 8-bit RSA key using Python:
Sympy is a Python library used to generate prime numbers. More details on Sympy can be found on it’s website: https://www.sympy.org/en/index.html
Sympy can be installed using pip3:
pip3 install sympy
Amendment (30th December 2019):
Ever have one of those “Doh!” moments? I now can see why my original RSA attempt failed, I was using the values of the alphabet like in a Caesar cipher and not the ASCII values.
[…] Over the last few weeks I have been looking at ciphers and encryption, which has included a Python program to brute force the Caesar cipher, Python to encrypt / decrypt with the Vigenère cipher , some Morse code and RSA Public Keys. […]
my home away from home and where I will be sharing my adventures in the world of technology and all things geek.
The technology subjects have varied over the years from Python code to handle ciphers and Pig Latin, to IoT sensors in Azure and Python handling Bluetooth, to Ansible and Terraform and material around DevOps.
One response to “RSA Public-Key Cryptography (Python)”
[…] Over the last few weeks I have been looking at ciphers and encryption, which has included a Python program to brute force the Caesar cipher, Python to encrypt / decrypt with the Vigenère cipher , some Morse code and RSA Public Keys. […]
LikeLike