cryptography — Claude Code skill: what it does, how to install
cryptography is a Claude Code skill for practical cryptanalysis in CTF challenges and pentests, including lattice attacks, padding oracles, and custom cipher breaks.
MIT 165 installs ★ 632 updated 2026-07-29
npx skills add transilienceai/communitytools --skill cryptography -a claude-codeWhat cryptography does
The skill directs your AI coding agent through cryptanalysis workflows during security audits and CTF competitions. It spots when non-standard hashes or hand-rolled block ciphers leak algebraic structure, allowing you to bypass brute force with direct Python solvers.
Covered scenarios include AGCD lattice attacks, structured-prime RSA factoring, Bleichenbacher chosen-ciphertext recovery, and Piret-Quisquater differential fault analysis on AES. It also handles Shamir secret-sharing recovery across non-prime moduli via 2-adic Lagrange interpolation.
The methodology requires inspecting the target source for linearity before resorting to SageMath or symbolic engines.
What it helps with
- break hand-rolled block ciphers via GF(2) affine collapse
- factor structured RSA moduli with related primes or square phi values
- extract AES keys using Piret-Quisquater differential fault analysis
- recover Shamir secret shares evaluated over non-prime moduli
Example prompts for the agent
- Audit
custom_hash.pyfor GF(2) linearity and write an algebraic solver in pure Python. - Recover the RSA private key given that phi(n) is a perfect square.
- Execute a Piret-Quisquater DFA attack using the paired valid and faulty ciphertexts in
ciphertexts.json.
How to install cryptography
1Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill cryptography -a claude-code2Manually: put the files in place
~/.claude/skills/cryptography/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cryptography/
1Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill cryptography -a codex2Manually: put the files in place
.agents/skills/cryptography/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill cryptography -a cursor2Manually: put the files in place
.cursor/skills/cryptography/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install transilienceai/communitytools skills/cryptography2Manually: put the files in place
.github/skills/cryptography/SKILL.md1Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill cryptography -a gemini-cli2Platform CLI
gemini skills install https://github.com/transilienceai/communitytools --path skills/cryptographyManually: put the files in place
.devin/skills/cryptography/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill cryptography -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cryptography
How to install cryptography in Claude Code?
Run npx skills add transilienceai/communitytools --skill cryptography -a claude-code in your terminal. This saves the skill into ~/.claude/skills/cryptography/SKILL.md.
What does the cryptography skill do?
It guides coding agents through CTF and pentest cryptanalysis, identifying algebraic shortcuts in custom algorithms and generating exploit solvers.
Does this skill require SageMath?
It emphasizes pure Python implementations first, recommending source analysis for linear structure before relying on external tools like SageMath.
Source text
SKILL.md · MIT
--- name: cryptography description: Cryptanalysis techniques — lattice attacks, padding oracles, weak-RNG exploitation, signature forgery, secret-sharing recovery. --- # Cryptography ## Scope Practical cryptanalysis for CTF and pentest engagements: identifying when a cryptographic primitive's structure (custom hash, partial leaks, related primes, bad RNG, weak modes) admits a faster-than-brute-force solver, then implementing that solver in pure Python where possible. Covers RSA-style algebraic factoring, lattice/AGCD recovery, GF(2) linear collapse of "complicated-looking" custom ciphers, smooth-order DLP, differential fault attacks, and Shamir-style secret-sharing recovery over non-prime moduli. Always read source first to detect linearity/algebraic structure before reaching for SageMath or symbolic solvers. ## When to use - A challenge or target ships **custom crypto** (custom hash, custom block cipher, hand-rolled key derivation) and you need to look for affine / GF(2)-linear collapse. - RSA-style primitives with **structured primes** (`p = a·r + b`, `phi(n)` perfect square, multi-prime hint files, common factors). - A service exposes a **chosen-ciphertext / chosen-input oracle** and you suspect padding-oracle, smooth-order DLP, or Bleichenbacher-style recovery. - AES with **fault injection** (correct + faulty ciphertext for the same key — Piret-Quisquater DFA). - Shamir secret sharing or threshold schemes with non-prime moduli (2-adic recovery via Lagrange interpolation with valuation tracking). ## References - [reference/lattice-attacks.md](reference/lattice-attacks.md) — AGCD lattice, discriminant-square factoring, smooth-order DLP, Piret-Quisquater DFA. - [reference/linear-secret-recovery.md](reference/linear-secret-recovery.md) — GF(2) affine collapse of custom hashes/ciphers via column-by-column linear recovery.
© transilienceai · MIT · transilienceai/communitytools