Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 919 Bytes

README.md

File metadata and controls

29 lines (16 loc) · 919 Bytes

RSA-Algorithm

An implementation of RSA encryption algorithm in Python using GMPY2 module

Step-1: Install GMPY2:

Install GMPY2 using the following commands:

sudo apt-get install libmpc-dev

sudo apt-get install python-pip

pip3 install gmpy2

Step-2: Get very large prime numbers:

Use the following command from openssl to generate very large prime numbers:

openssl prime -generate -bits 2048

Change the number of bits to get prime number of preferred size.

Step-3: Run the code:

Run the code by either downloading the file or coping the code and follow the on-screen instructions.

The output is shown below: Sample Output

PS: You can also get prime numbers from here: List of prime numbers up to 1 000 000 000 000 (1000 billion)