Engineering
AI or Quantum Computing May Crack Encryption: How to Prepare and Become Cryptographically Agile
Cryptographic agility, or crypto-agility, is the ability to change the encryption your systems use without rebuilding those systems. If an algorithm is weakened tomorrow, an agile organisation changes a setting and rotates its keys. Everyone else starts a project.
It matters now for two reasons. Quantum computers are expected to break RSA and elliptic-curve cryptography, and regulators have set migration dates on that basis. Separately, AI systems have started producing serious mathematical results, including in cryptanalysis, so a weakness could arrive sooner and from a direction nobody planned for.
You cannot predict which algorithm fails or when. You can decide how long it takes you to respond. This guide has two parts. Part 1 covers what you need to identify: where your cryptography is, what to record about each use of it, and how to rank what you find. Part 2 covers becoming cryptographically agile: the engineering, supplier and governance changes that let you replace an algorithm quickly.
Part 1: What you need to identify
Step 1: Find your cryptography
You cannot change what you have not found, and most organisations have never listed where they use encryption. The output of this step is a cryptographic inventory, sometimes called a cryptographic bill of materials (CBOM): every place an algorithm, key or certificate is in use, and who owns it.
| Where to look | What you are looking for |
|---|---|
| Web and API traffic | TLS versions, cipher suites, certificate key types and sizes |
| Certificates | Issuer, algorithm, expiry, where each one is installed |
| Application code | Calls to crypto libraries, hard-coded algorithm names and key sizes |
| Data at rest | Database, disk and backup encryption, and where the keys live |
| Identity and access | SSO, tokens (JWT signing), SSH keys, VPNs |
| Code signing and updates | How software and firmware updates are signed and verified |
| Hardware | HSMs, smart cards, payment terminals, IoT and embedded devices |
| Third parties | Cloud services, SaaS, payment processors, banking connections |
For each entry in the inventory, record:
- Algorithm and key size, for example RSA-2048, ECDSA P-256 or AES-256.
- What it is used for: key exchange, encryption of stored data, signing, or authentication. Key exchange and signing are the uses at risk from factoring attacks.
- The data it protects and how long that data must stay confidential.
- Where the keys are held and how they are rotated today.
- The library, product or device that implements it, with its version.
- Who owns it: a named team internally, or the supplier.
- How it can be changed: by configuration, by software update, by code change, or only by replacing hardware.
- What depends on it: other systems, partners or customers that would have to change at the same time.
The last two fields are the ones most inventories leave out, and they decide how long a migration takes.
Use tools for the first pass: network scanners for TLS, certificate discovery, and static analysis over your codebases. Then ask the system owners, because scanners miss batch jobs, archives and anything a supplier runs for you.
Record the inventory somewhere it will be kept current. A spreadsheet done once is out of date within a quarter.
Step 2: Rank what you found
The inventory will be longer than you can fix at once, so score each entry on three questions.
- How long must the data stay secret? Customer records, health data, legal files and intellectual property may need protecting for ten years or more. An attacker can copy that traffic today and decrypt it when the algorithm falls. Session data that is worthless tomorrow is a lower priority.
- How exposed is it? Anything crossing the public internet comes before anything on an internal network.
- How hard is it to change? A web server setting takes minutes. A key burned into a device in the field may never change. The hard ones need the earliest start, even if the work finishes last.
Long-lived, exposed and hard to change goes to the top of the list. Also mark anything already weak, such as RSA below 2048 bits, SHA-1 or old TLS versions. Those need fixing now whatever happens next.
Part 2: Becoming cryptographically agile
Part 1 tells you what you have. The five steps in this part change how your systems are built and run, so that replacing an algorithm becomes a routine operation.
Step 3: Stop hard-coding algorithms
This is the engineering change that creates agility. Most systems are rigid because the algorithm choice is written into the application code, the data format or the hardware.
- Put cryptography behind one interface. Application code should ask a shared internal library to "encrypt this" or "sign this". It should never name RSA or AES itself. Changing the algorithm then means changing one library.
- Make the choice configuration. Algorithm, key size and mode should be settings that are deployed, with no code change and no rebuild.
- Label everything you encrypt or sign. Store an algorithm identifier and key version alongside each ciphertext and signature. Without it you cannot tell old data from new, and you cannot migrate in stages.
- Leave room for bigger keys. Post-quantum keys and signatures are much larger than today's. Fixed-size database columns, message fields and packet limits are where migrations break.
- Never write your own. Use maintained libraries such as OpenSSL, BoringSSL or your cloud provider's SDK, and keep them current. Most new algorithms will reach you as a library update.
Apply this to new systems immediately. Retrofit existing ones in the order set by Step 2.
Step 4: Automate keys and certificates
An organisation that renews certificates by hand once a year cannot replace all of them in a week. Rotation has to be routine before an emergency.
- Automate certificate issue and renewal. Use ACME or your cloud provider's certificate manager, and shorten certificate lifetimes so that renewal is exercised constantly.
- Manage keys centrally. Hold them in a key management service or HSM with rotation on a schedule. Keys in config files and code repositories are both a security problem and an agility problem.
- Plan re-encryption. Rotating a key protects new data. Decide in advance how stored data and backups get re-encrypted under a new algorithm, and how long that takes at your data volumes.
- Check your hardware. Ask whether each HSM, smart card and device can take new algorithms by firmware update. If it cannot, it needs a replacement date in the plan.
Step 5: Adopt the new algorithms, in hybrid first
NIST finalised its first post-quantum standards in August 2024. They are in the major libraries, browsers and cloud platforms now.
- ML-KEM (FIPS 203) for key exchange. This is the priority, because key exchange is what protects recorded traffic from being decrypted later.
- ML-DSA (FIPS 204) for digital signatures.
- SLH-DSA (FIPS 205), a hash-based signature scheme. It is slower and larger, and rests on more conservative mathematics.
Start with hybrid mode, which runs a classical algorithm and a post-quantum one together so that an attacker has to break both. The post-quantum schemes are newer and less tested than RSA, and hybrid covers you if one of them is weakened.
Do not standardise on a single mathematical family. If every system you run depends on lattice-based schemes, one result takes all of them out. Keep a hash-based option available for your most important signatures.
The UK's National Cyber Security Centre sets three target dates: discovery and an initial plan by 2028, the highest-priority migrations by 2031, and full migration by 2035. Treat those as the latest acceptable dates. They were set for the quantum threat and could be overtaken by events.
Step 6: Bring your suppliers with you
For most businesses, the larger part of their cryptography runs inside products and services bought from someone else. Your agility is limited by theirs.
Ask each significant supplier, in writing:
- Which cryptographic algorithms does your product use, and where?
- Do you support post-quantum or hybrid algorithms today? If not, when?
- Can algorithms be changed by configuration or update, without replacing the product?
- How quickly could you replace an algorithm that was found to be broken?
- Will you provide a cryptographic bill of materials?
Put the answers into procurement. New contracts and renewals should require support for the NIST post-quantum standards, a commitment to change algorithms within a stated period, and notice of any cryptographic change. A supplier with no answer to question 4 is a risk to record and manage.
Step 7: Prove it, and give it an owner
Agility that has never been tested is an assumption. Run a drill: pick one non-critical system, change its algorithm end to end, and time it. Include key rotation, re-encryption of stored data, and rollback. Whatever blocked you is your real to-do list.
Then make it permanent:
- Name an owner. One person accountable for cryptography across the organisation, with the inventory and the policy.
- Write a short policy. Approved algorithms and key sizes, banned ones, and the rule that new systems follow Step 3.
- Track three numbers. The share of systems inventoried, the share whose algorithm can be changed by configuration, and the time your last drill took.
- Enforce it in the pipeline. Add checks to code review and CI that reject banned algorithms and hard-coded keys.
- Repeat the drill yearly, on a more important system each time.
Where to start: the first 90 days
Days 1 to 30. Name the owner. Scan your public-facing TLS and your certificates. Retire anything already weak. Send the five questions to your ten most important suppliers.
Days 31 to 60. Extend the inventory to application code and data at rest. Score every entry using Step 2. Turn on hybrid post-quantum key exchange where your web servers, CDN and cloud provider already support it.
Days 61 to 90. Agree the policy. Start the shared crypto library for new development. Run the first drill on one low-risk system and write up what blocked you.
At the end of 90 days you will not be crypto-agile. You will know where you stand, the quick fixes will be done, and you will have a plan based on evidence.
Mistakes to avoid
- Treating it as a one-off migration. Moving from RSA to ML-KEM with the new algorithm hard-coded leaves you exactly as rigid as before.
- Waiting for certainty. The inventory and the interface work are the slow parts, and they are the same whichever algorithm fails first.
- Inventorying only what you run yourself. Supplier-run systems and stored backups are usually where the long-lived data sits.
- Forgetting stored data. Changing the algorithm for new traffic does nothing for ten years of archives encrypted the old way.
- Leaving it to the security team alone. The changes in Step 3 are software engineering work and need to be in the delivery roadmap.