# Cryptography

> Cryptography is an open-source agent skill for security. Guides an agent through cryptanalysis of weak RSA, custom ciphers, RNGs and secret sharing. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/transilienceai/communitytools/tree/main/skills/cryptography
- **Repository:** https://github.com/transilienceai/communitytools
- **GitHub stars:** 641
- **License:** MIT
- **Skill name:** cryptography
- **Collection:** https://github.com/transilienceai/communitytools
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-02

## About

This skill points an agent at cryptographic weaknesses in CTF challenges and penetration tests. Its main idea is to read the source first and look for algebraic or linear structure, such as affine behaviour in a custom hash, related or structured RSA primes, or a biased random number generator, before reaching for heavy symbolic tools. When structure is found, the skill steers the agent toward a faster-than-brute-force solver, often written in pure Python.

The guidance covers several attack families: lattice-based recovery for partial leaks, padding oracle and smooth-order discrete log attacks against chosen-input services, differential fault analysis on AES when correct and faulty ciphertexts are available, and recovery of Shamir-style shares over non-prime moduli. Two reference documents hold the detailed methods, one for lattice and fault attacks and one for GF(2) linear recovery of custom primitives.

The folder ships no scripts. The agent is expected to write its own solver code, and SageMath or other symbolic solvers are optional and used only when plain Python is not enough.

## When your agent uses it

> Cryptanalysis techniques — lattice attacks, padding oracles, weak-RNG exploitation, signature forgery, secret-sharing recovery.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/transilienceai/communitytools/tree/HEAD/skills/cryptography)
- [License: MIT](https://github.com/transilienceai/communitytools/tree/HEAD/skills/cryptography)

## Features

- **Structure-first analysis:** Directs the agent to inspect source code for linearity or algebraic weaknesses before choosing an attack.
- **RSA weakness solvers:** Covers factoring when primes are structured, related, or when phi(n) has special form.
- **Lattice attack methods:** Describes AGCD and lattice recovery techniques for partial or leaked key material.
- **Padding oracle guidance:** Outlines approaches for chosen-ciphertext oracles, including padding oracle and Bleichenbacher-style recovery.
- **AES fault analysis:** Explains differential fault analysis using correct and faulty ciphertext pairs for the same key.
- **Secret sharing recovery:** Covers reconstructing Shamir-style shares over non-prime moduli using valuation tracking.
- **GF(2) linear collapse:** Describes column-by-column recovery of custom hashes and ciphers that are affine over GF(2).

## Good for

- Break a CTF challenge that uses a custom hash by finding its GF(2) linear structure
- Factor an RSA modulus whose primes have a known relationship
- Recover a secret from Shamir shares computed over a non-prime modulus
- Exploit a padding oracle exposed by a web service during a pentest
- Recover an AES key from correct and faulty ciphertext pairs

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/cryptography` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/cryptography &&
cp -R "$tmp/skills/cryptography" ~/.claude/skills/cryptography &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/cryptography` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/cryptography` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/cryptography &&
cp -R "$tmp/skills/cryptography" ~/.agents/skills/cryptography &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/cryptography` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/cryptography` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/cryptography &&
cp -R "$tmp/skills/cryptography" ~/.cursor/skills/cryptography &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/cryptography` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/transilienceai/communitytools.git --path skills/cryptography
```

Or copy the folder to `~/.gemini/skills/cryptography` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/cryptography`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/cryptography &&
cp -R "$tmp/skills/cryptography" ~/.copilot/skills/cryptography &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/cryptography` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/transilienceai/communitytools.git
```

Then copy `communitytools/skills/cryptography` into your agent's skills folder as `cryptography`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does the skill include runnable scripts?

No. The skill folder contains no scripts, so the agent writes its own solver code based on the reference guides.

### When does the skill trigger?

It applies when a target has custom crypto, RSA with structured primes, a chosen-input oracle, AES fault injection data, or threshold schemes with non-prime moduli.

### Does Cryptography require SageMath?

Not necessarily. The guidance prefers pure Python where possible and uses SageMath or symbolic solvers only when needed.

### How do I install Cryptography in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/cryptography to use it in all your projects, or to .claude/skills/cryptography in one project.

### Does Cryptography run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Cryptography?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Cryptography?

The closest alternatives to Cryptography are Server side, Blockchain security, Constant time testing, Constant time analysis and System.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Server side](https://ai-powered.com/skills/server-side): Server side is an open-source agent skill for security.
- [Blockchain security](https://ai-powered.com/skills/blockchain-security): Blockchain security is an open-source agent skill for security.
- [Constant time testing](https://ai-powered.com/skills/constant-time-testing): Constant time testing is an open-source agent skill for security.
- [Constant time analysis](https://ai-powered.com/skills/constant-time-analysis): Constant time analysis is an open-source agent skill for security.
- [System](https://ai-powered.com/skills/system): System is an open-source agent skill for security.
- [Systematic bug hunting](https://ai-powered.com/skills/systematic-bug-hunting): Systematic bug hunting is an open-source agent skill for security.
- [Dfir](https://ai-powered.com/skills/dfir): Dfir is an open-source agent skill for security.
- [Network appliance offensive](https://ai-powered.com/skills/network-appliance-offensive): Network appliance offensive is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/cryptography
