Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Cryptographia โ€” Web Edition

An interactive journey through 3,500 years of cryptography history.

Cryptographia is an educational web game featuring 16 progressive cryptographic puzzles, spanning from ancient Hebrew traditions to the digital age. Each challenge immerses the player in a real historical era and encryption system, with an immersive cyberpunk design and full bilingual support (๐Ÿ‡ซ๐Ÿ‡ท French / ๐Ÿ‡บ๐Ÿ‡ธ English).

Cryptographia preview

๐ŸŽฎ How to Play

  1. Open the site: anadema.github.io/Cryptographia
  2. Choose your language using the ๐Ÿ‡ซ๐Ÿ‡ท/๐Ÿ‡บ๐Ÿ‡ธ selector in the top-right corner
  3. Pick a challenge from the 16 available (in chronological order)
  4. Read the ๐Ÿ“œ History of the code (hints are hidden in the text!)
  5. Solve the puzzle to obtain a secret flag
  6. Collect all 16 flags to become Code Master

๐ŸŽฎ Hard mode

You want to break the SHA-256 hashes, why not!

See Hacker Guide

๐Ÿ›๏ธ The 16 Challenges

# Era Cipher Concept
I 1500 BC Atbash โ†” Alphabet inversion (Aโ†”Z, Bโ†”Y...)
II 500 BC Scytale ๐“‚€ Column transposition (Sparta)
III 150 BC Polybius Square โŠž Coordinates in a 5ร—5 grid (Greece)
IV 50 BC Caesar Cipher โ™œ Letter shift substitution (Rome)
V 1586 Vigenรจre Cipher โšœ Polyalphabetic encryption (France)
VI 1844 Rail Fence โšก Zigzag transposition + Morse code (USA)
VII 1854 Playfair Cipher โ™› 5ร—5 grid + Greek alphabet coordinates (UK)
VIII 1917 XOR Cipher โŠ• Bitwise XOR operation (Cryptography)
IX 1940 Enigma โš™ Rotor-based code breaking (Bletchley Park)
X 1960 Hexadecimal #๏ธโƒฃ Base 16 encoding (Computing)
XI 1963 Binary Code ๐Ÿ’พ ASCII / 8-bit encoding (Computing)
XII 1980 ROT13 ๐Ÿ”„ Caesar cipher with 13-position shift (Internet/Usenet)
XIII 1985 Steganography โ—‰ Message hidden in image bytes (Digital era)
XIV 1987 Base64 ๐Ÿ“ง Binary-to-text encoding (Web/MIME)
XV 1991 MD5 Hash ๐Ÿ”’ One-way fingerprint cracking with rainbow tables
XVI 1994 QR Code ๐Ÿ“ฑ 2D barcode invented by Denso Wave (Japan)

๐Ÿ“š Challenge Details

I โ€” Atbash (1500 BC) ๐Ÿ‡ฎ๐Ÿ‡ฑ

One of the oldest known ciphers from Hebrew tradition. The principle is radically simple: reverse the alphabet. Aโ†”Z, Bโ†”Y, Cโ†”X... Mentioned in the Bible's Book of Jeremiah where "Sheshakh" is Atbash for "Babel".

II โ€” Scytale (500 BC) ๐Ÿ‡ฌ๐Ÿ‡ท

Spartan generals wrapped a leather strip around a cylindrical rod called a scytale. The message was written horizontally, then the strip was unwound. Without the right rod diameter, the message was unreadable. Used famously by King Leonidas.

III โ€” Polybius Square (150 BC) ๐Ÿ‡ฌ๐Ÿ‡ท

Greek historian Polybius arranged 25 letters in a 5ร—5 grid. Each letter is identified by its (row, column) position. Used with torches on hills for long-distance communication, and later by prisoners tapping on cell walls.

IV โ€” Caesar Cipher (50 BC) ๐Ÿ‡ฎ๐Ÿ‡น

Julius Caesar's deceptively simple system: shift each letter by a fixed number of positions. Reported by Suetonius. The famous "VENI VIDI VICI" message from his Gallic conquest is encoded with a shift of 3 (III in Roman numerals).

V โ€” Vigenรจre Cipher (1586) ๐Ÿ‡ซ๐Ÿ‡ท

Blaise de Vigenรจre's polyalphabetic system. Unlike Caesar (fixed shift), Vigenรจre uses a secret keyword that modifies each letter differently. Nicknamed "le chiffre indรฉchiffrable" for 300 years until Babbage and Kasiski cracked it in the 19th century.

