Skip to content

surjeetsinhthakur123/Text-Encryption-And-Decryption-Using-Rsa-Algorithm-and-Caesar-Ciphar-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Text Encryption & Decryption Web App

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
Stars Forks Issues Open Pull Requests Close Pull Requests

🌟 Features

  • 🧠 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)

πŸ” Algorithms Overview

βœ… RSA Algorithm

RSA is an asymmetric cryptographic algorithm, meaning it uses a public key for encryption and a private key for decryption.

How it works:

  1. Select two prime numbers P = 53 and Q = 59
  2. Compute n = P * Q = 3127
  3. Compute Ο†(n) = (P - 1)(Q - 1) = 3016
  4. Choose a public exponent e = 3 such that 1 < e < Ο†(n) and e is coprime to Ο†(n)
  5. Compute private key d such that d = (k * Ο†(n) + 1) / e, for some integer k

Example:

  • Plaintext: "HI" β†’ 8 9
  • Encrypted: c = (89^3) % 3127 = 1394
  • Decrypted: p = (1394^2011) % 3127 = 89 β†’ "HI"

βœ… Caesar Cipher

A substitution cipher that shifts each letter by a fixed number (shift) in the alphabet.

Example:

  • Plaintext: HELLO
  • Shift: 3
  • Encrypted: KHOOR
  • Decrypted: HELLO (by shifting back)

πŸš€ Getting Started

βœ… Prerequisites

  • Python 3.x
  • Flask

πŸ“¦ Installation

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 flask

Run the app:

python app.py

Then visit http://localhost:5000 in your browser.


πŸ“Έ Screenshots

image


πŸ’‘ Use Cases

  • Learn and visualize basic cryptographic methods
  • Understand the difference between symmetric & asymmetric encryption
  • Educational tool for Python + Flask + Cryptography

🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a pull request

πŸ‘₯ Contributors

Thanks to these amazing people for their contributions:

GitHub Contributors

Feel free to add your name here via a pull request if you contribute!


πŸ“„ License

This project is licensed under the MIT License.


πŸ™‹ Author

Surjeet Sinh Thakur
πŸ”— GitHub Profile

About

This is the Mini-Project which is based on Python Language

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 14