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
