Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add transilienceai/communitytools --skill cryptography -a claude-code
Open on GitHub

What 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.py for 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-code

2Manually: put the files in place

~/.claude/skills/cryptography/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cryptography/

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

Similar skills

All skills for Security →

From the same set42

The whole set →
cve-risk-score The cve-risk-score skill looks up CVE records in NVD and reports CVSS score, severity, CWE, and description. It runs when a CVE ID appears in the conversation. CX Codex +1 185installs script-generator script-generator generates optimized, syntax-checked Python, Bash, and PowerShell scripts. It builds and validates the files but never executes them. CX Codex +1 176installs skill-update skill-update generates skill directory structure, validates against Anthropic best practices, and enforces line count limits per file. Use when creating or updating a skill. CX Codex +1 174installs risk-prioritiser risk-prioritiser is a Claude Code skill that ranks confirmed attack paths by exploit feasibility, CVSS severity, and business impact. It runs after the attack-path graph is built and when a validated finding reaches nvd.score >= 9.0. CX Codex +1 168installs skill-prune skill-prune reviews skill content for orphans, duplicates, and outdated task-specific notes. Use it during maintenance or after the linter finds issues. CX Codex +1 163installs pentest-engagement pentest-engagement runs scoped penetration tests on web applications or networks, verifies findings immediately, and produces a structured PDF report. CX Codex +1 157installs regression-sweep regression-sweep is a Claude Code skill that rechecks confirmed vulnerabilities weekly for patches, mitigations, and re-introductions. It runs on Mondays or manually after major deployments. CX Codex +1 149installs ti-ingest ti-ingest parses threat-intel payloads with CVEs and affected assets into queue files for validation agents. CX Codex +1 147installs

Project sponsors

Companies that keep this analytics open