ctf-crypto

Attack cryptography challenges in CTF competitions using Python and Z3.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/DexterJie/codex-skills --skill ctf-crypto-dexterjie
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ctf-crypto
Source: https://github.com/DexterJie/codex-skills/tree/main/ctf-crypto
Command: npx skills add https://github.com/DexterJie/codex-skills --skill ctf-crypto-dexterjie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pycryptodome, z3-solver, sympy, gmpy2, hashpumpy, fpylll, py_ecc, hashcat, sagemath, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a comprehensive set of tools and techniques for attacking cryptography challenges in CTF competitions, covering a wide range of cryptographic primitives and attacks.

Core Features & Use Cases

  • Classic Ciphers: Offers techniques for attacking classic ciphers like Caesar, Vigenere, and Atbash.
  • Modern Ciphers: Provides methods for attacking modern ciphers like AES, RSA, and ECC, including attacks like padding oracle, S-box collisions, and Coppersmith's method.
  • Lattice Attacks: Includes lattice-based attacks like LLL, BKZ, and Babai's algorithm for solving CVP and LWE problems.
  • ZKP and Constraint Solving: Offers techniques for attacking zero-knowledge proofs and solving constraints using tools like Z3 solver.
  • Practical Examples: Provides real-world examples and use cases for each attack technique.

Quick Start

Use the ctf-crypto skill to analyze a given RSA public key and attempt to factorize the modulus to recover the private key.

Frequently Asked Questions about ctf-crypto

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I factorize an RSA modulus to recover the private key in a CTF?▼

To factorize an RSA modulus, you can apply Coppersmith's method or lattice-based attacks like LLL and BKZ. This Skill provides scripts using sympy and gmpy2 to recover the private key from a given RSA public key.

What is the best way to solve LWE and lattice problems for cryptography challenges?▼

Solving LWE and lattice problems involves applying LLL, BKZ, and Babai's algorithm for CVP. This Skill integrates fpylll to execute these lattice-based attacks and compute the underlying lattice constraints.

Can I use Z3 solver for constraint solving and zero-knowledge proof attacks?▼

Yes, you can use the Z3 solver for symbolic computation to attack zero-knowledge proofs and solve constraints. This Skill leverages z3-solver to automate the constraint solving process for complex cryptographic scenarios.

Does this Skill support attacking modern ciphers like AES and ECC?▼

Yes, attacking modern ciphers like AES and ECC is fully supported. This Skill provides techniques for padding oracle attacks, S-box collisions, and ECC analysis using pycryptodome and py_ecc libraries.

Do I need sagemath and hashcat installed to run these cryptography attacks?▼

You need sagemath and hashcat alongside dependencies like pycryptodome and fpylll to execute these cryptography attacks. They provide the mathematical computation and hash cracking capabilities required by the scripts.