{"id":51578783,"url":"https://github.com/systemslibrarian/crypto-lab-vigenere-break","last_synced_at":"2026-07-11T03:32:26.267Z","repository":{"id":367823620,"uuid":"1282193919","full_name":"systemslibrarian/crypto-lab-vigenere-break","owner":"systemslibrarian","description":"Browser-based Vigenère cipher demo — encrypt and decrypt with a repeating key, then recover the key length via Kasiski examination and index of coincidence and solve each column by frequency analysis. Real cryptanalysis. No backends. No simulated math.","archived":false,"fork":false,"pushed_at":"2026-06-27T21:02:46.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-27T21:20:47.045Z","etag":null,"topics":["cipher","classical-cipher","codebreaking","cryptanalysis","crypto-lab","cryptography","frequency-analysis","historical-cryptography","index-of-coincidence","kasiski-examination","polyalphabetic-cipher","vigenere","vigenere-cipher"],"latest_commit_sha":null,"homepage":"https://systemslibrarian.github.io/crypto-lab-vigenere-break/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemslibrarian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-27T12:53:56.000Z","updated_at":"2026-06-27T21:02:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/systemslibrarian/crypto-lab-vigenere-break","commit_stats":null,"previous_names":["systemslibrarian/crypto-lab-vigenere-break"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/systemslibrarian/crypto-lab-vigenere-break","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-vigenere-break","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-vigenere-break/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-vigenere-break/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-vigenere-break/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemslibrarian","download_url":"https://codeload.github.com/systemslibrarian/crypto-lab-vigenere-break/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-vigenere-break/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35350133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cipher","classical-cipher","codebreaking","cryptanalysis","crypto-lab","cryptography","frequency-analysis","historical-cryptography","index-of-coincidence","kasiski-examination","polyalphabetic-cipher","vigenere","vigenere-cipher"],"created_at":"2026-07-11T03:32:25.608Z","updated_at":"2026-07-11T03:32:26.253Z","avatar_url":"https://github.com/systemslibrarian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crypto-lab-vigenere-break\n\n## What It Is\n\nThe **Vigenère cipher** is a polyalphabetic substitution cipher: each plaintext letter is shifted by the corresponding letter of a repeating keyword, i.e. `c_i = (p_i + k_(i mod L)) mod 26`. It solves the weakness of a simple Caesar/monoalphabetic cipher — a single fixed shift that flat letter-frequency analysis cracks instantly — by cycling through `L` different shifts. It is a **symmetric** scheme: the same short keyword both encrypts and decrypts, and it is **not** secure by modern standards. This demo implements the cipher *and* its classical break — **Kasiski examination**, the **index of coincidence**, and per-column **chi-squared frequency analysis** — to recover the key from ciphertext alone. The whole point is that a short, repeating key is breakable; a key as long as the message and never reused (a one-time pad) is not.\n\n## When to Use It\n\n- **Teaching how classical cryptanalysis actually works** — Kasiski spacing, index of coincidence, and frequency analysis are visible end-to-end here, which is why Vigenère is the canonical worked example.\n- **Understanding why key reuse is fatal** — the repeating key is exactly what the break exploits, a lesson that carries directly into modern stream-cipher and one-time-pad discipline.\n- **Puzzles, CTFs, and historical recreation** — Vigenère shows up in beginner crypto challenges and 16th–19th-century historical contexts where this is the right period-accurate tool.\n- **Do NOT use it to protect real data.** It has no computational security: given enough ciphertext, the key falls out by hand, as this demo demonstrates. For confidentiality use an authenticated modern cipher (e.g. AES-GCM or ChaCha20-Poly1305); for theoretical unbreakability with a one-time key, see the OTP Vault demo.\n\n## Live Demo\n\n**[systemslibrarian.github.io/crypto-lab-vigenere-break](https://systemslibrarian.github.io/crypto-lab-vigenere-break/)**\n\nEncrypt and decrypt text with a keyword (the panel shows the per-letter key alignment and an optional tabula recta), then **break a real ciphertext step by step**. The break workbench walks Kasiski examination → index of coincidence → per-column chi-squared solving → recovered key → full decryption, with controls for the **plaintext/keyword input**, **ciphertext input**, **key-length selector**, and **per-column shift override**, plus a guided challenge mode. Every statistic is computed live from the ciphertext — nothing is hardcoded, and it honestly reports when the text is too short to break.\n\n## What Can Go Wrong\n\n- Too little ciphertext defeats the break: Kasiski needs repeated factors and the index of coincidence and per-column chi-squared analysis need enough letters per column to be statistically meaningful.\n- A wrong key-length guess misaligns every column, so the chi-squared solver locks onto plausible-but-wrong shifts and produces garbage plaintext.\n- Frequency analysis assumes a known plaintext language; text that is not standard English (or a different alphabet entirely) shifts the expected distribution and misleads the solver.\n- A key as long as the message and never reused is no longer a Vigenère weakness but a one-time pad — this break cannot recover it, which is exactly the lesson.\n- Reusing the same keyword across many messages multiplies the exposed material and makes recovery easier, the historical reason Vigenère eventually fell.\n\n## Real-World Usage\n\n- A historical confidentiality tool from the 16th through 19th centuries, famously dubbed \"le chiffre indéchiffrable\" before Babbage and Kasiski showed how to break it.\n- A staple teaching example in cryptography courses precisely because its strengths and its break are both tractable by hand.\n- A common beginner-level puzzle in CTFs, escape rooms, and alternate-reality games where period-accurate or lightweight obfuscation is wanted.\n- Today strictly obsolete for security: it is studied to motivate key non-reuse, computational hardness, and the move to modern authenticated ciphers.\n\n## How to Run Locally\n\n```bash\ngit clone https://github.com/systemslibrarian/crypto-lab-vigenere-break\ncd crypto-lab-vigenere-break\nnpm install\nnpm run dev\n```\n\n## Related Demos\n- [crypto-lab-dead-sea-cipher](https://systemslibrarian.github.io/crypto-lab-dead-sea-cipher/) — substitution, Vigenère, and Atbash classical ciphers in one place.\n- [crypto-lab-enigma-forge](https://systemslibrarian.github.io/crypto-lab-enigma-forge/) — another historical cipher and its mechanized break (the Bombe).\n- [crypto-lab-otp-vault](https://systemslibrarian.github.io/crypto-lab-otp-vault/) — the one-time pad: what Vigenère becomes when the key stops repeating, plus the two-time-pad failure.\n- [crypto-lab-world-ciphers](https://systemslibrarian.github.io/crypto-lab-world-ciphers/) — modern symmetric block ciphers, the secure successors to classical substitution.\n\n---\n\n*One of 120+ browser demos in the [Crypto Lab](https://crypto-lab.systemslibrarian.dev/) suite.*\n\n*\"So whether you eat or drink or whatever you do, do it all for the glory of God.\" — 1 Corinthians 10:31*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-vigenere-break","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-vigenere-break","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-vigenere-break/lists"}