A full-stack cryptography learning app built with Node.js, Express, React, Vite, and Tailwind CSS.
It is designed as an interactive lab where users can explore:
- classical ciphers
- transposition ciphers
- modern encryption algorithms
- password hashing algorithms
- security comparisons
- learning-focused explanations and visualizations
The application helps beginners understand the difference between encryption and hashing, why classical ciphers are insecure today, and why modern algorithms like AES, ChaCha20, bcrypt, scrypt, and Argon2 are used in real systems.
# Install dependencies
npm install
# Run locally (frontend + backend)
npm run dev
# Frontend: http://localhost:5173
# Backend API: http://localhost:3001Or try the live demo:
🔗 Live Demo: https://password-hash-generator-psi.vercel.app
- Node.js: v16 or higher
- npm: v7 or higher
- Browser: Modern browser with ES6+ support (Chrome, Firefox, Safari, Edge)
- Frontend:
React 19,Vite,Tailwind CSS - Backend:
Node.js,Express - Crypto / Hashing: Node
crypto,bcryptjs,argon2 - Tooling:
ESLint,concurrently
- Select an algorithm from grouped categories
- Enter plaintext, ciphertext, or password input
- Provide keys, keywords, salts, rounds, or other required settings
- Run
Encrypt,Decrypt,Hash, orVerify - Export the current result as JSON
Implemented classical substitution ciphers:
- Caesar Cipher
- Monoalphabetic Cipher
- Vigenere Cipher
- Playfair Cipher
- Homophonic Substitution
- Polygram Substitution
- Fractionated Morse Cipher
Implemented transposition ciphers:
- Rail Fence Cipher
- Columnar Transposition Cipher
Implemented modern and modern-style algorithms:
- AES-256-CBC
- DES-family demo using a compatible legacy mode
- ChaCha20-Poly1305
- RSA public/private key encryption
- Block cipher demo
- Stream cipher demo
Implemented password and digest algorithms:
- SHA-256
- bcrypt
- scrypt
- Argon2
Supported hashing features:
- hash a password or text input
- verify a password against a stored hash
- demonstrate salting
- measure execution time
For each algorithm, the app explains:
- type of algorithm
- whether it is reversible
- security level
- speed vs security tradeoff
- real-world use cases
- step-by-step output for supported algorithms
- frequency analysis for weak ciphers
- Caesar brute-force simulation
- block vs stream learning view
- Tailwind-based responsive interface
- simplified workflow-oriented layout
- dark mode toggle
- modular React component structure
This project is useful for:
- cybersecurity students
- beginners learning cryptography
- classroom demos
- portfolio projects
- understanding secure password storage
It shows:
- encryption vs hashing
- classical vs modern cryptography
- reversible vs one-way algorithms
- why weak ciphers fail under modern analysis
- why secure password hashing must be slow and salted
.
├── api/ # Vercel serverless functions
│ ├── algorithms.js # GET /api/algorithms
│ └── process.js # POST /api/process
├── server/ # Local development server
│ ├── index.js
│ └── services/
│ ├── analysis.js
│ ├── classicalCiphers.js
│ ├── cryptoEngine.js
│ ├── hashing.js
│ └── modernCrypto.js
├── shared/
│ └── algorithmCatalog.js
├── src/ # React frontend
│ ├── components/
│ │ ├── ActionToolbar.jsx
│ │ ├── AlgorithmSelector.jsx
│ │ ├── EducationPanel.jsx
│ │ ├── FrequencyPanel.jsx
│ │ ├── Header.jsx
│ │ ├── InputPanel.jsx
│ │ ├── ResultPanel.jsx
│ │ └── VisualizationPanel.jsx
│ ├── hooks/
│ │ └── useCryptoWorkbench.js
│ ├── services/
│ │ └── api.js
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
├── vercel.json # Vercel configuration
├── vite.config.js
├── package.json
├── README.md
└── VERCEL_DEPLOYMENT.md # Deployment guide
The frontend is a React application that:
- loads the algorithm catalog
- lets the user select an algorithm
- collects input and configuration values
- sends requests to the backend API
- displays results, explanations, timing, and learning panels
The backend is an Express API that:
- serves the algorithm catalog
- processes encryption, decryption, hashing, and verification requests
- measures execution time
- returns educational metadata, analysis, and algorithm-specific details
Returns the algorithm catalog used by the UI.
Response:
{
"algorithms": [
{
"id": "aes",
"name": "AES-256-CBC",
"section": "Modern Encryption",
"category": "Symmetric",
"type": "Cipher",
"reversible": true,
"securityLevel": "High",
"description": "Advanced Encryption Standard with 256-bit key and CBC mode...",
"actions": ["encrypt", "decrypt"],
"inputKind": "text",
"options": [...],
...
}
]
}Processes one crypto operation (encrypt, decrypt, hash, verify).
Request:
{
"algorithmId": "aes",
"action": "encrypt",
"input": "Hello world",
"options": {
"secretKey": "my-secret-key"
},
"compareAgainst": ""
}Response (Example for AES encryption):
{
"result": "U2FsdGVkX1...",
"explanation": "AES-256-CBC encrypts the plaintext using the provided key...",
"elapsedMs": 2.345,
"bruteForce": [],
"frequencyAnalysis": {...}
}Health check endpoint (for local development).
Response:
{
"ok": true
}
## Local Development
### 1. Install dependencies
```bash
npm installnpm run devThis runs:
- the Express backend on
http://localhost:3001 - the Vite frontend on its local development port
npm run servernpm run buildnpm run lintEncryption is reversible when you have the correct key.
Examples:
- Caesar
- Vigenere
- AES
- RSA
Hashing is one-way and is mainly used for verification, especially password storage.
Examples:
- SHA-256
- bcrypt
- scrypt
- Argon2
Classical ciphers are useful for learning logic and history, but they are not secure for modern use.
Modern algorithms are built to resist current attacks and should be used in real applications.
- Classical ciphers in this app are for education only.
- The DES entry is included as a legacy comparison demo.
- SHA-256 is shown for hashing education, but password storage should prefer
bcrypt,scrypt, orArgon2. - Real production systems require secure key management, proper randomness, authenticated encryption, and careful deployment practices.
This application is deployed on Vercel and automatically deploys from the main branch on GitHub.
- Fork this repository on GitHub
- Connect to Vercel: Go to vercel.com, sign in, and create a new project from your fork
- Vercel will automatically:
- Build the React frontend with Vite
- Create serverless API functions from the
api/folder - Deploy both together to your own domain
For detailed deployment instructions, see VERCEL_DEPLOYMENT.md.
Problem: "Port 3001 already in use"
# Find and kill the process
lsof -ti:3001 | xargs kill -9Problem: API requests failing locally
- Ensure
npm run devis running (starts both frontend and backend) - Check that backend is on
http://localhost:3001 - Clear browser cache
Problem: 404 errors for /api/algorithms or /api/process on Vercel
- Ensure the
api/folder is committed and pushed to Git - Check Vercel deployment logs for build errors
- Verify
vercel.jsonis in the root directory
- add algorithm search and filtering
- add more guided examples for each algorithm
- expand ECC (Elliptic Curve Cryptography) support
- add downloadable reports or operation history tracking
- add unit tests and integration tests
- add internationalization (i18n) support
- add keyboard shortcuts for power users
The project has been verified with:
npm run lint— ESLint code quality checksnpm run build— Vite production build- Deployed on Vercel serverless platform
This project is open source and available for educational purposes.