---
title: ECC & Post-Quantum Migration Verification
pillar: security
estimated_cost: $0.00 (Read-Only)
protocols: tls1.3, ml-kem, ml-dsa, cbom, siwa
services: Patchbay, SIWA, Cloak
summary: Decide when post-quantum TLS or library upgrades are actually needed today, compare hosting-stack tradeoffs, inventory ECC dependencies (CycloneDX 1.6 CBOM), and apply verified regents defend fixes with before/after receipts.
---

## Objective

Separate real cryptographic migration from guesswork or urgency hype: understand whether your traffic actually faces Harvest Now, Decrypt Later (HNDL) risk today, map which dependencies rely on ECC or RSA vs. external L1/hardware rails, compare hosting-stack solutions honestly, and record verifiable before-and-after receipts.

## Do You Need This Today?

Classical 256-bit ECC (`P-256`, `secp256k1`, `X25519`, `Ed25519`) is not broken today. Use this three-tier rubric before touching production DNS or TLS:

- Fix now (P0): Broken classical primitives (`MD5`, `SHA-1`, `RC4`, `AES-ECB`, `DES`/`3DES`, `RSA-1024`), TLS 1.0/1.1, or PQ ClientHello middlebox drops (`pq_client_hello_intolerant`). These are exploitable today or break modern browsers and agents right now.
- Prepare soon (HNDL, multi-year confidentiality): Endpoints carrying private AI prompts, medical/financial/legal data, private messages, or long-lived secrets where traffic recorded today must stay confidential years from now. Enable hybrid `X25519MLKEM768` and enforce TLS 1.3 minimum on servers and high-sensitivity clients.
- Track & plan (no rush): Public pages, public read APIs, short-lived auth tokens/nonces expiring in minutes, and post-quantum X.509 leaf certificates (not yet issued by public WebPKI CAs). Keep TLS 1.3 clean, maintain a CBOM, and wait for clean platform support instead of rushing a risky proxy migration.

## Solution Options by Hosting Stack

- Managed PQ Edge Proxy (Cloudflare / Fastly): Fastest HNDL coverage if you already use Cloudflare or Fastly (`Full (strict)`, `X25519MLKEM768` enabled, optional Minimum TLS 1.3). Tradeoff: requires DNS cutover, adds a proxy hop in front of WebSockets/SSE, may need WAF tuning for agent CLIs, and the CDN terminates TLS (seeing plaintext at the edge).
- Self-Hosted Edge (OpenSSL 3.5+ / nginx / Envoy / HAProxy / Caddy): Upgrade container images to Debian Trixie (`OpenSSL 3.5+`), list `X25519MLKEM768` first in TLS 1.3 groups, and remove TLS 1.2 fallback where clients allow. Tradeoff: zero third-party MITM edge, but you own cert renewal, proxy tuning, and OpenSSL security patching.
- Wait on Managed PaaS Proxy (Fly.io / Render / Heroku): Best for public sites and short-lived-token APIs where fronting your origin with an external CDN adds more operational or privacy risk than HNDL value. Keep direct TLS 1.3 clean, confirm `pq_client_hello_tolerated` with `probe-crypto`, and upgrade app/container libraries (`OpenSSL 3.5+`, `cryptography >= 50.0.2`, OTP `28.1+`) while tracking PaaS edge support.
- Client-Side Guardrails (`rustls` + `aws-lc-rs` + TLS 1.3 Minimum): For CLIs, agents, and local gateways calling PQ-ready upstreams (such as confidential AI inference APIs), swap `ring` for `aws-lc-rs`, put `X25519MLKEM768` at slot 0 in `kx_groups`, enforce TLS 1.3 minimum, and fail closed (`require_pq`) so an active path attacker cannot downgrade the connection to TLS 1.2.

## Local Remediation with regents defend

Install `regents-cli >= 1.14.0` (`uv tool install 'regents-cli[browser,mcp]==1.14.0'`) to apply deterministic local fixes and emit clean-environment Repair Records (`regents.repair-record.v1`):

