ctf-crypto

Apply cryptography attacks to solve CTF challenges involving RSA, AES, and ECC.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill equips you with cryptography attack techniques for CTF challenges, streamlining the process of tackling encryption, hashing, signatures, and more.

Core Features & Use Cases

  • Cryptography Attacks: Offers a wide array of attacks for various cryptographic systems and problems.
  • Resource Compilation: Provides comprehensive lists of resources, tools, and code examples for each technique.
  • Use Case: Whether you're facing an RSA encryption challenge or need to understand AES attacks, this Skill can help you navigate through the complexities and develop an effective attack strategy.

Quick Start

To check the bit length of an RSA modulus 'n', run: python3 -c "from Crypto.Util.number import *; n=<N>; print(f'bits={n.bit_length()}')"

Frequently Asked Questions about ctf-crypto

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

FAQPage Schema
How do I solve RSA cryptography challenges in CTF competitions?

To solve RSA cryptography challenges in CTF competitions, apply mathematical attacks targeting encryption weaknesses using libraries like pycryptodome, gmpy2, and sympy to analyze modulus bit length and factorization vulnerabilities.

What cryptography attacks work against AES and ECC in CTF problems?

Cryptography attacks against AES and ECC in CTF problems target structural weaknesses in block cipher modes and elliptic curve parameters. These techniques exploit invalid curve points or padding oracle vulnerabilities to recover plaintext or keys.

Can I use Python to automate hash length extension attacks for CTF crypto?

Yes, you can use Python to automate hash length extension attacks for CTF crypto by utilizing the hashpumpy library. It allows you to forge valid MACs by appending data to the original message without knowing the secret key.

Do I need a specific Python environment to run cryptography attack scripts?

You need a Python filesystem-based agent with internet access to run cryptography attack scripts. The environment must install dependencies like pycryptodome, z3-solver, sympy, gmpy2, hashpumpy, fpynnll, and py_ecc to execute mathematical and encryption attacks.

How do I break weak PRNG and ZKP implementations during security challenges?

To break weak PRNG and ZKP implementations during security challenges, apply mathematical analysis to predict pseudo-random number sequences and exploit zero-knowledge proof protocol flaws. Tools like z3-solver assist in constraint solving and state recovery.

What's the best way to check RSA modulus bit length before launching an attack?

The best way to check RSA modulus bit length before launching an attack is running a Python command using Crypto.Util.number to evaluate the integer n. This determines the key size and guides your selection of appropriate factorization techniques.