Quatters / rsa-demo

Simple RSA encryption/decryption demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RSA algorithm implementation

Simple RSA encryption/decryption demo written in Python.

Run

Requirements: Python 3.10 or above.

python rsa.py <p> <q> <msg> [-v/--verbose]

where

  • p is the first prime number,
  • q is the second prime number,
  • msg is the message you want to encrypt and decrypt,
  • -v or --verbose is the optional flag used to increase verbosity of output.

Important: ensure p and q are high enough, otherwise the message will not be decoded correctly.

Example command:

python rsa.py 257 113 'some text' -v

About

Simple RSA encryption/decryption demo

License:GNU General Public License v3.0


Languages

Language:Python 100.0%