This is an python Implementation of RSA encryption and decryption algorithm. Based on the theory, it can achieve encryption, decryption given the number p,q and the plaintext. This code is for course study only.
- Download the project
- Find RSA.py and run it in python 2.7.
- Try to modify the code of last line, where you can find
RSA_process(p=103, q=97, message="hello world")
, you can change the value p, q and the message to other value and see how output changes.
I used Python 2.7 to finished the code. Please note using python 3.x may cause unexpected problems.
Have fun! :)
- 知乎回答-RSA 算法的加密原理是什么?(https://www.zhihu.com/question/25038691/answer/388573650)
- Wikipedia - RSA Cryptosystem (https://en.wikipedia.org/wiki/RSA_(cryptosystem))