Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
wgpsec avatar

Ctf Crypto

  • 33 installs
  • 1.6k repo stars
  • Updated July 19, 2026
  • wgpsec/aboutsecurity

Helps with ai & agent building tasks during AI-assisted development.

About

ctf-crypto is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • ctf-crypto
  • AI & Agent Building
  • AI-coding skill

Ctf Crypto by the numbers

  • 33 all-time installs (skills.sh)
  • +2 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #8,944 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/wgpsec/aboutsecurity --skill ctf-crypto

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs33
repo stars1.6k
Last updatedJuly 19, 2026
Repositorywgpsec/aboutsecurity

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

CTF 密码学攻击

深入参考

以下参考资料按需加载,根据识别出的具体方向选择对应文件:

  • 古典密码(Vigenere/Atbash/XOR/OTP/同音替换) → references/classic-ciphers.md
  • 现代密码攻击(AES/CBC/Padding Oracle/LFSR/MAC伪造) → references/modern-ciphers.md
  • RSA 攻击(小指数/Wiener/Pollard/Coppersmith/Hastad/CRT) → references/rsa-attacks.md
  • ECC 攻击(小子群/无效曲线/Smart/ECDSA nonce重用) → references/ecc-attacks.md
  • 高级数学攻击(格/LWE/同源/Pohlig-Hellman/LLL) → references/advanced-math.md
  • PRNG 攻击(MT19937/LCG/V8 XorShift128+/混沌映射) → references/prng.md
  • ZKP 与约束求解(Z3/图着色/Groth16/Shamir SSS) → references/zkp-and-advanced.md
  • 历史密码(Lorenz SZ40/42/Book Cipher) → references/historical.md
  • 奇异代数结构(辫群DH/热带半环/FPE/Goldwasser-Micali) → references/exotic-crypto.md
  • 格与LWE攻击(LLL/BKZ/Babai CVP/Coppersmith格/NTRU) → references/lattice-and-lwe.md
  • 现代密码攻击续(Blum-Goldwasser/Hash长度扩展/RC4统计) → references/modern-ciphers-2.md
  • 现代密码攻击Part3(自定义Hash反转/CRC32爆破/HMAC时序) → references/modern-ciphers-3.md
  • RSA专项技术(p=q绕过/CRT立方根/多素数分解/部分密钥) → references/rsa-attacks-2.md
  • 流密码攻击(LFSR/RC4第二字节偏差/Salsa20/ChaCha20) → references/stream-ciphers.md

---

分类决策树

题目涉及加密?
├─ 古典密码(Caesar/Vigenere/XOR/替换) → [references/classic-ciphers.md](references/classic-ciphers.md)
├─ 对称加密(AES/DES/RC4/分组密码)
│  ├─ ECB → 块重排 / 逐字节oracle
│  ├─ CBC → 比特翻转 / Padding Oracle
│  └─ 流密码 → LFSR / Berlekamp-Massey
├─ RSA
│  ├─ 小e → 开根号         ├─ 小d → Wiener
│  ├─ p≈q → Fermat          ├─ 公共模数 → ExtGCD
│  └─ 部分已知因子 → Coppersmith (SageMath)
├─ ECC
│  ├─ 阶有小因子 → Pohlig-Hellman
│  ├─ 奇异曲线 → 映射到加法群
│  └─ ECDSA nonce重用 → 恢复私钥
├─ 格/LWE → Babai CVP / LLL 短向量
├─ PRNG → MT19937 untemper / LCG / V8 xs128p
├─ ZKP → 碰撞/预测盐 / Z3求解
└─ 哈希 → 长度扩展(hashpump) / 生日攻击

速查工具

场景工具/命令
RSA 自动攻击RsaCtfTool.py -n N -e E --uncipher C
替换密码quipqiup.com
SageMathsage -python script.py(Coppersmith/ECC/格)
Z3 约束求解pip install z3-solver → BitVec / Int
PRNG MT19937pip install not_random(浮点恢复状态)
V8 Math.randomd0nutptr/v8_rand_buster
Padding OraclePadBuster / padding-oracle
XOR 操作from pwn import xor

常用 Python 库

pip install pycryptodome z3-solver sympy gmpy2

RSA 基础速查

from Crypto.Util.number import inverse, long_to_bytes
phi = (p-1)*(q-1)
d = inverse(e, phi)
m = pow(c, d, n)
print(long_to_bytes(m))

常见模式

  • RSA 乘法同态:未填充 RSA S(a)*S(b) mod n = S(a*b),可组合签名伪造
  • CBC Padding Oracle:~4096 次查询解密一个16字节块
  • Bleichenbacher (ROBOT):RSA PKCS#1 v1.5 填充oracle → ~10K 次查询恢复明文
  • CRC32 线性:追加4字节可伪造任意CRC32签名
  • 哈希长度扩展:Merkle-Damgard 结构 hash(SECRET||data) 可追加数据

RSA 小指数攻击

  • 当 e=3 时,若 m^3 < n(不取模、没有模运算),可直接开立方恢复明文

Padding Oracle 细节

  • 每字节最多 256 次尝试,暴力尝试所有可能值

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.