Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Post-quantum cryptography standards are arriving (recent JDKs add ML-KEM and ML-DSA). How would you prepare a large Java estate for a change of cryptographic algorithms over the next decade?

Preparing for post-quantum cryptography is mainly an inventory and agility problem. We find where cryptography is used, in TLS, tokens, stored data, signatures and third-party libraries, move algorithm choices into configuration and central libraries instead of code spread across services, and prioritise data that must stay confidential for many years, because traffic recorded today could be decrypted later. We track support in the JDK (which added ML-KEM and ML-DSA in Java 24, so Java 25 LTS has them), TLS libraries and identity providers, test hybrid approaches, and run it as a multi-year programme with owners and milestones.

Why this question is asked

A large enough quantum computer would break RSA and elliptic-curve cryptography, which protect almost every TLS connection, JWT and signed artifact we have. Nobody knows exactly when such a machine will exist, but standards are now published (NIST's FIPS 203 for ML-KEM and FIPS 204 for ML-DSA in 2024) and governments have set migration deadlines in the 2030s. Interviewers ask this leadership question to see whether we can plan a decade-long change calmly and in the right order. In this answer, we will recap what changes and why, then cover the inventory, crypto agility, prioritisation by data lifetime, tracking ecosystem support with hybrid approaches, and the programme structure.

1A Quick Recap: What Quantum Computers Change

Public-key cryptography rests on problems that are hard for classical computers: factoring large numbers for RSA and discrete logarithms for elliptic curves (ECDH, ECDSA, EdDSA). Shor's algorithm on a large quantum computer solves both efficiently, so key exchange and signatures based on them would fall. Symmetric cryptography is affected much less: Grover's algorithm roughly halves the effective strength, so AES-256 and SHA-256 or larger remain fine.

The replacements are new families of algorithms. ML-KEM (formerly Kyber) is a key encapsulation mechanism for agreeing on keys, replacing ECDH in TLS. ML-DSA (formerly Dilithium) is a signature scheme replacing RSA and ECDSA signatures. Java 24 added both (JEP 496 and JEP 497), so they are available in Java 25 LTS through the standard KEM and Signature APIs.

Java
// Java 24 and later: ML-DSA through the ordinary Signature API
KeyPair kp = KeyPairGenerator.getInstance("ML-DSA").generateKeyPair(); // defaults to ML-DSA-65
Signature s = Signature.getInstance("ML-DSA");
s.initSign(kp.getPrivate());
s.update(doc);
byte[] sig = s.sign();
System.out.println(sig.length); // 3309 bytes, versus 64 for Ed25519

Notice the size. Post-quantum keys and signatures are much larger than today's, which affects certificate chains, JWT sizes, HTTP headers and database columns. That alone is a reason to test early.

2Inventory: Where Is Our Cryptography?

We cannot migrate what we cannot find, and in a large estate cryptography is everywhere. TLS on every endpoint and client, including Kafka, databases and internal calls. Tokens: JWTs signed with RS256 or ES256, SAML assertions, OAuth client authentication. Stored data: field encryption, key wrapping, backups. Signatures on artifacts, container images, documents and webhooks. And the hidden layer: third-party libraries, SDKs, HSMs, vendor products and hardware devices that choose algorithms for us.

The output is a cryptographic inventory (sometimes called a CBOM, a cryptography bill of materials): for each use, the algorithm, key size, library, owner, data sensitivity and how long that data must stay protected. Static analysis for getInstance calls, TLS scans of endpoints and vendor questionnaires all feed it.

3Building Crypto Agility

The biggest risk is not the new algorithms; it is that our current ones are hard-coded in hundreds of places. Crypto agility means an algorithm change is a configuration change in a central place rather than a code change in 300 services. In practice: a platform crypto library (or Google Tink) that services call for encrypt, sign and verify, with algorithms chosen by policy; TLS settings, such as named groups and signature schemes, managed by the platform starter or mesh; tokens with an algorithm header and key ids so verifiers can accept old and new during transition; and stored data formats that record the algorithm and key id with each ciphertext.

This work pays off even if quantum computers arrive late, because the same agility lets us respond in days when a classical algorithm or library is broken.

Step throughWhere algorithm choices should live
  1. Policyapproved algorithms and deadlines, owned centrally
  2. Platform crypto library and startersencrypt, sign, TLS settings from policy
  3. Servicescall the library, never name algorithms
  4. Data formats and tokensrecord algorithm and key id with each value

4 layers, from the top down. Step through them one at a time.

4Prioritising by How Long Data Must Stay Secret

The most urgent threat is "harvest now, decrypt later": an attacker records encrypted traffic today and decrypts it when a quantum computer is available. That only matters for data that will still be sensitive then. Health records, national IDs and long-term contracts may need protection for 20 years or more; a session token that expires in 15 minutes does not.

So key exchange for long-lived sensitive data comes first, because it is vulnerable to recording now. Signatures come later: a forged signature only matters once the quantum computer exists, so signatures can migrate on a slower schedule, except for long-lived roots of trust such as firmware signing keys and root CAs, which take years to replace and should be planned early.

Rough priority order
UseThreatPriority
TLS key exchange for long-lived sensitive dataHarvest now, decrypt laterFirst
Encrypted archives with RSA-wrapped keysHarvest now, decrypt laterFirst
Root CAs, firmware and code-signing rootsLong replacement cyclesPlan early
JWT and API signaturesForgery only after quantumLater
Symmetric encryption (AES-256)Only mildly weakenedKeep, check key sizes

5Tracking Support and Testing Hybrids

We depend on the ecosystem: the JDK, TLS libraries, browsers, load balancers, cloud KMS, HSMs and identity providers. Major browsers and CDNs already negotiate hybrid key exchange such as X25519MLKEM768, which combines a classical and a post-quantum algorithm so the connection is safe if either one holds. Check your JDK version for TLS hybrid key exchange support, since it arrives later than the raw algorithms; until then, TLS termination at proxies or gateways that support it can protect external traffic.

We run tests in a lab environment: larger handshakes through our load balancers and middleboxes, bigger certificates and JWTs in headers, and performance at our traffic levels. Some middleboxes break on large TLS ClientHello messages, and it is better to learn that in a test than in an outage.

6Running It as a Multi-Year Programme

This is a decade-scale change, so it needs the structure of one: an executive sponsor, a small central team owning policy, the crypto library and the inventory, and owners for each system. Milestones might be: year one, inventory complete and crypto agility in the platform; years two and three, hybrid key exchange on external and long-lived-data paths; then signatures, PKI and the long tail, aligned with regulatory deadlines in the early to mid 2030s. Progress is reported as the share of inventory entries on approved algorithms, by priority.

7Follow-up questions

Should we switch everything to ML-KEM and ML-DSA now?

Not everything at once. The standards are new, implementations are still maturing, and ecosystem support is uneven. Hybrid key exchange for sensitive long-lived data is the sensible first step; broad replacement follows as libraries, identity providers and HSMs support the new algorithms.

Does AES need to change?

Not fundamentally. Grover's algorithm roughly halves effective strength, so AES-128 drops to about 64 bits of quantum work, which is why many guidelines prefer AES-256 for long-term data. The main work is in public-key algorithms.

8Conclusion

In this answer, we planned a post-quantum migration for a large Java estate. We inventory cryptography across TLS, tokens, stored data, signatures and third-party libraries, build crypto agility so algorithms are chosen by configuration and central libraries, prioritise data that must stay confidential for many years because of harvest-now-decrypt-later, track support in the JDK, which has ML-KEM and ML-DSA since Java 24, and in TLS libraries and identity providers while testing hybrids, and run it as a multi-year programme with owners and milestones.

What to say in the interviewAbout 100 seconds aloud

Open with

I would treat this as an inventory and agility programme first and an algorithm change second. Quantum computers would break RSA and elliptic-curve cryptography, so key exchange and signatures are what change; AES-256 and SHA-256 are fine.

Then, if they want more

The new standards are ML-KEM for key exchange and ML-DSA for signatures, and the JDK added both in Java 24, so Java 25 LTS has them through the normal APIs.

Step one is finding our cryptography: TLS everywhere including Kafka and databases, JWT signing, field encryption and key wrapping, artifact signing, and all the libraries and vendor products that choose algorithms for us, recorded with owners and how long the data must stay secret. Step two is crypto agility, because the real risk is algorithms hard-coded across hundreds of services.

Services should call a central library or Tink, TLS settings come from the platform, and tokens and stored data record their algorithm and key id. Then I prioritise by data lifetime.

Harvest now, decrypt later means traffic carrying data that must stay secret for twenty years is already at risk, so hybrid key exchange like X25519 with ML-KEM goes first on those paths, while short-lived token signatures can wait.

I would track support in the JDK, TLS libraries, load balancers, HSMs and identity providers, and test larger handshakes and signatures in a lab. Finally, I run it as a multi-year programme with a sponsor, owners and milestones aligned with regulatory deadlines.

About this answer

Last updated
12 November 2026
Versions it names
Java 24, Java 25
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Spring Security reference
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Post-quantum cryptography standards are arriving (recent JDKs add ML-KEM and ML-DSA)....": https://scrivio-interview-library.netlify.app/spring-boot/secrets-and-crypto/229b52ff44/