This is a simple implementation of RSA algorithm in pure python
- Select two prime numbers, p and q.
- Calculate n=pq.
- Calculate f(n)=(p-1)(q-1).
- Select e such that e is relatively prime to f(n) and less than f(n). Determine d such that demod f(n) = 1 mod f(n).d can be calculated using the extended Euclid’s algorithm (used in this code)
This program takes input :
- prime number p
- prime number q
- Message m
This program inputs message as string, convert each character to their ASCII value for RSA.