Cryptography, key management and the post-quantum transition
Modern cryptography rarely fails at the algorithm. It fails at the key, and it is now on a clock: the standards and the migration deadlines that replace today's public-key cryptography are already fixed in published guidance, running to 2035.
By the end of this module you will be able to:
- Choose between symmetric, asymmetric and hashing primitives for a described job, and name the failure mode of each
- Explain the roles of a KMS and an HSM and walk through the NIST SP 800-57 key lifecycle from generation to destruction
- State the post-quantum standards and both the NIST and NCSC migration timelines from memory
- Run the harvest-now-decrypt-later argument for a non-technical audience
- Place data loss prevention and tokenisation correctly among the data-protection controls
Hybrid post-quantum key agreement went from draft to majority web traffic in about eighteen months
Post-quantum cryptography is often discussed as a problem for the 2030s. The web did not wait. In 2024, Google Chrome enabled a hybrid post-quantum key agreement, X25519MLKEM768, by default on the desktop, from Chrome version 124 in April 2024. Mozilla Firefox followed with default support in version 132 later in 2024. The hybrid design pairs the established X25519 elliptic-curve exchange with the new ML-KEM lattice scheme, so a connection stays at least as strong as today even if one half is later broken.
The effect showed up in real traffic quickly. Cloudflare reported that by the last week of October 2025, more than half of the human-initiated HTTPS traffic it saw was already protected against harvest-now-decrypt-later using post-quantum key agreement. No user changed a setting and no site operator ran a migration project. The browsers and the network shipped it as a default.
That is the honest shape of this transition. The parts an organisation does not control, the browser and the content-delivery edge, can move in months. The parts it does control, its own servers, long-lived secrets, embedded devices and vendor software, are exactly the parts a deadline-driven migration plan has to reach. This module is about that second, slower half.
1. Cryptography as applied trust
It is worth restating the foundations one level deeper before adding key management on top. Cryptography gives you three families of primitive, and each is a contract with a specific promise and a specific failure mode. It is not magic, and treating it as magic is where most real-world mistakes start.
Symmetric encryption uses one shared secret to both encrypt and decrypt. It is fast and is what protects bulk data: AES in an authenticated mode such as AES-GCM is the workhorse. Its contract is simple and brittle: confidentiality holds only while the single key stays secret and the nonce is never reused with the same key. Reuse a nonce and you can leak the plaintext relationship between two messages without anyone breaking AES at all.
Asymmetric, or public-key, cryptography uses a mathematically linked key pair: a public key anyone may hold and a private key only the owner holds. It solves the two problems symmetric ciphers cannot: agreeing a key with someone you have never met (key exchange) and proving who sent something (digital signatures). RSA and elliptic-curve schemes such as ECDSA and X25519 are the common examples. Their contract rests on a hard mathematical problem, factoring or discrete logarithms, and this is precisely the contract a large quantum computer would one day void. That is the thread this module pulls on later.
Hashing is one-way. A hash such as SHA-256 turns any input into a fixed-length fingerprint that cannot be reversed and that changes completely if a single bit of input changes. Its contract is collision resistance: it should be infeasible to find two inputs with the same fingerprint. That contract expires when an algorithm is broken, which is why MD5 and SHA-1 are now banned for security use. Hashing protects integrity and stores passwords; it does not protect confidentiality, and a plain hash on its own proves nothing about who produced it, which is why keyed constructions such as HMAC exist.
Hold on to one line from this section: choosing the primitive is the easy part, and the primitive is almost never what breaks. What breaks is the handling of the key.
2. Keys are the crown jewels
A key is not a static secret you set once. It has a life, and every stage of that life is a place custody can be lost. NIST SP 800-57 sets out the cryptographic key lifecycle as six stages: generate, distribute, use, rotate, revoke and destroy. A key is generated from a good source of randomness, distributed to the parties that need it without ever travelling in the clear, used under least privilege with its use logged, rotated on a schedule and on events such as staff departures, revoked the moment compromise is suspected, and destroyed by zeroising every copy when it is retired.
Two systems carry this work. A centralises the handling of keys so that applications never hold raw key material themselves; it generates, stores, distributes and retires keys and enforces policy over who may use which key for what. A is tamper-resistant hardware that performs cryptographic operations inside its own boundary, so the private key is created and used but never leaves the device in readable form. A cloud KMS is typically backed by HSMs; the KMS is the policy and lifecycle layer, the HSM is the vault that the most sensitive keys never leave.
How do you know an HSM actually protects what it claims to? That is what validation answers. It is the US and Canadian standard, aligned with ISO/IEC 19790, for the security of cryptographic modules, with four ascending levels from basic (Level 1) to strong physical tamper response and environmental protection (Level 4). Buying a module validated to a stated level, rather than one merely described as secure, is how a procurement decision becomes an evidenced one.
, replacing a key with a fresh one on a defined schedule and after any suspected exposure, limits the blast radius of a compromise: a key that is rotated every ninety days can only ever decrypt ninety days of data if it leaks. The deeper point of this whole section is a design warning. Cryptography fails at custody far more often than at mathematics. Hard-coded keys in source code, private keys emailed between teams, a single master key that is never rotated, expired certificates that take a site down: these are the incidents that actually happen, and none of them is an algorithm being broken.
Common misconception
“Once data is encrypted with a strong algorithm, it is safe.”
Encryption moves the problem from protecting the data to protecting the key. A strong cipher with a badly managed key is no protection at all: if the key is hard-coded in the application, stored beside the ciphertext, never rotated, or shared over insecure channels, an attacker who reaches the key reads everything. This is why standards such as NIST SP 800-57 spend far more effort on the key lifecycle than on algorithm selection, and why key custody design, not cipher choice, is the right place to focus a review.
3. Data controls beyond encryption
Encryption is not the only data control, and it is not always the right one. Two others belong in every practitioner's vocabulary, and the most important idea in this section is that sometimes the correct control is to not hold the data in the first place.
is egress policy. A DLP system inspects data in motion and at rest against rules that describe what sensitive data looks like, a card number pattern, a document marked confidential, a block of personal records, and then monitors, alerts on or blocks that data leaving through email, uploads, removable media or messaging. DLP does not make data secret; it enforces where data is allowed to go. It is how an organisation turns a data-handling policy from a document into an enforced control, and it is exactly the control whose absence turns a small mistake into a reportable breach.
replaces a sensitive value with a non-sensitive substitute, a token, that has no mathematical relationship to the original and is worthless if stolen. The real value lives in a separate, heavily guarded token vault; everywhere else holds only tokens. This differs from encryption in a decisive way: encrypted data can be decrypted by anyone who obtains the key, whereas a token cannot be reversed at all without access to the vault. For stored payment-card data this is the standard move, because it takes most systems out of scope for the strict handling rules of PCI DSS. The systems that only ever see tokens are no longer holding card data, so the compliance and breach burden shrinks with them.
Read those two together and the design lesson lands. Encryption protects data you must hold. Tokenisation and data minimisation remove the data from most of your estate so that there is far less to protect. The most secure record is the one you never stored, and the second most secure is the one that exists only as a token pointing at a vault someone else is paid to guard.
4. The post-quantum transition, with dates
A large, fault-tolerant quantum computer would break the hard problems that RSA and elliptic-curve cryptography rely on. None exists today. The reason to act now is not that the machine is here; it is that the migration is slow and the data has a long memory. This is the argument, and it is the single line to give a non-technical audience: an adversary can record your encrypted traffic today, store it cheaply, and decrypt it years later once the machine exists. Any data whose sensitivity outlives the arrival of quantum computing, medical records, state secrets, long-term contracts, is effectively at risk from the moment it is sent, not from the moment the machine is switched on.
The replacements are no longer research. On 13 August 2024, NIST finalised the first three post-quantum standards. FIPS 203 defines , a key-encapsulation mechanism for agreeing keys, derived from the CRYSTALS-Kyber submission. FIPS 204 defines , a digital-signature algorithm derived from CRYSTALS-Dilithium. FIPS 205 defines SLH-DSA, a hash-based signature scheme that rests on different mathematics again, so that a break in one family does not take signatures down with it. On 11 March 2025, NIST selected HQC as a fifth algorithm, a backup key-encapsulation mechanism built on error-correcting codes rather than lattices; its draft standard is expected in 2026 and a final around 2027.
Two timelines turn those standards into deadlines. NIST IR 8547 sets the cryptographic-agility schedule: classical public-key algorithms at the 112-bit security strength are to be deprecated by 2030, and quantum-vulnerable algorithms are to be disallowed after 2035. The NCSC, in its post-quantum migration guidance, frames the same journey for organisations as three milestones: define your goals and complete a full discovery exercise with an initial plan by 2028, complete your highest-priority migrations by 2031, and complete migration of all systems, services and products by 2035. The two tracks agree on the destination and the year.
Proof that this is motion, not paperwork, is already in your browser. The hybrid X25519MLKEM768 key agreement from the opening story is the migration made concrete: a design that adds ML-KEM alongside the classical exchange so that traffic gains post-quantum protection now, while the classical half continues to guarantee at least today's security if the new scheme were ever found wanting. That belt-and-braces hybrid approach is how a careful transition is supposed to look.
“Complete migration to PQC of all your systems, services and products”
NCSC, Post-quantum cryptography migration timelines - 2035 milestone
The NCSC states the end date plainly. The migration is not framed as advisory; 2035 is the year by which every system an organisation runs is expected to be off quantum-vulnerable cryptography.
Common misconception
“Quantum risk is either pure speculation or a threat that is already breaking encryption today.”
Both extremes are wrong, and the module argues it both ways on purpose. No quantum computer can break RSA-2048 today, so panic about broken encryption is misplaced. But harvest-now-decrypt-later makes migration genuinely urgent for long-lived data, and the deadlines are fixed, not hypothetical: NIST IR 8547 deprecates 112-bit classical public-key cryptography by 2030 and disallows quantum-vulnerable algorithms after 2035, while the NCSC expects discovery and a plan by 2028, priority migrations by 2031 and completion by 2035. The correct posture is neither alarm nor dismissal; it is a dated migration plan.
5. Your migration inventory
The NCSC 2028 milestone is a discovery milestone for a reason: you cannot migrate cryptography you have not found, and cryptography hides. In practice, discovery means answering three questions across the estate. Where does TLS terminate, so you know which servers, load balancers and gateways negotiate public-key cryptography on your behalf? Where do long-lived secrets and keys sit, especially in firmware, embedded devices and code-signing pipelines that are expensive and slow to change? And which of your vendors have a published post-quantum roadmap, because a great deal of your cryptography is delivered inside software you do not write.
The output is an inventory that pins each system to the timeline. For every system, record the cryptography in use (RSA, elliptic-curve, symmetric or already hybrid), the lifetime in years of the data it protects, and the vendor roadmap status. A system whose data must stay confidential past 2035 and which still relies on classical public-key cryptography is a harvest-now-decrypt-later risk today, and it moves to the front of the queue against the 2031 priority milestone. A system holding only short-lived, low-sensitivity data can wait for the general 2035 deadline. That prioritisation, data lifetime measured against the fixed milestone years, is the whole discipline: it turns an intimidating, estate-wide problem into a ranked list of dated, ownerable work.
In the NCSC post-quantum migration timeline, which milestone lands in 2028 and whose timeline is it?
A payments team must store the full card number so that recurring charges can be taken for years, but wants the fewest systems possible in scope for strict card-data handling rules. Which control fits best, and why?
You must select a primitive that lets two servers agree a fresh shared secret over an untrusted network with post-quantum protection. Which choice matches the job?
Try it in the workspace
A studio tool turns this module into something you can build and export.
Core distinctions
- Choosing a primitive is easy and rarely the weak point. Symmetric encryption protects bulk data but breaks on key reuse or nonce reuse; public-key cryptography agrees keys and signs but rests on hard problems a quantum computer would void; hashing protects integrity one-way but is not confidentiality.
- Cryptography fails at key custody, not at algorithm choice. The NIST SP 800-57 lifecycle, generate, distribute, use, rotate, revoke and destroy, is where the real security lies; a KMS is the policy and lifecycle layer and an HSM is the tamper-resistant vault, evidenced by FIPS 140-3 validation.
- Encryption is not the only data control. DLP enforces where data may go; tokenisation removes recoverable data from most systems and shrinks PCI DSS scope; and the most secure record is the one you never stored.
- The post-quantum standards are finalised: FIPS 203 ML-KEM, FIPS 204 ML-DSA and FIPS 205 SLH-DSA on 13 August 2024, with HQC selected as a backup KEM on 11 March 2025. Harvest-now-decrypt-later makes migration urgent for long-lived data even though no quantum computer breaks RSA today.
- The deadlines are fixed. NIST IR 8547 deprecates 112-bit classical public-key cryptography by 2030 and disallows quantum-vulnerable algorithms after 2035; the NCSC expects discovery and a plan by 2028, highest-priority migrations by 2031, and completion by 2035. Discovery, pinning each system to the timeline by data lifetime, is the first real task.
You can now reason about primitives, key custody and the dated post-quantum migration. The next module carries these ideas into an environment where the stakes are physical rather than informational. What changes when the system you are defending controls a pump, a breaker or a turbine? That is operational technology and industrial control system security.
Standards and sources cited in this module
NIST FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard (ML-KEM), 13 August 2024
The finalised post-quantum key-encapsulation standard derived from CRYSTALS-Kyber. ML-KEM is the KEM used in the hybrid X25519MLKEM768 key agreement now default in browsers.
NIST FIPS 204: Module-Lattice-Based Digital Signature Standard (ML-DSA), 13 August 2024
The finalised post-quantum signature standard derived from CRYSTALS-Dilithium, for proving who sent something after classical signatures are disallowed.
NIST FIPS 205: Stateless Hash-Based Digital Signature Standard (SLH-DSA), 13 August 2024
The hash-based signature standard resting on different mathematics from the lattice schemes, so a break in one family does not take all signatures down.
NIST selects HQC as the fifth post-quantum algorithm, 11 March 2025
The backup key-encapsulation mechanism built on error-correcting codes rather than lattices; draft standard expected 2026, final around 2027.
NIST IR 8547 (initial public draft): Transition to Post-Quantum Cryptography Standards
Sets the agility schedule: 112-bit classical public-key cryptography deprecated by 2030, quantum-vulnerable algorithms disallowed after 2035.
NCSC: Post-quantum cryptography migration timelines
The UK organisational milestones: discovery and plan by 2028, highest-priority migrations by 2031, complete migration by 2035.
NIST SP 800-57 Part 1 Rev. 5: Recommendation for Key Management
The key-management lifecycle, generate, distribute, use, rotate, revoke and destroy, and the custody discipline that matters more than algorithm choice.
Cloudflare: The state of the post-quantum Internet in 2025
Evidence of adoption: over half of human-initiated HTTPS traffic protected against harvest-now-decrypt-later by late October 2025, with Chrome and Firefox enabling hybrid post-quantum key agreement by default.