Skip to content

Batmancodes1/ChessCipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

♜ ChessCipher — Steganographic Chess Engine

Hide secret messages inside legally playable chess games. Encode text into a PGN, play it on Chess.com or Lichess, share only the game — and another person decodes the hidden message using this app.


Features

Feature Description
PGN Channel High-capacity encoding — full text messages hidden in move sequences
FEN Channel Compact encoding — keys, pointers, or short messages in board positions
Public Mode No key required — anyone with the PGN can decode
Key Mode Requires a matching password to decode
Hidden Key Mode Key is derived from a FEN hash — never transmitted
Decoy System Wrong/no key returns plausible chess commentary, not an error
Cinematic Decode Animated board replay with typing reveal, sounds, and progress bar
Dead Drop Generate a reference card — share only the pointer, not the data
Cross-platform Decodes any PGN from Chess.com, Lichess, Chess24, or any PGN source
Time-lock (opt-in) Key changes daily — same PGN yields different output each day

Tech Stack

  • Vanilla HTML/CSS/JS — zero build step, runs in any browser
  • chess.js 0.10.3 — legal move generation, PGN parsing, board state
  • Web Crypto API — XOR stream cipher with hash-based key derivation
  • Web Audio API — synthesized move sounds (no asset files required)
  • Google Fonts — Cinzel (display), IBM Plex Mono (code), Inter (UI)

Run Locally

Prerequisites

  • Any modern browser (Chrome, Firefox, Edge, Safari)
  • A local web server (optional but recommended)

Option A — Direct File Open (simplest)

# 1. Download or clone the project
git clone https://github.com/your-repo/chesscypher.git
cd chesscypher

# 2. Open index.html in your browser
open index.html         # macOS
start index.html        # Windows
xdg-open index.html     # Linux

Note: Some browser security policies block clipboard API on file:// URLs. Use Option B for full functionality.

Option B — Local Server (recommended)

Using Python (no install needed):

cd chesscypher
python3 -m http.server 8080
# Open: http://localhost:8080

Using Node.js:

npm install -g serve
serve .
# Open: http://localhost:3000

Using VS Code: Install the "Live Server" extension → right-click index.html → "Open with Live Server"

How to Access

Open your browser and navigate to http://localhost:8080 (or whichever port your server uses).


Project Structure

chesscypher/
├── index.html          # Complete application — all HTML, CSS, and JS in one file
├── README.md           # This file
├── DEPLOYMENT.md       # Deployment guide
└── SAMPLE_DATA.md      # Test data and examples

File Breakdown

index.html contains everything:

  • CSS — Dark cinematic theme, glassmorphism panels, animations, responsive layout
  • Chess EngineChess.js imported from CDN (cdnjs.cloudflare.com)
  • Steganography CoreencodeMessageToPGN(), decodePGNToMessage(), encodeMsgToFEN(), decodeFENtoMsg()
  • Crypto LayerxorCrypt(), simpleHash(), getKey() — XOR stream cipher with hash-based keys
  • Decoy SystemgetDecoy() — deterministic decoy selection based on PGN+key hash
  • Cinematic UIrunDecodeAnimation(), revealMessage(), board rendering, sound synthesis
  • Dead DropgenerateDeadDrop() — reference card generator
  • UI Pages — Encode, Decode, Dead Drop, Info tabs

Releases

No releases published

Packages

 
 
 

Contributors

Languages