skillfed

ctf-crypto

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.

ctf-crypto teaches cryptographic attack techniques for CTF challenges across RSA, AES, ECC, lattices, and PRNG weaknesses.

AI-generated summary based on this skill's SKILL.md

2,840 334 MIT updated by ljagiello

Install

ljagiello/ctf-skills/ctf-crypto · repository language: Python

git clone https://github.com/ljagiello/ctf-skills
cp -r ctf-skills/ctf-crypto ~/.claude/skills/ctf-crypto
npx skillfed install ljagiello/ctf-skills/ctf-crypto

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What cryptography CTF challenges does ctf-crypto cover?

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.

How does ctf-crypto help with RSA attack techniques?

ctf-crypto provides exploits for RSA vulnerabilities including Wiener attacks on small d values, Hastad broadcast attacks, Coppersmith polynomial root-finding methods, and Pollard p-1 factorization. The guide includes practical implementations and setup instructions for Python packages and external tools needed to execute these attacks.

What elliptic curve discrete log methods are in ctf-crypto?

ctf-crypto covers elliptic curve attacks including ECDSA nonce reuse exploitation and discrete logarithm problem-solving techniques. It provides reference implementations and explains how to identify and exploit weaknesses in ECC implementations commonly found in CTF challenges.

Does ctf-crypto explain padding oracle attacks?

Yes, ctf-crypto includes detailed coverage of padding oracle attacks and other oracle-based decryption methods. It also covers related symmetric cipher weaknesses like CBC mode bit flipping, AES encryption vulnerabilities, and GCM nonce reuse issues with practical exploitation examples.

What lattice and number theory techniques does ctf-crypto include?

ctf-crypto covers lattice reduction for LWE problems, Coppersmith polynomial root-finding, meet-in-the-middle birthday attacks, and general number theory factoring methods. It provides setup instructions for constraint solvers like Z3 and explains how to apply these techniques to solve crypto CTF problems.

How can ctf-crypto help break PRNG and hash functions?

ctf-crypto addresses PRNG state recovery, stream cipher LFSR attacks, and hash function collision techniques including frequency analysis for classical ciphers and XOR key recovery methods. It includes practical one-liners and supporting documentation for implementing these attacks in CTF scenarios.

SKILL.md

rendered from the published skill — quoted content, verbatim

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

Linux (apt):

apt install hashcat sagemath

macOS (Homebrew):

brew install hashcat

Manual install: - SageMath — Linux: apt install sagemath, macOS: brew install --cask sage - RsaCtfTool — git clone https://github.com/RsaCtfTool/RsaCtfTool (automated RSA

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 15 files
ctf-crypto/SKILL.md
ctf-crypto/advanced-math.md
ctf-crypto/classic-ciphers.md
ctf-crypto/ecc-attacks.md
ctf-crypto/exotic-crypto-2.md
ctf-crypto/exotic-crypto.md
ctf-crypto/historical.md
ctf-crypto/lattice-and-lwe.md
ctf-crypto/modern-ciphers-2.md
ctf-crypto/modern-ciphers-3.md
ctf-crypto/modern-ciphers.md
ctf-crypto/prng-attacks.md
ctf-crypto/prng.md
ctf-crypto/rsa-attacks-2.md
ctf-crypto/rsa-attacks.md

Related skills

Tags

attack-automation mathematical-cryptanalysis oracle-exploitation key-recovery-techniques cipher-weaknesses prng-prediction lattice-problems side-channel-attacks padding-schemes algebraic-structures