Implementation of RSA Algorithm (Encryption - Decryption)
This project implements the RSA (Rivest–Shamir–Adleman) algorithm, a popular asymmetric encryption and decryption method, using Python. RSA is widely used for secure data transmission in modern computing. The implementation allows users to encrypt and decrypt text using RSA, providing insights into the algorithm’s mechanics.
sympy
library for prime number validation
git clone https://github.com/AbdelrahmanBayoumi/RSA-Algorithm-in-Cryptography.git
pip install sympy
To use this program:
main.py
.f
) or input plaintext (m
).
Enter p: 17
Enter q: 19
Enter:-
- 'f' to read from file => msg.txt.
- 'm' to enter plaintext message.
f
RSA algorithm involves the following steps:
p
and q
. Calculate n = p * q
and t = (p - 1) * (q - 1)
.e
such that 1 < e < t
and gcd(e, t) == 1
.d
satisfying d * e = 1 (mod t)
.C = (P ^ e) % n
.P = (C ^ d) % n
.Contributions to this project are welcome. Please follow standard GitHub contribution guidelines.
Developed by Abdelrahman Bayoumi - GitHub. Course project for Algorithm Analysis and Design CS305, Faculty of Science, Alexandria University.