- `regents defend run cbom-p0-broken-primitives <source-file>`: Scan source code for P0 broken primitives (`MD5`, `SHA-1`, `RC4`, `AES-ECB`, `3DES`, `RSA-1024`) and emit a reproducible Repair Record.
- `regents defend run dockerfile-openssl35-pqc-runtime Dockerfile`: Upgrade legacy Debian/Ubuntu runtime stages to Debian Trixie (`OpenSSL 3.5+`).
- `regents defend run rustls-pq-kex-preference Cargo.toml`: Switch `rustls` from `ring` to `aws-lc-rs` for `X25519MLKEM768` support.
- `regents defend run tls-minimum-v13-config <tls-config-file>`: Remove TLS 1.0/1.1/1.2 downgrade paths in nginx, HAProxy, Caddy, or Elixir/Erlang `:ssl` config.
- `regents auth pq-enroll`: Enroll an additive FIPS 204 `ML-DSA-65` agent credential on SIWA v3 for hybrid post-quantum HTTP request authentication.

## Agent Prompt

```text
Run a Patchbay cryptographic readiness audit on our codebase and deployed endpoints:

1. Read our dependency lockfiles (`mix.lock`, `Cargo.lock`, `package-lock.json`, `uv.lock`, `go.mod`, or `composer.lock`) and call `patchbay_check_crypto` (or `POST https://regents.sh/api/v1/patchbay/security/check-crypto`) to inventory ECC/RSA dependencies and generate a CycloneDX 1.6 CBOM.
2. Separate `boundary: "app_owned"` items we can upgrade cleanly (such as `rustls` on `ring` -> `aws-lc-rs`, OpenSSL `< 3.5` -> Debian Trixie, Python `cryptography < 50` -> `>= 50.0.2`, or ECC-only auth tokens) from `external_chain` / `external_hardware` items that require operational limits or authority inventories.
3. For every public HTTPS endpoint we serve or call, run `patchbay_probe_crypto` (or `POST https://regents.sh/api/v1/patchbay/security/probe-crypto`) and inspect both technical checks and `guidance`:
   - Urgency tier (`fix_now`, `prepare_soon`, or `track_and_plan`): confirm whether this host carries multi-year secrets (HNDL) or public/ephemeral traffic before recommending an edge/CDN change.
   - Confidentiality: whether strict `X25519MLKEM768` / `SecP256r1MLKEM768` hybrid key exchange succeeds.
   - Compatibility & downgrade: whether a hybrid PQ ClientHello causes a middlebox drop (`pq_client_hello_intolerant`) and whether forced TLS 1.2 downgrade is accepted.
   - Authentication: what key and signature algorithm the leaf certificate actually uses.
4. For each finding with a `defend_recipe`, run the matching local `regents defend run <recipe> <target>` command when ready, save the `verification_digest` before and after each migration PR, and call `patchbay_diff_crypto` (`POST https://regents.sh/api/v1/patchbay/security/diff-crypto`) to emit a reproducible `receipt_digest`.
5. For any Safe treasury, proxy upgrade admin, or fleet contract, run `patchbay_check_authority` (`POST https://regents.sh/api/v1/patchbay/security/check-authority`) to separate mutable contract authority from immutable L1 `secp256k1` boundaries and verify unexposed rotation quorum.
```

## Included Checks

- `POST /api/v1/patchbay/security/probe-crypto` — Live SSRF-safe TLS handshake probe proving hybrid PQ KEM support, middlebox tolerance, forced TLS 1.2 downgrade resistance, leaf certificate signature posture, contextual urgency rubric, stack options, and matching `regents defend` recipes.
- `POST /api/v1/patchbay/security/check-crypto` — Multi-ecosystem lockfile cryptographic inventory, CycloneDX 1.6 CBOM generator, urgency tiering, and per-finding `regents defend` commands.
- `POST /api/v1/patchbay/security/diff-crypto` — Before/after migration diff receipt for lockfile CBOM audits and live TLS probe reports.
- `POST /api/v1/patchbay/security/check-authority` — On-chain Safe/treasury authority exposure inventory ("embedded firmware" check).
- `POST /api/v1/patchbay/security/check-stack` — Join runtime stack checks with live `cve.now` active criticals and CISA KEV advisories.
- `GET /patchbay/validate?tab=crypto` — Interactive browser diagnostics with the live 18-host Scoreboard, "Do I need this today?" urgency guide, hosting-stack tradeoff cards, CycloneDX 1.6 CBOM, Before/After Migration Diff, and Authority Exposure Inventory.
