Skip to content
Back to skills

Crypto Analysis

ASecurity

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.

  • 666 stars
  • 0 votes
  • 0 copies
  • 17 views
  • Added February 8, 2026
toolspythonbash

Security analysis

A100/100

Scanned February 10, 2026

npx -y skills add majiayu000/claude-skill-registry --skill crypto-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Crypto Analysis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Crypto Analysis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-crypto-analysis/badge)](https://www.skillsdirectory.com/skills/majiayu000-crypto-analysis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
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!)

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

## Step 2: Identify Crypto Type

| 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) |

## 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](reference/rsa-attacks.md)

## Quick Commands

```bash
# 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](reference/rsa-attacks.md)**: Small e, Wiener, Hastad, Common Modulus, Fermat, FactorDB
- **[AES Attacks](reference/aes-attacks.md)**: ECB detection, CBC flip, Padding Oracle
- **[Classical/XOR](reference/classical.md)**: Ciphey, xortool, frequency analysis, Vigenère
- **[Lattice](reference/lattice.md)**: Coppersmith, LLL, HNP

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.