Back to list
kiwamizamurai

crypto-analysis

by kiwamizamurai

CTF (Capture The Flag) learning workspace with writeups and solution scripts

1🍴 0📅 Jan 22, 2026

SKILL.md


name: crypto-analysis description: 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. allowed-tools: Bash, Read, Write, Grep, Glob

Crypto Analysis Skill

Quick Workflow

Progress:
- [ ] Try Ciphey auto-decrypt first
- [ ] Identify crypto type (RSA/AES/XOR/classical)
- [ ] Check for known weaknesses
- [ ] Implement attack
- [ ] Decrypt flag

Step 1: Auto-Decrypt (Try First!)

ciphey -t "ENCODED_TEXT"    # Auto-detects and decrypts
ciphey -f encrypted.txt     # From file

Step 2: Identify Crypto Type

PatternCrypto TypeReference
n, e, c variablesRSAreference/rsa-attacks.md
16/32 byte key, IVAESreference/aes-attacks.md
XOR operationsXOR/Streamreference/classical.md
Polynomial modLatticereference/lattice.md

RSA Attack Decision Tree

├── 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

Quick Commands

# 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

Reference Files

  • RSA Attacks: Small e, Wiener, Hastad, Common Modulus, Fermat, FactorDB
  • AES Attacks: ECB detection, CBC flip, Padding Oracle
  • Classical/XOR: Ciphey, xortool, frequency analysis, Vigenère
  • Lattice: Coppersmith, LLL, HNP

Score

Total Score

55/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon