ctf-crypto

Automate cryptanalysis of CTF challenges with decision trees and exploit recipes.

1.6k|234|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill ctf-crypto-wgpsec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ctf-crypto
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/ctf/ctf-crypto
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill ctf-crypto-wgpsec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Consolidates actionable methods and references for solving CTF-style cryptographic challenges, reducing time spent searching across blogs and papers. Provides a structured decision tree and targeted exploit recipes so you can identify the right cryptanalysis technique quickly and reliably.

Core Features & Use Cases

  • Structured decision tree covering classical ciphers, symmetric modes, RSA families, ECC pitfalls, lattice attacks, PRNG recovery, and ZKP quirks to guide triage.
  • Curated technical references with worked patterns and code snippets for RSA small-exponent, common-modulus, Wiener, Coppersmith, padding oracle, LWE lattice attacks, MT19937 and xs128p recovery, and ECC failures.
  • Tooling guidance describing when to use SageMath, gmpy2, fpylll, z3, PadBuster and other common CTF libraries plus practical tips (endian gotchas, precision, query budgets).
  • Use case: triage a CTF challenge that presents an encrypted token, detect whether it is a padding oracle, small-exponent RSA, PRNG leak, or lattice problem, and follow the mapped procedure to recover the plaintext or key.

Quick Start

Ask the skill to analyze the challenge files and explain whether to apply small-exponent RSA, padding-oracle, PRNG state recovery, lattice/Coppersmith, or ECC techniques and list the next 3 concrete steps.

Frequently Asked Questions about ctf-crypto

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

FAQPage Schema
How do I identify which cryptanalysis technique to use for a CTF crypto challenge?

To solve CTF crypto challenges, use a structured decision tree to triage encrypted tokens and identify whether to apply small-exponent RSA, padding oracle, PRNG state recovery, lattice/Coppersmith, or ECC techniques.

What is the best way to recover plaintext from a small-exponent RSA or common-modulus attack?

The best way to recover plaintext from small-exponent RSA or common-modulus attacks is to apply curated exploit recipes using gmpy2 or SageMath, providing worked patterns and code snippets to directly derive the hidden message.

How do I perform padding oracle attacks and what libraries do I need?

To perform padding oracle attacks, follow mapped exploit procedures using PadBuster and common CTF libraries, utilizing tooling guidance to manage query budgets and recover encryption keys or craft payloads.

Can I use SageMath and fpylll for lattice and LWE attacks in CTF scenarios?

Yes, you can use SageMath and fpylll for lattice and LWE attacks in CTF scenarios, applying Coppersmith methods and practical tooling tips to handle precision and endian gotchas while recovering cryptographic keys.

How does PRNG state recovery work for MT19937 and xs128p leaks?

PRNG state recovery for MT19937 and xs128p leaks works by analyzing exposed pseudo-random outputs and applying targeted exploit recipes to reconstruct the internal state and predict future or past generated values.

When should I use z3 solver compared to other CTF crypto tools?

You should use the z3 solver compared to other CTF crypto tools when handling complex cryptographic constraints or ZKP pitfalls, utilizing tooling guidance to decide between z3, SageMath, and gmpy2 based on the specific exploit requirements.