VI โ€” Rail Fence + Morse (1844) ๐Ÿ‡บ๐Ÿ‡ธ

Letters are written in zigzag across multiple "rails", then read row by row. Combined with Samuel Morse's revolutionary code (dots and dashes) which enabled instant long-distance communication for the first time in history.

VII โ€” Playfair Cipher (1854) ๐Ÿ‡ฌ๐Ÿ‡ง

Charles Wheatstone's 5ร—5 grid system, promoted by Lord Playfair. Used by the British Army during the Boer War and WWI. This challenge adds a twist: positions are encoded using Greek alphabet letters (ฮฑ=0, ฮฒ=1, ฮณ=2, ฮด=3, ฮต=4).

VIII โ€” XOR Cipher (1917) ๐Ÿ”ข

The fundamental operation of modern cryptography. XOR compares two bits: same โ†’ 0, different โ†’ 1. Self-inverse: applying XOR twice with the same key restores the original. Foundation of the unbreakable "one-time pad" encryption.

IX โ€” Enigma (1940) โš™๏ธ

Nazi Germany's electromechanical rotor machine with 158 quintillion combinations. Cracked at Bletchley Park by Alan Turing's team using the "Bombe" machine. Estimated to have shortened WWII by 2 to 4 years.

X โ€” Hexadecimal (1960) #๏ธโƒฃ

