classical-cipher-analysis
Identify and solve classical ciphers encountered in CTF challenges through systematic analysis. The skill covers cipher identification via character set, frequency distribution, and index of coincidence, then applies targeted attacks for monoalphabetic substitution, Caesar/ROT variants, polyalphabetic ciphers like Vigenere, and transposition methods. Includes Kasiski examination for key-length recovery and known-plaintext techniques.
Classical Cipher Analysis helps you identify and break substitution, transposition, and polyalphabetic ciphers using frequency analysis and cryptanalysis techniques.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-06-16
Classical Cipher Analysis helps you identify and break substitution, transposition, and polyalphabetic ciphers using frequency analysis and cryptanalysis techniques. Identify and solve classical ciphers encountered in CTF challenges through systematic analysis. The skill covers cipher identification via character set, frequency distribution, and index of coincidence, then applies targeted attacks for monoalphabetic substitution, Caesar/ROT variants, polyalphabetic ciphers like Vigenere, and transposition methods. Includes Kasiski examination for key-length recovery and known-plaintext techniques.
Use it when
- classical-cipher-analysis uses Kasiski examination to break Vigenere ciphers by finding repeated sequences in the ciphertext.
- classical-cipher-analysis performs frequency analysis by counting letter occurrences in the ciphertext and comparing them to expected.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
yaklang/hack-skills/classical-cipher-analysis · repository language: CSS
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to break substitution ciphers with classical-cipher-analysis?
classical-cipher-analysis helps you break substitution ciphers by applying frequency analysis to identify patterns in the ciphertext. Start by calculating the index of coincidence (IC) to confirm monoalphabetic substitution, then compare letter frequencies against expected English distributions. For simple Caesar variants, brute-force all 25 rotations. For more complex monoalphabetic ciphers, use digraph and trigraph analysis alongside known-plaintext attacks or crib dragging to recover the substitution key.
What is Kasiski examination and how does it crack Vigenere ciphers?
classical-cipher-analysis uses Kasiski examination to break Vigenere ciphers by finding repeated sequences in the ciphertext and calculating the distances between them. The greatest common divisor of these distances reveals the likely key length. Once key length is known, you can split the ciphertext into columns, treat each as a separate Caesar cipher, and apply frequency analysis to recover each key character. This method is essential for polyalphabetic cipher cracking in CTF challenges.
How does classical-cipher-analysis perform frequency analysis on encrypted text?
classical-cipher-analysis performs frequency analysis by counting letter occurrences in the ciphertext and comparing them to expected English letter distributions. It calculates the index of coincidence (IC) to distinguish monoalphabetic from polyalphabetic ciphers—monoalphabetic ciphers show IC values near 0.065, while random text shows ~0.038. Digraph and trigraph frequency analysis further refines plaintext recovery by identifying common letter pairs and triplets.
Can classical-cipher-analysis solve affine, Hill, and Playfair ciphers?
Yes, classical-cipher-analysis handles specialized classical ciphers including affine ciphers (brute-force all 312 valid key combinations), Hill ciphers (matrix inversion and known-plaintext attacks), and Playfair ciphers (digraph frequency analysis and grid reconstruction). Each method exploits the mathematical structure of the cipher to recover the key or plaintext without exhaustive search.
Does classical-cipher-analysis detect and decode base64, hex, and Morse?
classical-cipher-analysis includes detection and decoding for base64, hexadecimal, binary, and Morse-encoded text. It identifies encoding type by analyzing character sets and patterns, then applies the appropriate decoder. This feature is useful in CTF challenges where encoded layers wrap classical ciphers or where the plaintext itself is encoded rather than encrypted.
How does classical-cipher-analysis identify which cipher was used?
classical-cipher-analysis identifies ciphers by analyzing character set (letters only vs. symbols), frequency distribution shape, index of coincidence value, and repeating patterns. Transposition ciphers preserve letter frequencies; substitution ciphers distort them. Polyalphabetic ciphers show flattened IC. Rail fence and columnar transposition reveal themselves through anagram-like properties. This multi-factor approach narrows cipher type before applying targeted attacks.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
SKILL: Classical Cipher Analysis — Expert Cryptanalysis Playbook
> AI LOAD INSTRUCTION: Expert classical cipher identification and breaking techniques for CTF. Covers cipher identification methodology (frequency analysis, IC, Kasiski), monoalphabetic substitution, Caesar/ROT, Vigenere, Enigma, affine, Hill, transposition ciphers, Bacon/Polybius/Playfair, and XOR ciphers. Base models often skip the identification step and jump to the wrong cipher type, or fail to recognize encoded (base64/hex) ciphertext that needs decoding before analysis.
0. RELATED ROUTING
- symmetric-cipher-attacks when dealing with modern symmetric ciphers (AES/DES) rather than classical
- hash-attack-techniques when the challenge involves hash-based constructions
- lattice-crypto-attacks
(truncated - see the full file via the links below)
File tree — 1 file
skills/classical-cipher-analysis/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Identify and break classical substitution and transposition ciphers in CTF”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
ctf-crypto is a reference guide for cryptographic attack methods in CTF competitions, covering classical and modern cipher exploits, RSA and ECC vulnerabilities, lattice-based attacks, PRNG state recovery, and zero-knowledge proof breaks. It includes practical one-liners and supporting documentation for techniques like padding oracles, key derivation weaknesses, and Coppersmith attacks, with setup instructions for Python packages and external tools.
This skill covers hands-on cryptanalysis of symmetric encryption vulnerabilities across block and stream ciphers. Learn to exploit CBC padding oracles and bit flipping attacks, detect and abuse ECB mode repetition, decrypt data byte-at-a-time, and break stream ciphers through key reuse and state recovery. Includes Python implementations and tool usage for authorized testing and CTF challenges.
CTF Crypto helps you investigate cryptographic implementations embedded in compiled binaries through systematic detection, algorithm identification, and weakness analysis. Trace key sources, recognize standard algorithms and custom ciphers, and exploit implementation flaws to recover plaintext or extract keys.
Master techniques for analyzing and defeating code obfuscation in protected binaries. Learn to identify junk code, opaque predicates, self-modifying code, control flow flattening, movfuscator, VM protectors like VMProtect and Themida, string encryption, and import hiding. Covers both static analysis patterns and dynamic deobfuscation strategies using symbolic execution, emulation, and trace-based recovery.
Master symbolic execution techniques to solve CTF challenges, recover keys, and bypass checks. Learn angr state initialization, constraint solving with Z3, function hooking patterns, and Unicorn Engine emulation for binary analysis and unpacking.
This skill teaches systematic techniques for analyzing custom virtual machines and bytecode interpreters found in CTF challenges and commercial protectors. Learn to identify dispatcher patterns, map opcodes to operations, extract bytecode programs, and write custom disassemblers to understand stack-based, register-based, and esoteric VM architectures. Includes methods for solving maze-style challenges embedded in VM implementations.