# RSA Audit
An agent skill that checks your machine for cryptography that breaks if RSA is cracked or a quantum computer arrives, then writes a short report on what to fix.
```bash
npx skills add haltakov/rsa-audit -g
```
Then ask your agent: **"Audit this machine for RSA and quantum exposure."**
It works with Claude Code, Codex, Cursor, Gemini CLI, OpenCode and other agents that support [Agent Skills](https://agentskills.io/specification). It's read-only and never changes anything on your machine.
---
## Why
Rumors that RSA-2048 has been broken come and go. NIST already plans to retire both RSA and today's elliptic-curve algorithms by 2035. Either way, the first step is the same: a list of where these algorithms are used. This skill builds that list for one machine at a time and tells you what to change.
## What it checks
- **SSH:**
- your keys, and the ones GitHub publishes for you;
- whether client and server key exchange is post-quantum;
- host keys and `authorized_keys`.
- **TLS:**
- which certificate key types your web servers and proxies are set to use (Traefik, Caddy, certbot, nginx, Apache, HAProxy);
- whether the TLS libraries on the machine support post-quantum key exchange, both for sites it serves and for connections its apps make.
- **Code:** RSA signing in your projects, such as RS256 JWTs.
- **Everything else:**
- GPG and git signing, code-signing identities;
- files and backups encrypted to RSA keys; age, sops and git-crypt;
- Kubernetes and Docker TLS, VPN configs, mail-server signing keys;
- password managers and messengers worth knowing about.
Domains, DNS and email settings are out of scope for now.
## The report
Findings come in two sections:
1. **RSA broken, no quantum computer.** A new classical algorithm breaks RSA; elliptic curves still hold.
2. **Quantum break.** Elliptic curves fall too, and traffic recorded today without post-quantum key exchange can be decrypted later.
Each finding is one sentence, followed by a short **Explanation**, **Risk if not fixed** and **How to fix**. The report ends with what's outside your control and what couldn't be checked.
```
### 1. Your GitHub SSH key (~/.ssh/id_rsa) uses RSA.
**Explanation:** GitHub publishes this public key at github.com/<user>.keys, and this machine uses it to push code.
**Risk if not fixed:** Anyone who can break RSA could compute the private key from the public one and push to your repositories.
**How to fix:** Create an Ed25519 key, add it to GitHub, point ~/.ssh/config at it, then remove the RSA key from GitHub.
```
## Use
Ask your agent, for example:
- "Audit this machine for RSA and quantum exposure."
- "Is this server quantum-safe?"
- In Codex: `$rsa-audit`
The skill audits the machine the agent runs on. To audit a server, install the skill there and run your agent on it.
You can also run the inventory script directly:
```bash
bash skills/rsa-audit/scripts/local-inventory.sh
```
## Safety
The audit is read-only. It doesn't change configs, restart services or install anything.
- **Output:** it prints key types, sizes and fingerprints, never private keys, tokens or `.env` values.
- **Privileges:** it uses `sudo` only non-interactively (`sudo -n`). Anything that needs a password ends up under "Couldn't check", with the command you can run yourself.
- **Network access is limited to:**
- reading your public key list on GitHub;
- one SSH key-exchange test against github.com.
It doesn't contact your websites or any online scanners.
The script in [`skills/rsa-audit/scripts`](skills/rsa-audit/scripts) is plain bash. Read it before you run it.
## Requirements
- `bash`, `ssh`, `openssl` and `curl`.
- Optional: the `gh` CLI logged in, or `GITHUB_USER` set, to check the keys GitHub publishes for you.
- Windows: use WSL, or let the agent follow the manual checks in `references/checks.md`.
## More install options
The install command at the top uses the cross-agent [`skills` CLI](https://github.com/vercel-labs/skills); `-g` installs the skill for your user rather than for a single project.
To install for specific agents without the interactive prompt:
```bash
npx skills add haltakov/rsa-audit -g -a claude-code -a codex -y
```
To install manually, copy `skills/rsa-audit` into your agent's skills folder:
| Agent | Folder |
|---|---|
| Claude Code | `~/.claude/skills/` |
| Codex | `~/.agents/skills/` |
| Cursor | `~/.cursor/skills/` |
| Gemini CLI | `~/.gemini/skills/` |
## Repository layout
```
skills/rsa-audit/
├── SKILL.md # workflow, scenarios, prioritization, report format
├── agents/openai.yaml # Codex display metadata
├── references/
│ ├── checks.md # manual checks, version facts, Windows commands
│ └── fixes.md # accurate fix recipes for the report
└── scripts/
└── local-inventory.sh # SSH, TLS libraries, web servers, keys, VPN (read-only)
```
## Limitations
- **One machine per run.** To audit a server, run the agent on it.
- **No domain checks.** DNS, DKIM, DMARC and live website TLS aren't checked. For web servers, the skill reads their configuration instead.
- **It reports; it doesn't fix.** It also isn't a replacement for a professional security assessment.
## License
[MIT](LICENSE)