A Flask-based web application that allows users to encrypt and decrypt text using two well-known cryptographic techniques: RSA Algorithm and Caesar Cipher. This app is designed for educational purposes to demonstrate both symmetric and asymmetric encryption in a beginner-friendly interface.
| 🌟 Stars | 🍴 Forks | 🐛 Issues | 🔔 Open PRs | 🔕 Close PRs |
- 🧠 Implements RSA (Asymmetric Encryption)
- 🔁 Supports Caesar Cipher (Symmetric Encryption)
- 🌐 Clean web interface using Flask & HTML templates
- 🧪 Encrypt and decrypt both messages and characters
- 📦 Easy to run locally (no database required)
RSA is an asymmetric cryptographic algorithm, meaning it uses a public key for encryption and a private key for decryption.
- Select two prime numbers
P = 53andQ = 59 - Compute
n = P * Q = 3127 - Compute φ(n) = (P - 1)(Q - 1) = 3016
- Choose a public exponent
e = 3such that1 < e < φ(n)andeis coprime to φ(n) - Compute private key
dsuch thatd = (k * φ(n) + 1) / e, for some integerk
Example:
- Plaintext: "HI" → 8 9
- Encrypted:
c = (89^3) % 3127 = 1394 - Decrypted:
p = (1394^2011) % 3127 = 89→ "HI"
A substitution cipher that shifts each letter by a fixed number (shift) in the alphabet.
- Plaintext:
HELLO - Shift:
3 - Encrypted:
KHOOR - Decrypted:
HELLO(by shifting back)
- Python 3.x
- Flask
git clone https://github.com/surjeetsinhthakur123/Text-Encryption-And-Decryption-Using-Rsa-Algorithm-and-Caesar-Ciphar-Tool.git
cd Text-Encryption-And-Decryption-Using-Rsa-Algorithm-and-Caesar-Ciphar-Tool
pip install flaskRun the app:
python app.pyThen visit http://localhost:5000 in your browser.
- Learn and visualize basic cryptographic methods
- Understand the difference between symmetric & asymmetric encryption
- Educational tool for Python + Flask + Cryptography
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
Thanks to these amazing people for their contributions:
Feel free to add your name here via a pull request if you contribute!
This project is licensed under the MIT License.
Surjeet Sinh Thakur
🔗 GitHub Profile
