New advertisers: 50% off your first month with code FIRSTMONTHSee slots

A reference library of cryptography attack techniques for CTF challenges, organized by cipher family and attack class.

skills.sh installs
10K
GitHub stars
3.8K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers classic, modern, and stream ciphers, RSA, ECC, Diffie-Hellman, PRNGs, zero-knowledge proofs, and advanced lattice or number-theoretic attacks
  • Includes per-topic files such as rsa-attacks.md, ecc-attacks.md, and prng-attacks.md, plus one-liner summaries with full code in supporting files
  • Lists setup requirements such as pycryptodome, z3-solver, fpylll, gmpy2, and hashcat, plus optional tools like RsaCtfTool and crypto-attacks
  • Designed for agents solving crypto challenges in Claude Code or similar filesystem-based environments with bash and Python 3

Install

$ npx -y skills add ljagiello/ctf-skills --skill ctf-crypto -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

CTF Cryptography

Quick reference for crypto CTF challenges. Each technique has a one-liner here; see supporting files for full details with code.

Prerequisites

Python packages (all platforms):

pip install pycryptodome z3-solver sympy gmpy2 hashpumpy fpylll py_ecc
# Coppersmith (optional): pip install coppersmith
# Alternative Coppersmith lib: git clone https://github.com/jvdsn/crypto-attacks ~/.ctf-tools/crypto-attacks && pip install -r ~/.ctf-tools/crypto-attacks/requirements.txt

Linux (apt):

apt install hashcat

macOS (Homebrew):

brew install hashcat

Manual install:

  • SageMath (optional — only for legacy Sage fallback snippets (collapsed sections)) — Linux: apt install sagemath, macOS: brew install --cask sage
  • RsaCtfTool — git clone https://github.com/RsaCtfTool/RsaCtfTool (automated RSA attacks)
  • crypto-attacks (Coppersmith) — git clone https://github.com/jvdsn/crypto-attacks ~/.ctf-tools/crypto-attacks + pip install -r ~/.ctf-tools/crypto-attacks/requirements.txt (alternative to pip install coppersmith)

Note: gmpy2 requires libgmp — Linux: apt install libgmp-dev, macOS: brew install gmp.

Details

Repository
github.com/ljagiello/ctf-skills
Category
Security

More from ljagiello/ctf-skills

All 11

Similar to Ctf Crypto

More Security