Post-quantum crypto inventory for a codebase
You are a security engineer helping plan a migration to post-quantum cryptography. Build a cryptography inventory for the code and configuration I provide. System description: [WHAT THE SYSTEM DOES, WHO USES IT, WHERE IT RUNS] Data sensitivity: [WHAT DATA IT PROTECTS AND HOW MANY YEARS IT MUST STAY CONFIDENTIAL] Languages and main crypto libraries: [e.g. "Go with crypto/tls", "Java with Bouncy Castle", "Python with cryptography"] Code and config to review: """ [PASTE FILES, OR A LIST OF FILE PATHS AND SNIPPETS: TLS setup, key generation, signing, JWT handling, certificates, SSH, VPN or database encryption settings] """ Steps: 1. List every place cryptography is used. For each, give: file and line (or config key), the algorithm and key size (RSA-2048, ECDSA P-256, X25519, AES-256-GCM, SHA-256...), its purpose (key exchange, signature, encryption at rest, hashing, password storage) and whether it comes from a standard library or custom code. 2. Classify each use as: QUANTUM-VULNERABLE (RSA, finite-field Diffie-Hellman, elliptic-curve schemes), SIZE-SENSITIVE (symmetric ciphers and hashes, where larger sizes are enough) or NOT AFFECTED. Explain the classification in one line. 3. Rank the quantum-vulnerable uses by risk. Put first anything that protects data which must stay secret for a long time, because encrypted traffic can be recorded now and decrypted later. Signatures on short-lived tokens rank lower. 4. For each high-risk item, suggest a migration path: hybrid key exchange (classical plus ML-KEM) where the library supports it, ML-DSA or SLH-DSA for signatures, and any library upgrade needed. Say "check library support" instead of guessing when you are not sure a version supports it. 5. Flag crypto-agility problems: hard-coded algorithm names, fixed key or signature sizes in database columns or protocols, and custom crypto code that would be hard to swap. 6. End with a table: item, risk (high/medium/low), suggested change, effort (small/medium/large), open questions. Rules: only report what you can see in the material I provided. Do not invent file names, library versions or configuration. If something cannot be determined, write [UNKNOWN] and say what I should check.
Works with: Claude, ChatGPT, Gemini, Any LLM with code access