Cipher is your all-in-one toolkit for classic cryptography. Built with a Next.js frontend and a FastAPI backend, it lets you Encrypt, Decrypt, run Frequency Analysis Attacks, and generate detailed Reports — all from a clean & modern interface.
| FEATURE | DESCRIPTION |
|---|---|
| Encrypt | Secure your text using a custom key. Keeps formatting fully intact. |
| Decrypt | Unlock encrypted text with your key. Recover the original message. |
| Frequency Analysis Attack | Analyze ciphertext patterns automatically. Reveal likely letter substitutions. |
| Generate Report | Compile comparison insights into a clean summary. Export a ready-to-submit report. |
| Key Generation | Auto-generate secure random keys for any supported cipher. |
| CIPHER | KEY TYPE | ENCRYPTION / DECRYPTION | FREQUENCY ANALYSIS ATTACK |
|---|---|---|---|
| Caesar Cipher | Integer Shift | ✅ Supported | ✅ Supported |
| Permutation Cipher | Permutation Alphabetic | ✅ Supported | ✅ Supported |
| Vigenère Cipher | Polyalphabetic | ✅ Supported | ✅ Supported |
| Playfair Cipher (8x8) | Alphanumeric | ✅ Supported | ❌ Unsupported |
| Hill Cipher (2x2) | Numeric Matrix | ✅ Supported | ✅ Supported |
| DES | 64 bit Hex | ✅ Supported | ❌ Unsupported |
| AES | 128/192/256 bit Hex | ✅ Supported | |
| RC5 | 16/32/64 bit Hex | ✅ Supported |
| LAYER | TECHNOLOGY |
|---|---|
| Frontend | TypeScript, Next.js, Tailwind CSS, shadcn/ui |
| Shared UI | Radix UI, Tabler Icons, Motion |
| Backend | Python, FastAPI, Uvicorn |
| Monorepo | Turborepo, pnpm Workspaces |
| Deployment | Vercel |
cipher/
├── apps/
│ ├── api/ # FastAPI backend
│ │ └── app/
│ │ ├── routers/ # Cipher logic (encrypt, decrypt, attack, key, report)
│ │ ├── routes.py # API route definitions
│ │ ├── config.py # App configuration
│ │ └── main.py # FastAPI app entry point
│ └── web/ # Next.js frontend
│ └── app/
| ├── / # Home page
│ ├── encrypt/ # Encryption page
│ ├── decrypt/ # Decryption page
│ ├── attack/ # Frequency analysis attack page
│ └── report/ # Report generation page
└── packages/
├── ui/ # Shared UI component library
├── eslint-config/ # Shared ESLint configuration
└── typescript-config/ # Shared TypeScript configuration
- Node.js >= 20
- pnpm >= 10
- Python >= 3.12
- Turbo CLI (optional)
Clone the repository and navigate into it:
git clone https://github.com/anabaslabs/cipher.git
cd cipherInstall frontend dependencies (from monorepo root):
pnpm installInstall backend dependencies (from monorepo root):
cd apps/api
py -m venv venvvenv\Scripts\activate # Windows
# OR
source venv/bin/activate # Linux / macOSpip install -r requirements.txtConfigure environment variables (from monorepo root):
cd apps/api
cp .env.example .env
cd ../../apps/web
cp .env.example .envStart frontend and backend concurrently (from monorepo root):
pnpm dev
# OR
turbo devBuild frontend and backend (from monorepo root):
pnpm build
# OR
turbo buildStart the production server (from monorepo root):
pnpm start
# OR
turbo start