CipherCraft Website is a web-based application designed to perform encryption and decryption using classical cryptographic algorithms. It provides an intuitive and interactive interface supported by a FastAPI backend, making it ideal for both educational and practical use in learning about cryptography.
The project includes six classical cipher techniques: Caesar, Monoalphabetic, Playfair, Transposition, Vigenère, and Rail Fence.
- Caesar Cipher: Shifts letters by a fixed number of positions
- Monoalphabetic Cipher: Substitutes letters using a custom 26-letter key
- Playfair Cipher: Encrypts letter pairs using a 5×5 matrix grid
- Transposition Cipher: Rearranges letters according to a numeric key
- Vigenère Cipher: Uses a keyword for polyalphabetic substitution
- Rail Fence Cipher: Writes text in a zigzag pattern across multiple rails
- Tabbed navigation for Tool, Tutorial, and Guide sections
- Responsive layout with Light/Dark Mode (saved in
localStorage) - Ready-to-use example panel for quick testing
- Step-by-step explanation toggle for detailed encryption visualization
- Save Result feature to download results as
.txtfiles
- Dynamic input fields that adjust based on the selected algorithm
- Real-time validation (e.g., ensuring unique 26-letter keys for Monoalphabetic)
- Smooth animations and hover effects for an enhanced user experience
- Clear error messages for incorrect or invalid input
- Mobile-friendly design with adaptive icons and layout scaling
| Technology | Purpose |
|---|---|
| HTML | Layout and navigation structure |
| CSS | Responsive design, colors, and animations |
| JavaScript | Input validation, tab switching, and API requests |
| Font Awesome | Icons |
| Google Fonts | Poppins typography |
| Technology | Purpose |
|---|---|
| Python | Main programming language |
| FastAPI | Web framework |
| Uvicorn | ASGI server |
| Jinja2 | Template rendering |
- Browser: Chrome, Firefox, Safari, or Edge
- Python: 3.8 or higher
- Internet: Optional (for Font Awesome and Google Fonts)
git clone <repository-url>
cd CipherCraft-Websitepip install fastapi uvicorn jinja2python main.pyOpen your browser and navigate to:
http://localhost:8000
- Select Encrypt or Decrypt
- Choose one of the six cipher algorithms
- Enter the text you want to process
- Provide the corresponding key (e.g., shift = 3 for Caesar)
- (Optional) Enable Show step-by-step explanation for detailed process
- Click Submit to run encryption/decryption
- Click Save Result to download the output
- Select a predefined example (e.g., Monoalphabetic Cipher)
- Click Copy to auto-fill the fields
- Click Submit to view the result
- Tool: Main encryption/decryption workspace
- Tutorial: Detailed explanation of each cipher's logic
- Guide: Step-by-step guide and helpful resources
- Click the sun/moon icon in the top-right corner to toggle between themes
- Your selected mode is stored in
localStoragefor persistence
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Serves the main website |
| POST | /process |
Handles encryption/decryption logic |
Scenario: Encrypt text using Monoalphabetic Cipher
Inputs:
- Operation: Encrypt
- Algorithm: Monoalphabetic Cipher
- Text:
if we wish to buy a car - Key:
DKVQFIBJWPESCXHTMYAUOLRGNZ
Output: WIGFGWJOHKLZDVDA
🔒 Educational cryptography tool demonstrating classical encryption algorithms with an interactive web interface.