ctf-crypto

Installation
Summary

Cryptographic attack techniques and exploits for CTF challenges across classical, modern, and advanced schemes.

  • Covers 50+ attack vectors including RSA (Wiener, Pollard, Coppersmith, padding oracles), ECC (small subgroup, Smart's attack, ECDSA nonce reuse), AES (ECB leakage, CBC padding oracle, CFB-8), and stream ciphers (LFSR, Berlekamp-Massey)
  • Includes PRNG attacks (MT19937 state recovery from floats via GF(2) matrix, V8 Math.random prediction, C srand synchronization via ctypes) and lattice/LWE solvers (CVP via Babai, LLL for approximate GCD)
  • Provides ZKP/constraint solving patterns (Z3 for BPF/SECCOMP, Groth16 forgery, graph 3-coloring, Shamir SSS) and exotic structures (braid group DH, tropical semiring residuation)
  • Organized by cipher family with one-liner techniques, full code examples in supporting markdown files, and tool recommendations (RsaCtfTool, SageMath, fpylll, Z3)
SKILL.md

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
Related skills

More from ljagiello/ctf-skills

Installs
3.3K
GitHub Stars
2.0K
First Seen
Feb 1, 2026