external/anthropic-cybersecurity-skills/skills/performing-post-quantum-cryptography-migration/SKILL.md
Assesses organizational readiness for post-quantum cryptography migration per NIST FIPS 203/204/205 standards. Performs cryptographic inventory scanning to identify quantum-vulnerable algorithms (RSA, ECDH, ECDSA), evaluates hybrid TLS configurations with X25519MLKEM768, and validates CRYSTALS-Kyber (ML-KEM) and CRYSTALS-Dilithium (ML-DSA) readiness. Implements crypto-agility assessment using oqs-provider for OpenSSL. Use when planning or executing the transition from classical to post-quantum cryptographic algorithms across enterprise infrastructure.
npx skillsauth add seikaikyo/dash-skills performing-post-quantum-cryptography-migrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
cryptography, requests, pyOpenSSL librariesNIST published three finalized PQC standards on August 13, 2024:
| Standard | Algorithm | Renamed To | Purpose | Based On | |----------|-----------|------------|---------|----------| | FIPS 203 | CRYSTALS-Kyber | ML-KEM | Key Encapsulation Mechanism | Module lattice | | FIPS 204 | CRYSTALS-Dilithium | ML-DSA | Digital Signatures | Module lattice | | FIPS 205 | SPHINCS+ | SLH-DSA | Digital Signatures (backup) | Stateless hash |
ML-KEM (FIPS 203) -- Primary standard for key exchange and encryption. Replaces RSA and ECDH for key establishment. Three security levels: ML-KEM-512, ML-KEM-768, ML-KEM-1024.
ML-DSA (FIPS 204) -- Primary standard for digital signatures. Replaces RSA and ECDSA for signing. Three security levels: ML-DSA-44, ML-DSA-65, ML-DSA-87.
SLH-DSA (FIPS 205) -- Backup signature standard using hash-based approach. Intended as fallback if lattice-based ML-DSA is found vulnerable. Larger signatures but conservative security assumptions.
These classical algorithms are vulnerable to quantum attack via Shor's algorithm:
| Algorithm | Usage | Quantum Threat | Migration Priority | |-----------|-------|---------------|-------------------| | RSA-2048/4096 | Key exchange, signatures, encryption | Shor's algorithm breaks factoring | Critical | | ECDH (P-256, P-384) | TLS key exchange | Shor's algorithm breaks ECDLP | Critical | | ECDSA | Code signing, TLS certificates | Shor's algorithm breaks ECDLP | Critical | | DSA | Legacy signatures | Shor's algorithm breaks DLP | Critical | | DH (Diffie-Hellman) | Key exchange | Shor's algorithm breaks DLP | Critical | | AES-128 | Symmetric encryption | Grover's halves key strength | Medium (upgrade to AES-256) | | SHA-256 | Hashing | Grover's reduces to 128-bit | Low (still adequate) |
During the transition period, hybrid key exchange combines a classical algorithm with a post-quantum algorithm. If either algorithm is secure, the connection remains protected.
Hybrid Key Exchange: X25519MLKEM768
= X25519 (classical ECDH) + ML-KEM-768 (post-quantum)
Client Hello:
supported_groups: X25519MLKEM768, X25519, secp256r1
key_share: X25519MLKEM768
Server Hello:
selected_group: X25519MLKEM768
key_share: X25519MLKEM768
Shared Secret = KDF(X25519_shared || MLKEM768_shared)
The first step in PQC migration is discovering all cryptographic algorithm usage across the enterprise. This includes TLS configurations, certificates, code libraries, key stores, and protocol configurations.
# Scan TLS endpoints for quantum-vulnerable algorithms
python scripts/agent.py --action scan_tls \
--targets targets.txt \
--output tls_inventory.json
The scanner identifies:
Evaluate the organization's ability to swap cryptographic algorithms without major infrastructure changes:
# Assess crypto-agility readiness
python scripts/agent.py --action assess_agility \
--scan-results tls_inventory.json \
--output agility_report.json
Key assessment areas:
Test whether infrastructure supports hybrid key exchange with X25519MLKEM768:
# Test hybrid TLS support on target servers
python scripts/agent.py --action test_hybrid_tls \
--target server.example.com:443 \
--output hybrid_tls_report.json
OpenSSL 3.5+ (native ML-KEM support):
# Test with native PQC support
openssl s_client -connect server.example.com:443 \
-groups X25519MLKEM768
OpenSSL 3.0-3.4 with oqs-provider:
# Configure oqs-provider
# /etc/ssl/openssl-oqs.cnf
[openssl_init]
providers = provider_sect
[provider_sect]
default = default_sect
oqsprovider = oqsprovider_sect
[default_sect]
activate = 1
[oqsprovider_sect]
activate = 1
module = /usr/lib/oqs-provider/oqsprovider.so
# Test hybrid TLS
OPENSSL_CONF=/etc/ssl/openssl-oqs.cnf \
openssl s_client -connect server.example.com:443 \
-groups x25519_mlkem768
Web Server Configuration for Hybrid TLS:
Apache httpd:
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
SSLOpenSSLConfCmd Curves X25519MLKEM768:X25519:prime256v1
SSLProtocol -all +TLSv1.2 +TLSv1.3
NGINX:
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
Validate that ML-KEM (CRYSTALS-Kyber) key encapsulation works correctly in your environment:
# Test ML-KEM key encapsulation at all security levels
python scripts/agent.py --action test_mlkem \
--output mlkem_validation.json
ML-KEM parameter comparison:
| Parameter | ML-KEM-512 | ML-KEM-768 | ML-KEM-1024 | |-----------|-----------|-----------|------------| | Security Level | NIST Level 1 | NIST Level 3 | NIST Level 5 | | Public Key Size | 800 bytes | 1,184 bytes | 1,568 bytes | | Ciphertext Size | 768 bytes | 1,088 bytes | 1,568 bytes | | Shared Secret | 32 bytes | 32 bytes | 32 bytes | | Comparable To | AES-128 | AES-192 | AES-256 |
Validate ML-DSA (CRYSTALS-Dilithium) signature operations:
# Test ML-DSA digital signatures
python scripts/agent.py --action test_mldsa \
--output mldsa_validation.json
ML-DSA parameter comparison:
| Parameter | ML-DSA-44 | ML-DSA-65 | ML-DSA-87 | |-----------|----------|----------|----------| | Security Level | NIST Level 2 | NIST Level 3 | NIST Level 5 | | Public Key Size | 1,312 bytes | 1,952 bytes | 2,592 bytes | | Signature Size | 2,420 bytes | 3,293 bytes | 4,595 bytes | | Secret Key Size | 2,560 bytes | 4,032 bytes | 4,896 bytes |
Generate a prioritized migration roadmap based on inventory and assessment results:
# Generate complete migration roadmap
python scripts/agent.py --action roadmap \
--scan-results tls_inventory.json \
--agility-results agility_report.json \
--output migration_roadmap.json
The roadmap prioritizes systems by:
# Step 1: Scan all TLS endpoints
python scripts/agent.py --action scan_tls --targets hosts.txt --output scan.json
# Step 2: Assess crypto-agility
python scripts/agent.py --action assess_agility --scan-results scan.json --output agility.json
# Step 3: Test hybrid TLS on critical servers
python scripts/agent.py --action test_hybrid_tls --target critical.example.com:443
# Step 4: Validate ML-KEM support
python scripts/agent.py --action test_mlkem --output mlkem.json
# Step 5: Validate ML-DSA support
python scripts/agent.py --action test_mldsa --output mldsa.json
# Step 6: Generate migration roadmap
python scripts/agent.py --action roadmap --scan-results scan.json --agility-results agility.json --output roadmap.json
# Single server PQC readiness check
python scripts/agent.py --action scan_tls --target server.example.com:443
development
拋棄式 HTML mockup 比稿:產出 2 到 3 個設計立場不同的變體(密度 / 版式 / 強調軸,不是換色),各附取捨說明,最後給有立場的對比結論。適用:「畫個草圖」「比較 A 版 B 版」「先看方向再做」「給我看幾種做法」。要 production 元件或設計已定案時不適用。
tools
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
testing
Reference for writing and editing agent skills well — the vocabulary and principles that make a skill predictable. Consult when authoring, reviewing, or pruning a SKILL.md.