Empirically audit any web, API, database, worker, desktop, or mobile stack for Post-Quantum Cryptography (PQC) readiness (X25519MLKEM768, SSH hybrid KEX, runtime OpenSSL/Go/Node/Electron versions, app-layer primitives, secret reuse, and storage/backups) and produce a phased remediation plan.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Pqc Audit?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/0xburn-pqc-audit)
---
name: pqc-audit
description: Empirically audit any web, API, database, worker, desktop, or mobile stack for Post-Quantum Cryptography (PQC) readiness (X25519MLKEM768, SSH hybrid KEX, runtime OpenSSL/Go/Node/Electron versions, app-layer primitives, secret reuse, and storage/backups) and produce a phased remediation plan.
---
# Post-Quantum Cryptography (PQC) Full-Stack Audit Skill
Use this skill when the user asks to audit their codebase, infrastructure, endpoints, or runtimes for post-quantum cryptography (PQC) readiness, or asks how to prepare their backend/frontend for quantum-resistant cryptography.
## Core Mental Model (Keep Explanations Grounded)
1. **Priority 1 — Key Exchange (Harvest Now, Decrypt Later / HNDL):**
An adversary can record encrypted TLS/SSH traffic today and decrypt it later with a Cryptographically Relevant Quantum Computer (CRQC). Prioritize data with a long confidentiality lifetime, high sensitivity, exposed capture paths, regulatory deadlines, or long migration lead times. Target: TLS 1.3 hybrid **`X25519MLKEM768`** (NIST FIPS 203 ML-KEM) and SSH **`mlkem768x25519-sha256`** / **`sntrup761x25519-sha512@openssh.com`**.
2. **Already Quantum-Safe — Symmetric & Hashes:**
Grover's algorithm only halves symmetric key strength. **`AES-256-GCM`**, **`ChaCha20-Poly1305`**, **`HMAC-SHA256`**, **`SHA-256`/`SHA-512`**, **`HKDF`**, and **`Argon2`** are already post-quantum safe. Do **not** recommend replacing them.
3. **Medium-Term — Classical Digital Signatures:**
`RSA`, `ECDSA`, and `Ed25519` (TLS certs, third-party webhooks, CloudFront signed URLs, code signing) require a live CRQC at verification time to forge. **Never** break third-party webhook verification unilaterally; track vendor migration to **`ML-DSA`** (FIPS 204) / **`SLH-DSA`** (FIPS 205).
4. **The #1 Trap — TLS Is a Two-Sided Handshake:**
Probing a remote server only proves the *server* supports `X25519MLKEM768`. You **must** also audit every *client runtime* that initiates outbound connections (serverless Node.js, Python workers, ORM engines, Electron apps, reverse proxies).
## Strict Safety Rules
- **NEVER print secrets, API keys, passwords, tokens, or private keys.** If the user explicitly authorizes inspection of `.env` files or cloud project settings, print ONLY variable names, key lengths, and non-secret hostnames/URLs.
- **Offline inventory first.** Do not open `.env` values or cloud project settings unless the user explicitly authorizes that source. Prefer checked-in configuration, variable names, and a user-provided endpoint inventory.
- **Require an exact allowlist.** Before any network connection, show the proposed host, port, and protocol list and obtain explicit approval. Treat third-party, private, loopback, link-local, database, and SSH targets as separately gated. Never discover-and-probe automatically.
- **Active probes are not passive.** TLS and SSH handshakes create traffic and logs and may trigger monitoring or rate limits. Do not modify production services, database rows, or webhook verifiers during the audit phase.
- **Empirically verify everything.** Do not guess from marketing docs. Probe live endpoints with OpenSSL >= 3.5.0 and inspect actual runtime versions.
- **No unnecessary panic.** Explicitly tell the user if no emergency password resets or downtime are required.
---
## 5-Step Empirical Audit Procedure
### Step 1: Inventory Every Hostname & Cryptographic Surface
1. Inspect `package.json`, `Dockerfile`, and checked-in deployment configs (`Caddyfile`, `nginx.conf`, Terraform, GitHub Actions, systemd units). List referenced environment variable names. Do not read `.env*` values unless explicitly authorized.
2. Extract every production host:
- Public web & API domains
- Self-hosted reverse proxies / origins
- Database pooler & direct endpoints (read + write if separate)
- Managed auth / identity hosts (do **not** assume a vendor's auth host uses the same TLS stack as their DB host!)
- Object storage buckets (S3 / R2 / GCS / Blob) — remember private browser uploads use **two** connections (API issuing presigned URL + browser PUT to storage host)
- CDNs (CloudFront / Cloudflare / Fastly)
- Third-party APIs (Stripe, Resend, Discord, OAuth providers, LLMs)
- SSH / bastion / worker hosts
Present the inventory to the user. Continue only with the exact targets they approve.
### Step 2: Probe Approved Live Endpoints for `X25519MLKEM768`
Run `scripts/probe_tls.py` (bundled with this skill) using OpenSSL 3.5+ / 4.x:
```bash
python3 skills/pqc-audit/scripts/probe_tls.py \
--acknowledge-authorized \
app.example.com \
origin.example.com \
bucket.s3.us-west-2.amazonaws.com \
db-pooler.example.com:5432:postgres
```
For an explicitly approved SSH host, negotiate without loading user SSH configuration, credentials, an agent, or a remote command. This still creates a server log entry:
```bash
ssh -F none -T -vv \
-o BatchMode=yes -o ConnectTimeout=5 \
-o StdinNull=yes -o NumberOfPasswordPrompts=0 \
-o IdentityAgent=none -o IdentityFile=none \
-o PubkeyAuthentication=no -o HostbasedAuthentication=no \
-o PasswordAuthentication=no -o KbdInteractiveAuthentication=no \
-o GSSAPIAuthentication=no -o ProxyCommand=none -o ProxyJump=none \
pqc-audit-no-auth@approved-host 2>&1 | grep -iE "kex: algorithm|cipher:"
```
Record for every host: **Default Group**, **Forced `X25519MLKEM768` (PASS/FAIL)**, and **Owner (You vs. Vendor)**.
### Step 3: Audit Every Client & Proxy Runtime
Check the actual TLS library version of every runtime that terminates or initiates TLS:
| Runtime | Minimum Version for `X25519MLKEM768` | Common Failure Mode |
|---|---|---|
| **OpenSSL (Linux / Python / libpq)** | `OpenSSL 3.5.0+` | Ubuntu 24.04 ships `OpenSSL 3.0.13` -> Python `psycopg`/`boto3`/`requests` silently use classical `X25519`. |
| **Node.js (Vercel / Lambda / Servers)** | Official [`Node 22.20+`](https://nodejs.org/en/blog/release/v22.20.0) or `24.x+` builds | Node 22 moved to OpenSSL 3.5 in 22.20. Third-party and managed builds may differ. Verify `process.versions.openssl`; an ORM may use a separate TLS stack. |
| **Go / Caddy Reverse Proxy** | `Go 1.24+` / `Caddy 2.10+` | Ubuntu apt installs Caddy `2.6.2` (pre-Go 1.24). Install from Caddy's official repo instead. |
| **Nginx / Envoy** | Linked with `OpenSSL 3.5+` or `BoringSSL` | Check `nginx -V` and configure `ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;`. |
| **Electron Desktop Apps** | [`Electron 35+`](https://releases.electronjs.org/schedule) (Chromium 134+) with `net.fetch()`, or `Electron 40+` for Node 24-backed `fetch()` | Main-process Node `fetch()` uses Electron's bundled Node TLS stack instead of Chromium BoringSSL. Verify the actual Electron, Chromium, Node, and TLS versions. Also check code signing/notarization. |
| **OpenSSH** | `9.0+` for `sntrup761x25519`; `9.9+` for `mlkem768x25519` | Verify the algorithm actually negotiated with the server. |
| **Apple platforms** | [iOS 26+](https://developer.apple.com/videos/play/wwdc2025/314/) with `URLSession` or `Network.framework` | Apple enables quantum-secure TLS by default for these recommended APIs. Legacy and custom networking stacks require separate verification. |
| **Android** | No OS-version-wide guarantee | Verify the exact app networking stack and device/runtime behavior. [Android 14's documented Conscrypt changes](https://source.android.com/docs/core/ota/modular-system/conscrypt) do not establish automatic ML-KEM TLS support. |
Quick Node runtime check:
```bash
node -e "
const tls = require('tls');
console.log('Node:', process.version, 'OpenSSL:', process.versions.openssl);
const s = tls.connect({ host: 'cloudflare.com', port: 443, servername: 'cloudflare.com', ecdhCurve: 'X25519MLKEM768' }, () => {
console.log('PASS:', s.getProtocol(), s.getCipher(), s.getEphemeralKeyInfo());
s.end();
});
s.on('error', e => console.log('FAIL:', e.message));
"
```
### Step 4: Audit Application Crypto, Secrets & Storage
Search the codebase for all cryptographic primitives:
```bash
grep -rnE "createVerify|createSign|createCipher|createDecipher|createHmac|hkdf|crypto\.verify|crypto\.sign|RSA-SHA|Ed25519|ed25519|RS256|ES256|EdDSA" \
src/ lib/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.mjs" --include="*.py"
```
Check specifically for:
1. **Asymmetric dependencies:** `Ed25519` / `RSA` webhooks, JWTs, signed URLs (note their TTLs — a 5-minute signed URL has near-zero HNDL/forgery risk).
2. **Secret reuse / blast radius:** Is one root secret (e.g., an auth cookie secret) reused across session cookies, OAuth state, mobile JWTs, and encrypted DB columns? Recommend separate secrets or HKDF domain separation.
3. **Object storage hardening:** Check S3/R2 `PublicAccessBlock`, default encryption (`SSE-S3` AES-256 / `SSE-KMS`), and whether the bucket policy explicitly denies `aws:SecureTransport: false`.
4. **Local / cloud backups:** Check for unencrypted `.sql`, `.sql.gz`, or `.dump` files sitting in the repo or developer disk.
### Step 5: Deliver a Phased, Actionable Report
Present findings in four clean tables/sections:
1. **Live TLS Endpoint Table** (Host, Default Group, `X25519MLKEM768` PASS/FAIL, Owner).
2. **Client Runtime Table** (Runtime, Audited TLS Stack, Offers ML-KEM?, Impact).
3. **App Crypto, Secrets & Storage Table** (Primitive, Posture, Blast-Radius/Hygiene Findings).
4. **Prioritized Remediation & Verification Plan** split explicitly into:
- **Phase 1 — High-Impact Wins You Control Today** (with exact upgrade & verification commands)
- **Phase 2 — Client & Worker Runtime Upgrades**
- **Phase 3 — Secret Separation & Storage Hygiene**
- **Phase 4 — Vendor-Blocked Watchlist** (with a quarterly re-probe command — no hacky workarounds)
Keep capability and urgency separate. Prioritize using confidentiality lifetime, data sensitivity, capture exposure, regulatory obligations, and migration lead time. Use [NIST IR 8547](https://csrc.nist.gov/pubs/ir/8547/final) for current transition guidance and timelines.