Skip to content

Your all-in-one toolkit for Cipher Project (Monorepo)

Notifications You must be signed in to change notification settings

anabaslabs/cipher

Repository files navigation

Cipher Logo
Cipher

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.

✨ Features

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.

🔑 Supported Ciphers

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 ⚠️ Impossible
RC5 16/32/64 bit Hex ✅ Supported ⚠️ Impossible

🛠️ Tech Stack

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

🏗️ Project Structure

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

🚀 Getting Started

Prerequisites

  • Node.js >= 20
  • pnpm >= 10
  • Python >= 3.12
  • Turbo CLI (optional)

Setup

Clone the repository and navigate into it:

git clone https://github.com/anabaslabs/cipher.git
cd cipher

Install frontend dependencies (from monorepo root):

pnpm install

Install backend dependencies (from monorepo root):

cd apps/api
py -m venv venv
venv\Scripts\activate # Windows
# OR
source venv/bin/activate # Linux / macOS
pip install -r requirements.txt

Configure environment variables (from monorepo root):

cd apps/api
cp .env.example .env
cd ../../apps/web
cp .env.example .env

Run Locally

Start frontend and backend concurrently (from monorepo root):

pnpm dev
# OR
turbo dev

In Production

Build frontend and backend (from monorepo root):

pnpm build
# OR
turbo build

Start the production server (from monorepo root):

pnpm start
# OR
turbo start

👥 Contributors

saptarshiroy39 itskdhere 

🙂

About

Your all-in-one toolkit for Cipher Project (Monorepo)

Resources

Stars

Watchers

Forks

Contributors