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