Clone the repository.
git clone https://github.com/jolsfd/rsa-algorithm.gitInstall Python 3.10 and the required modules. Decide if you want to use a venv. You can make a venv with python -m venv venv or make virtual_env and activate the venv with source venv/bin/activate.
# With pip
pip install -r requirements.txt
# or
make installTest the algorithm.
python test_rsa.py
# or
make testBenchmark the algorithm.
python bench_rsa.py
# or
make benchFor creating a RSA key with a certain key lenght use the generate command.
# Example (Default: 2048)
python cli_rsa.py generate --bits 512You can specifie where the key file should be saved with the --file flag before the command.
# Example (Default: key.txt)
python cli_rsa.py --file hello.txt generateTo encrypt a message use the encrypt command.
python cli_rsa.py encrypt "Hello World"Copy the output and save it or decrypt it with the decrypt command by pasting the output after the command.
# Example
python cli_rsa.py decrypt 51895113689204577206839395581904075220