Brief for my AI agent: Migrate a personal project with Aegis by qblackbit (Aegis Cloud) Source: https://docs.qblackbit.com/prompts/developer-project (version 1, 2026-12-04) GOAL Find every place this repository uses classical public-key cryptography (RSA, ECDSA, EdDSA, ECDH, X25519, Diffie-Hellman), and move the ones that should change to post-quantum algorithms through Aegis Cloud: signatures to ML-DSA-65 first, then encryption to a recipient to an ML-KEM based KEM. The classical path keeps working until the new one is verified. WHAT AEGIS IS Aegis is qblackbit's post-quantum cryptography platform. Aegis Cloud (Free and Pro, at https://aegis.qblackbit.com) holds an organisation's keys in Aegis Core and exposes key creation, signing, verification, key encapsulation and hashing through an HTTPS API, with ML-DSA (FIPS 204), ML-KEM (FIPS 203) and SLH-DSA (FIPS 205) and hybrids such as X25519 + ML-KEM-768. Aegis Core (Enterprise) runs the same engine and vault on the customer's own machines, air-gapped if needed, with no connection to qblackbit. Before you start, read https://docs.qblackbit.com/llms.txt and the pages it links to; https://docs.qblackbit.com/llms-full.txt has every page in one file. What is built and what is planned: https://docs.qblackbit.com/overview/status. WHAT YOU ARE WORKING WITH - The account is on Aegis Cloud Free unless I say Pro: 10,000 metered operations a month, 60 requests a minute, 10 keys, the algorithms ml-dsa-65 and x25519-ml-kem-768, and the hashes sha2-256, sha2-384, sha2-512, sha3-256 and sha3-512. Check with GET /api/v1/algorithms and GET /api/v1/usage instead of assuming. - Base URL https://aegis.qblackbit.com (I set AEGIS_URL to it). Every call sends Authorization: Bearer $AEGIS_API_KEY and JSON; binary fields are standard base64 with padding; a body carries at most 1 MiB of data. Errors are JSON {"error", "code"}. - Keys made in Aegis Cloud keep their private half in its vault: the project sends a message and gets a signature back. The cloud API encapsulates but does not decapsulate, and exporting a cloud key is not available yet: whoever must decapsulate makes and holds that key pair where they run. - TLS and SSH settings are not migrated through Aegis: they change in that software's own configuration (hybrid key exchange such as X25519MLKEM768 in TLS 1.3, or mlkem768x25519-sha256 in OpenSSH). CHOOSING ALGORITHMS: QBLACKBIT HYBRID PROFILES For each job (TLS, data at rest, archives, messaging, IoT, VPN, and signatures for code, firmware, documents, certificates, tokens or blockchains), pick the qblackbit hybrid profile at the level the data needs from https://docs.qblackbit.com/profiles/ and use exactly the algorithms and parameters its specification names, checked against its test vectors. Asking Aegis for a profile by name is Planned, so name the profile in your plan and the algorithms in the calls. If the catalogue is not published yet, use the algorithms this brief names, and say which profile you would have picked once it is. STEPS (stop after each step that changes something and wait for my approval) 1. Inventory without changing anything. Search the code, configuration, CI files, Dockerfiles, infrastructure files and dependency manifests for classical public-key use, for example: RSA, ECDSA, Ed25519, X25519, ECDH, secp256k1, P-256, prime256v1, RS256, ES256, EdDSA, generateKeyPair, KeyPairGenerator, createSign, crypto/rsa, crypto/ecdsa, cryptography.hazmat, openssl genrsa, openssl ecparam, ssh-keygen, BEGIN RSA PRIVATE KEY, BEGIN EC PRIVATE KEY, BEGIN PRIVATE KEY, jwt, jose, tls. For each hit record the file and line, the algorithm, the purpose (signing, verification, key exchange, encryption, TLS or SSH configuration), where the key lives, and who verifies or decrypts. 2. Classify each finding: (a) signatures this project makes, such as release, token or webhook signing, which move to an ML-DSA-65 key in Aegis Cloud; (b) data encrypted to a recipient's public key, which moves to an ML-KEM based KEM, the recipient holding the private key; (c) protocol settings such as TLS or SSH, which change in that software's configuration, not through Aegis; (d) code the project does not own, which you list and leave. Show me the table and wait for my decisions. 3. Check the account: GET /api/v1/algorithms for what the plan allows and GET /api/v1/usage for what is left this month. If the plan lacks an algorithm the change needs, stop and tell me. 4. After I approve the plan, create one signing key per purpose: POST /api/v1/keys with {"name": "release-signing", "algorithm": "ml-dsa-65"}. Keep key names in configuration, not in code. 5. Add one small client module that uses the language's standard HTTP client (no new dependency unless I agree). Sign with POST /api/v1/keys/{name}/sign and {"message": }, which returns {"version", "signature"}; verify with POST /api/v1/keys/{name}/verify and {"message", "signature", "version"}, which returns {"valid": true or false}; fetch a public key with GET /api/v1/keys/{name}/public. Read AEGIS_URL and AEGIS_API_KEY from the environment. Handle the error codes quota, rate_limited, unavailable, invalid and not_found explicitly. 6. Sign twice during the transition: keep producing the classical signature, add the ML-DSA-65 signature beside it, and accept either while verifiers move. Record which one verified. 7. For encryption to a recipient, the recipient makes the KEM key pair where they will decapsulate and gives you the public key. Encapsulate with POST /api/v1/encapsulate and {"algorithm": , "public_key": }, which returns ciphertext and shared_secret. Prefer ml-kem-768 (Pro). On Free the only KEM is x25519-ml-kem-768, the TLS 1.3 hybrid group, which relies on the TLS transcript: outside TLS, derive the data key with HKDF-SHA-256 over shared_secret with the ciphertext and the recipient's public key in the info, as HPKE does. Send the ciphertext with the data; never log shared_secret. Ask me before building this step. 8. Write tests: sign then verify returns {"valid": true}; a changed message or signature returns {"valid": false}; the classical path still passes. Run tests that call the live API only after I agree, because each call is metered. HOW TO VERIFY SUCCESS - The inventory table lists every hit with its class and my decision. - GET /api/v1/keys lists each new key with the algorithm we agreed. - The tests show a valid round trip, a refused tampered message, and the classical path unchanged. - GET /api/v1/usage accounts for the operations the tests used, and quota and rate_limited answers are handled in code. - No API key, private key, shared secret or token appears in the code, logs, test output or git history (search for agk_). SAFETY RULES (follow every one) - Never ask me to paste a secret into this chat, and never print, log or commit one: API keys, tokens, passwords, private keys, passphrases, unseal shares, shared secrets. Read each from an environment variable or a file that I set up myself. - Show me every change as a diff and apply nothing until I approve it. Do not push, deploy or publish anything. - Keep the classical algorithms working beside the post-quantum ones until the new path is verified in tests and then in production. Never delete, disable or rotate away an existing key, certificate or setting in this task. - Use only the endpoints, commands and options written in the qblackbit docs (llms.txt). If something you need is marked Planned, or you cannot find it there, stop and tell me; never invent an endpoint, package, flag or algorithm name. - In anything you write, name the standard algorithm that protects each thing (for example ML-DSA-65, FIPS 204). Never call anything quantum-proof, and never claim a certification or an audit. - Use an API key made for this task: in the Aegis Cloud app, under API keys, an admin makes one with the developer role (auditor if the task only reads), labelled for this task. I put it in the environment variable AEGIS_API_KEY. Cloud API keys do not expire on their own yet (expiring keys are Planned), so tell me to revoke it in the app as soon as we finish. - Call the API only from server-side code, scripts or your own tools, never from a web page or a mobile app, where the key would be exposed. - Every create, sign, verify, encapsulate and hash call is metered against the plan's monthly operations. Ask me before any loop, batch or load test, and never retry blindly: on rate_limited wait, on quota stop and tell me. NOT AVAILABLE YET (do not try to use these) - Official SDKs for TypeScript, Python, Go, Java, .NET, Rust and C are Planned: call the HTTPS API directly. - Asking for a policy name such as qbb-hybrid-1 instead of an algorithm is Planned. - Expiring cloud API keys are Planned: revoke the task's key when done. - Exporting a cloud key wrapped to your own key is not available yet, and the cloud API does not decapsulate. WHEN YOU FINISH Report what you found (as a table), each change you made with my approval, how you verified it, and what is left, including anything that waits for a planned feature. Remind me to revoke the credential you used.