https://github.com/anker661/toy_rsa
A Python implementation of RSA encryption/decryption with an interactive Streamlit demo.
https://github.com/anker661/toy_rsa
python3 rsa-algorithm streamlit-application toy-project
Last synced: 3 months ago
JSON representation
A Python implementation of RSA encryption/decryption with an interactive Streamlit demo.
- Host: GitHub
- URL: https://github.com/anker661/toy_rsa
- Owner: ANKer661
- License: mit
- Created: 2024-06-21T14:38:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-27T09:39:17.000Z (12 months ago)
- Last Synced: 2024-06-27T11:11:50.157Z (12 months ago)
- Topics: python3, rsa-algorithm, streamlit-application, toy-project
- Language: Python
- Homepage: https://anker661-toy-rsa-rsa-demo-app-isyesw.streamlit.app/
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Toy_RSA
This project implements RSA (Rivest–Shamir–Adleman) encryption and decryption algorithm in Python, along with a Streamlit web interface for easy interaction.
### Features
- RSA key generation with customizable bit length
- Message encryption and decryption
- Prime number generation using Miller-Rabin primality test
- Web interface using Streamlit### Project Structure
- `rsa/`:
- `keys_generation.py`: Functions for generating RSA keys
- `primes.py`: Prime number generation and testing
- `rsa_operations.py`: Core RSA encryption and decryption operations
- Contains functions for pre-processing, encryption, decryption, and post-processing
- Implements the RSA pipeline that ties all operations together
- `utils.py`: Utility functions like quick exponentiation
- `tests/`
- `rsa_demo_app.py`: Streamlit web application### How It Works
1. Generate RSA keys by specifying the desired bit length.
2. Enter a message to encrypt.
3. The system will encrypt the message using the public key, then decrypt it using the private key.
4. View the intermediate steps and final results.### Installation
1. Clone this repository:
```
git clone https://github.com/ANKer661/Toy_RSA.git
cd Toy_RSA
```2. Install the required dependencies:
```
pip install streamlit
```3. Run the Streamlit app:
```
streamlit run app.py
```### Online Demo
Try out Toy-RSA online without any installation.
Visit this Streamlit app: [Toy-RSA Demo](https://anker661-toy-rsa-rsa-demo-app-isyesw.streamlit.app/)
Here's a screenshot of the demo:
### License
This project is licensed under the MIT License - see the LICENSE file for details.