ctf-crypto is the cryptography skill of the ctf-skills collection. It gives an agent an index of weaknesses and solving methods for capture-the-flag challenges that involve encryption, hashing, signatures, random number generators or number theory, with each topic linking to a detailed file.
The main file covers classic ciphers, modern cipher attacks, RSA, elliptic curves, Diffie-Hellman, lattice and LWE problems, zero-knowledge and constraint solving, and PRNG recovery. A set of reference files holds the longer worked material.
What You Get
- A prerequisites list covering Python and Sage tooling, with optional Coppersmith libraries
- Quick-start commands for cipher identification, RSA checks, factoring, XOR analysis and hash identification
- Short entries for each attack family that link to long reference files by topic
- Pivot rules that send non-crypto work to the other skills in the collection
- A list of useful tools at the end of the main file
Common Use Cases
- Analyzing an RSA challenge with unusual parameters and choosing a factoring or lattice approach
- Recognizing a padding oracle or nonce reuse problem in a block or stream cipher challenge
- Recovering the state of a pseudo-random generator from observed outputs
- Breaking a classic cipher by identifying its type and key structure
What Makes It Unique
The skill is large and organized by attack family, with the main file acting as an index over many topic files for RSA, ECC, lattices, stream and block ciphers and PRNGs. Entries cite the competitions they came from, which helps an agent match a new challenge to a known pattern.
Under The Hood
The skill is instructions only, with no scripts of its own. It tells the agent to install Python packages, optionally clone a public attack library into a tools folder, and run Python and Sage code, command line factoring tools and hash tools on challenge files. Its frontmatter allows shell, file writes, web fetch and web search.