Base 16 system using digits 0-9 and letters A-F. Two hex digits = one byte = one ASCII character. The compact language of computers, used in memory addresses, web colors (#FF0000), and forensic analysis.

XI โ€” Binary Code (1963) ๐Ÿ’พ

ASCII standard adopted in 1963: every character receives a unique number (0-127) encoded in 8 bits (one byte). The foundation of all modern computing โ€” every file, message, and image is ultimately a sequence of 0s and 1s.

XII โ€” ROT13 (1980) ๐Ÿ”„

A Caesar cipher with a fixed shift of 13. Its unique property: applying it twice returns the original text (because 13 ร— 2 = 26 = alphabet length). Popularized by Usenet for hiding spoilers and offensive content.

XIII โ€” Steganography (1985) โ—‰

While the concept dates back to antiquity (Herodotus reported messages tattooed on slaves' scalps), modern digital steganography was born in 1985 with Gustavus Simmons' "Prisoners' Problem". The challenge: hide text in the raw bytes of a PNG image, invisible to the eye but discoverable with a hex editor.

XIV โ€” Base64 (1987) ๐Ÿ“ง

Not encryption but an encoding scheme. Transforms binary data into 64 "safe" text characters (A-Z, a-z, 0-9, +, /). Invented for the MIME email standard to send binary attachments through text-only protocols.

XV โ€” MD5 Hash (1991) ๐Ÿ”

Ronald Rivest's 128-bit hash function. One-way: you can't reverse it. But "rainbow tables" allow brute-forcing common passwords. This challenge simulates an attacker cracking a hash from a candidate word list โ€” illustrating why MD5 is now considered broken.

XVI โ€” QR Code (1994) ๐Ÿ“ฑ

Invented by Masahiro Hara at Denso Wave (Toyota subsidiary) for automotive parts tracking. Stores data in two dimensions with error correction (readable even when 30% damaged). Today ubiquitous and used in modern steganography.

๐ŸŽฏ Target Audience

Designed for non-technical trainees in cybersecurity awareness contexts. Challenges are accessible without prior computer knowledge โ€” each puzzle teaches a historical cryptography concept while testing logic and deduction. Perfect for:

  • ๐Ÿข Corporate cybersecurity training sessions
  • ๐ŸŽ“ Educational workshops on cryptography history
  • ๐ŸŽฎ Personal entertainment for puzzle enthusiasts
  • ๐Ÿง  Logic and deduction practice

โœจ Features

  • ๐ŸŒ Full bilingual support โ€” Switch between French ๐Ÿ‡ซ๐Ÿ‡ท and English ๐Ÿ‡บ๐Ÿ‡ธ anytime
  • ๐Ÿ“œ History popups with era miniatures and subtle in-text hints
  • ๐Ÿ† Flag collection system โ€” each solved challenge reveals a historical treasure
  • ๐Ÿ”— URL-encoded session โ€” progress is saved and shareable (Base64 + XOR encoding)
  • ๐Ÿ“ฑ Mobile-first design โ€” optimized for iPhone/Android with responsive layouts
  • ๐ŸŽจ Cyberpunk aesthetics โ€” neon glows, glassmorphism, animated background symbols
  • ๐Ÿ”— Helper links โ€” online decoders (dcode.fr, hexed.it, rapidtables, base64decode, etc.)
  • ๐Ÿ”’ Security โ€” input sanitization, no localStorage, no eval(), no external API for game logic
  • โ™ฟ Accessibility โ€” interactive widgets (Enigma rotors, column selector, etc.) for hands-on learning

๐Ÿš€ Deployment

GitHub Pages (automatic)

  1. Fork or push this repo to your GitHub account
  2. Go to Settings โ†’ Pages โ†’ Source โ†’ GitHub Actions
  3. The .github/workflows/deploy.yml workflow auto-deploys on every push to main
  4. Your site will be available at https://your-username.github.io/Cryptographia

Local deployment

No dependencies, no build step. Just open index.html in a browser.

# Or serve it with a local server
python3 -m http.server 8000
# โ†’ http://localhost:8000

๐Ÿ—๏ธ Technical Architecture

  • Single HTML file โ€” all code in one index.html
  • React 18 via CDN (unpkg)
  • Tailwind CSS via CDN
  • Babel standalone for in-browser JSX compilation
  • React Context API for bilingual support (LangContext)
  • Google Fonts โ€” Orbitron, Rajdhani, Share Tech Mono
  • Canvas API for image generation (steganography challenge)
  • Wikipedia API for fetching historical images dynamically
  • Zero server dependencies โ€” 100% static, fully client-side

๐Ÿ“ Repository Structure

cryptographia/
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ deploy.yml      # GitHub Actions for Pages
โ”œโ”€โ”€ .nojekyll               # Bypass Jekyll processing
โ”œโ”€โ”€ index.html              # Complete application (all 16 challenges)
โ”œโ”€โ”€ README.md               # This file
โ””โ”€โ”€ LICENSE                 # Apache 2.0 License

๐ŸŒ Internationalization

The application supports full bilingual rendering (French/English) through:

  • React LangContext provider wrapping all views
  • Translation tables for UI elements (T.en dictionary)
  • Per-challenge en:{} objects with nm, cv, fm, hi, lore fields
  • Helper functions (tr, cn, cc, cf, ch_, cl) for clean conditional rendering
  • Persistent language selection during the session

๐ŸŽจ Design Tokens

Each challenge has a unique color identity:

Color Challenges
๐ŸŸฃ Indigo (#6366f1) Atbash
๐Ÿ”ต Cyan (#00f0ff) Scytale
๐ŸŸข Green (#00ff41) Polybius
๐Ÿฉท Pink (#ff2d95) Caesar
๐ŸŸก Gold (#ffd700) Vigenรจre
๐ŸŸ  Orange (#ff6b00) Rail Fence
๐ŸŸฃ Purple (#a855f7) Playfair
๐Ÿ”ต Blue (#3b82f6) XOR
๐Ÿ”ด Red (#ef4444) Enigma
๐ŸŸฃ Violet (#8b5cf6) Hexadecimal
๐ŸŸข Emerald (#10b981) Binary
๐ŸŸก Amber (#f59e0b) ROT13
๐Ÿ”ท Cyan (#06b6d4) Steganography
๐Ÿฉท Pink (#ec4899) Base64
๐Ÿ”ด Dark Red (#dc2626) MD5
๐ŸŸข Teal (#14b8a6) QR Code

๐Ÿ› Known Limitations

  • The Enigma challenge uses simplified single-rotor logic (not the full historical Enigma)
  • Wikipedia images require an internet connection on first load
  • The QR Code challenge requires either a mobile device or an online QR reader

๐Ÿ“œ License

Apache 2.0 โ€” Free for use, modification, and distribution.

๐Ÿ™ Credits

  • Historical content: research from Wikipedia, dcode.fr, and academic sources
  • Design inspiration: cyberpunk aesthetics, retro-futurism
  • Cryptographic algorithms: implementations following standard specifications
  • Wikipedia API for historical imagery
  • QR Code generation via api.qrserver.com

Cryptographia ยท MMXXVI ยท From Hebrew traditions to the digital age

๐Ÿ‡ซ๐Ÿ‡ท [Version franรงaise disponible dans l'application โ€” cliquez sur ๐Ÿ‡ซ๐Ÿ‡ท]

About

Game to learn the history of the cryptography

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages