Breaks cryptographic systems and decrypts ciphertext. Use when working with RSA, AES, XOR, classical ciphers, hash functions, or when challenge involves encryption, decryption, keys, or mathematical crypto attacks.
npx playbooks add skill kiwamizamurai/cctf --skill crypto-analysis
Progress:
- [ ] Try Ciphey auto-decrypt first
- [ ] Identify crypto type (RSA/AES/XOR/classical)
- [ ] Check for known weaknesses
- [ ] Implement attack
- [ ] Decrypt flag
ciphey -t "ENCODED_TEXT" # Auto-detects and decrypts
ciphey -f encrypted.txt # From file
| Pattern | Crypto Type | Reference |
|---------|-------------|-----------|
| n, e, c variables | RSA | [reference/rsa-attacks.md](reference/rsa-attacks.md) |
| 16/32 byte key, IV | AES | [reference/aes-attacks.md](reference/aes-attacks.md) |
| XOR operations | XOR/Stream | [reference/classical.md](reference/classical.md) |
| Polynomial mod | Lattice | [reference/lattice.md](reference/lattice.md) |
├── e small (≤5)? → Direct eth root
├── e very large? → Wiener's Attack
├── Multiple n,e,c? → Hastad's Broadcast
├── Same n, diff e? → Common Modulus
├── GCD(n1,n2) > 1? → Common Factor
├── p ≈ q? → Fermat Factorization
├── dp/dq leaked? → Partial Key Recovery
└── Default → FactorDB / yafu
Full implementations: [reference/rsa-attacks.md](reference/rsa-attacks.md)
# Auto-decrypt
ciphey -t "text"
# XOR analysis
xortool encrypted.bin
xortool -c 20 encrypted.bin # Expect spaces
# Factor large n
yafu "factor(<n>)"
# RSA tool
python3 RsaCtfTool.py -n <n> -e <e> --uncipher <c>
# Lattice (SageMath)
sage solve.sage
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.