classical-cipher-analysis

Identify and decrypt classical ciphers using frequency analysis and statistical scoring.

5|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/DorianGallo/hack-skills-local --skill classical-cipher-analysis-doriangallo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: classical-cipher-analysis
Source: https://github.com/DorianGallo/hack-skills-local/tree/main/skills/classical-cipher-analysis
Command: npx skills add https://github.com/DorianGallo/hack-skills-local --skill classical-cipher-analysis-doriangallo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Classical cipher analysis helps you correctly identify and decrypt substitution, Vigenère, transposition, and XOR-encoded text instead of guessing the wrong cipher type.

Core Features & Use Cases

  • Cipher identification from ciphertext: Detect likely encoding/cipher families using character set cues, frequency analysis, Index of Coincidence (IC), and Kasiski examination.
  • Practical breaking workflows: Execute targeted methods for Caesar/ROT, monoalphabetic substitution, Vigenère, affine, Hill, transposition (rail fence/columnar), Bacon/Polybius/Playfair, and XOR with known-plaintext or tooling.
  • Use Case: In a CTF, you paste an unknown ciphertext and need to quickly determine whether it is base64/hex/Binary/Morse or a true classical cipher, then recover the plaintext for the flag.

Quick Start

Use the classical-cipher-analysis skill to analyze the provided ciphertext by first identifying its encoding/cipher family and then applying the best-matching decryption workflow.

Frequently Asked Questions about classical-cipher-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify and decrypt an unknown classical ciphertext for a CTF challenge?

To identify and decrypt an unknown classical ciphertext, analyze character set cues, perform frequency analysis, calculate the Index of Coincidence, and apply Kasiski examination to detect the cipher family and recover the plaintext.

What is the best way to break a Vigenère cipher using frequency analysis?

Breaking a Vigenère cipher with frequency analysis involves using the Index of Coincidence and Kasiski examination to infer key length, then applying chi-squared statistical scoring to recover the polyalphabetic substitution key and plaintext.

How do I crack XOR ciphertext when I have a known plaintext?

Cracking XOR ciphertext with known plaintext is done through crib dragging, where you drag the expected plaintext fragment across the ciphertext to compute and recover the repeating XOR key.

Can I detect whether text is base64, Morse code, or a substitution cipher before attempting decryption?

Yes, you can detect base64, Morse code, or true classical ciphers by examining character set cues and performing statistical frequency analysis to distinguish standard encodings from monoalphabetic or polyalphabetic substitution ciphers.

How do I crack a columnar transposition or rail fence cipher?

Cracking columnar transposition and rail fence ciphers requires identifying the structured transposition pattern and applying cipher-specific cracking steps to rearrange the ciphertext blocks back into the correct plaintext order.

What methods help recover the key for a monoalphabetic substitution cipher?

Recovering a monoalphabetic substitution cipher key requires frequency analysis and chi-squared statistical scoring to map ciphertext characters to plaintext letters based on standard language frequency distributions.