ML-KEM and the Future of Code Signing in a PQC World

We’ve relied on algorithms like RSA and ECC for years to protect everything from emails to software updates. They’ve held up pretty well as long as attackers don’t have a quantum computer. But that’s the problem: quantum computing is no longer just a theoretical idea. It’s progressing fast enough that cryptographers are seriously thinking about what happens when these machines become practical.
Quantum computers break things in a very specific way. They don’t just make our systems faster; they make some cryptographic problems trivial, like factoring large numbers (which breaks RSA) or solving the discrete log problem (which breaks ECC). That means if we continue using current algorithms, anything encrypted or signed today could be cracked in the future, once a quantum computer catches up.
This is where post-quantum cryptography steps in. It’s not about fixing broken systems, it’s about future-proofing them. We need new algorithms that stay safe even if quantum computers become a reality. That’s exactly the problem ML-KEM is built to solve.
ML-KEM stands for Module-Lattice Key Encapsulation Mechanism, and it’s part of the new set of cryptographic algorithms selected by NIST to help protect against quantum threats. You might’ve heard of Kyber ML-KEM, which is basically Kyber with a formal name as it moves toward standardization.
At its core, ML-KEM helps two systems establish a shared secret over an insecure connection. It’s like Diffie-Hellman or RSA-based key exchange, but built to resist quantum attacks. That makes it a perfect fit for securing communication between apps, systems, and even hardware like HSMs, especially in sensitive workflows like code signing.
Why does this matter now? Because many software vendors, certificate authorities, and security tools are already thinking ahead. If you’re building systems that will be used 5 or 10 years from now, you can’t ignore the quantum angle anymore. ML-KEM helps ensure that your key exchange mechanisms won’t become tomorrow’s weakest link.
ML-KEM didn’t just pop out of nowhere. It’s actually the formal name for a tried-and-tested algorithm called Kyber, which has been around for a while in post-quantum cryptography circles. When NIST (National Institute of Standards and Technology) ran a global competition to choose new cryptographic standards that can stand up to quantum attacks, Kyber stood out.
After years of testing, discussions, and security evaluations, NIST gave it the green light in 2022 as its go-to algorithm for key exchange in a quantum-safe world. As part of finalizing the standard, Kyber was renamed ML-KEM, which stands for Module-Lattice based Key Encapsulation Mechanism. Think of it as the official version of Kyber that’s now being adopted in real-world systems.
So, what does ML-KEM actually do? It’s a Key Encapsulation Mechanism or KEM for short. In simple terms, it’s used to securely exchange a shared secret key between two parties over an insecure connection. This is the key step in many cryptographic systems: you and someone else need to agree on a secret that no one else can see, even if they’re watching everything you send.
Traditionally, we’ve used algorithms like RSA and Elliptic Curve Diffie-Hellman for this. But those won’t survive a quantum attack. ML-KEM steps in as a replacement—it lets you encapsulate (or “wrap”) a shared secret in a way that’s safe even if someone has access to a future quantum computer.
And just like traditional KEMs, once the shared secret is exchanged, it can be used for symmetric encryption, like AES, to protect data or sign software packages in transit.
Under the hood, ML-KEM is built on something called the Module Learning With Errors problem, or MLWE for short. This sounds complicated, but here’s the gist:
Imagine trying to solve a simple math problem where someone has deliberately added a bit of noise to the answer. You might still get close, but cracking it perfectly, especially across many dimensions, is incredibly hard. That’s the essence of MLWE: it’s based on math problems that are easy to compute one way but painfully hard to reverse, especially when noise is thrown in.
This kind of math holds up even when a quantum computer gets involved. That’s why MLWE-based algorithms like ML-KEM are considered safe bets for the future. It’s not just theory; this problem has been analyzed for years, and no one’s found a practical way to break it with either classical or quantum methods.
Let’s break it down into what actually happens when you use ML-KEM to securely exchange a key. It’s fast, efficient, and works kind of like a secure digital handshake with some serious math behind the scenes.
First up: key generation. This is where one party (let’s say, a server) creates a public key and a private key. The public key is shared with others, and the private key is kept safe and never leaves the system.
Think of it like this:
In ML-KEM, these keys are based on lattice math (specifically the MLWE problem), which makes them strong against attacks from quantum computers.
Now comes the encapsulation part.
Suppose a client wants to send a shared secret to the server. Here’s what happens:
Then comes decapsulation:
Now, both sides have the exact same secret, without actually sending the key over the network. Even if someone’s eavesdropping, they can’t figure out the secret, because they’d need the private key, and solving the math problem without it is practically impossible (even for quantum machines).
ML-KEM comes in three levels, each offering a different level of security:
Each level increases the size of the keys and ciphertexts a bit, but also increases the difficulty for attackers trying to break the encryption. In short: pick the level that fits your risk profile and performance needs.
So, how is ML-KEM “quantum-safe”? Here’s the simple idea: ML-KEM is based on lattice problems that are hard to solve even for quantum computers. Algorithms like Shor’s (which breaks RSA and ECC) don’t help much here. And despite years of cryptanalysis, no one’s figured out how to break MLWE-based systems efficiently with quantum techniques.
In fact, one of the reasons Kyber (now ML-KEM) was selected by NIST is because it struck a solid balance between performance and quantum resistance. It’s fast enough for practical use, yet backed by solid math that makes quantum attacks a no-go.
The National Institute of Standards and Technology (NIST) isn’t just another acronym in cryptography; they’re basically the referees. When it comes to what encryption gets used in government, critical infrastructure, and major industry systems, NIST decides what’s safe and what’s outdated.
Back in 2016, NIST kicked off a global competition to find cryptographic algorithms that could stand up to quantum computers. The idea was simple: let researchers submit their best ideas, throw every known attack at them, and see what survives.
Out of 80+ submissions, only a few made it to the finish line. One of them was Kyber, which now carries the name ML-KEM as part of the official standard.
So why did Kyber beat the competition?
Here’s what made it stand out:
The result? NIST selected Kyber for standardization and renamed it ML-KEM in 2022. That makes it the official post-quantum KEM of the future.
Let’s be honest, RSA and ECC have done their job pretty well over the years. They’re behind the scenes in your HTTPS connections, secure email, VPNs, and yes, even code signing. But with quantum computing getting closer, it’s time to look at what happens when we compare those classics to ML-KEM, the post-quantum alternative.
When it comes to speed, ML-KEM actually holds up surprisingly well.
For real-world use cases like TLS or code signing infrastructure, this makes ML-KEM a serious upgrade, not just a fallback.
Here’s where the numbers get interesting:
Algorithm | Public Key Size | Ciphertext Size | Security Level |
---|---|---|---|
RSA-2048 | ~256 bytes | ~256 bytes | ~112-bit |
ECC (P-256) | ~64 bytes | ~64 bytes | ~128-bit |
ML-KEM-512 | ~800 bytes | ~768 bytes | 128-bit PQ |
ML-KEM-768 | ~1200 bytes | ~1088 bytes | 192-bit PQ |
Yes, ML-KEM keys and ciphertexts are larger than ECC and RSA, but they’re still small enough to work efficiently in most systems. They’re also far smaller than some other post-quantum algorithms that NIST didn’t select.
ML-KEM, on the other hand, is based on lattice problems, specifically MLWE. These aren’t just resistant to known quantum attacks; they’ve been studied for years with no major cracks. That’s why ML-KEM is considered safe even in the future when working with quantum machines.
So, if you want your system to be secure in 10–15 years, ML-KEM is the smarter bet.
You’d think larger keys would make ML-KEM hard to use on tiny devices, but it’s actually surprisingly efficient.
Sure, if you’re trying to run cryptography on a sensor running off a coin cell battery, you’ll need to test carefully. But in most real-world cases, ML-KEM is fast and light enough to get the job done even where ECC used to shine.
Code signing is how software publishers prove that their app or update hasn’t been tampered with. Here’s the basic flow:
If the signature checks out, the code is trusted. If not, it’s flagged. Simple enough, but the whole process depends on public key crypto, usually RSA or ECC, to make it trustworthy.
Traditional code signing uses algorithms like RSA and ECC, which are fine until a quantum computer enters the picture.
Even if quantum computers aren’t here yet, attackers could harvest signed code and certificates now and break them later. That’s a big problem for long-lived code (like firmware or OS updates) or anything stored offline.
ML-KEM doesn’t replace digital signatures, but it plays a key supporting role, especially in systems where:
Here’s where ML-KEM fits in: it gives you a quantum-safe way to exchange encryption keys between systems that need to coordinate around code signing. That’s especially helpful in hybrid crypto models, where you combine traditional signing algorithms with post-quantum components.
Think of ML-KEM as the secure handshake behind the scenes that keeps keys, credentials, and signing commands safe even if someone is watching.
When you’re requesting a code signing certificate from a CA, ML-KEM can be used to:
A lot of companies use a remote signing server (or HSMs) that handle private keys. ML-KEM can be used to:
In automated CI/CD setups, secrets often pass between tools, containers, or cloud services. ML-KEM can help:
If you’re building or maintaining secure software pipelines, our CodeSign Secure is designed to make code signing smarter, more automated, and future-proof. And with ML-KEM now standardized by NIST, it’s time to bring post-quantum protection into the picture, without throwing out everything that already works.
You don’t need to reinvent everything to start using ML-KEM. Thanks to active open-source work and early adoption, you can already plug it into many familiar tools:
In short, we bring ML-KEM into your stack without asking you to rip out OpenSSL or abandon your automation scripts.
Let’s be realistic: most ecosystems still rely on RSA or ECDSA for digital signatures, especially when compatibility matters (Windows Authenticode, Apple Notarization, etc.).
So instead of going all-in on post-quantum crypto right away, our platform supports hybrid schemes, where we combine:
This way, even if the signature is made with a classic algorithm, the private key stays protected using a post-quantum channel. It’s a smart way to transition while keeping everything compatible with existing trust models and toolchains.
Our platform already supports PKCS#11 for interacting with HSMs, and we’re extending this to support post-quantum key exchanges and hybrid signing too.
It’s fully compatible with Thales, nShield, and other leading HSMs, and we’re working with vendors to expand native support for ML-KEM keys under PKCS#11.
Switching to post-quantum crypto like ML-KEM isn’t just flipping a switch. It’s a move with some trade-offs and a few things to think through, especially if you’re working with code signing systems that need to stay reliable, fast, and compatible.
ML-KEM is fast for a post-quantum algorithm, but it’s not as lightweight as ECC or RSA when it comes to key and ciphertext sizes.
So, if you’re using ML-KEM in something like CI/CD pipelines or embedded systems, you’ll need to balance security needs with how much overhead your system can handle. In most modern server setups, it’s barely noticeable, but it’s something to test.
Here’s the sticky part: a lot of tools, protocols, and platforms don’t know what to do with post-quantum algorithms.
That’s why hybrid schemes matter. You can layer ML-KEM into the handshake or transport, while still using RSA or ECC where compatibility is critical. It’s a way to move forward without breaking existing stuff.
ML-KEM keys, like any private key, need to be stored securely and managed carefully. But there are some quirks to deal with:
In our platform, we’re working on HSM-backed and encrypted container-based storage for ML-KEM key material, along with support for exporting keys in formats like [NIST’s SP 800-56Cr1] so you can keep things clean and auditable.
ML-KEM isn’t just a theoretical upgrade; it’s the key to keeping your signing systems secure in a world where quantum computing is no longer science fiction. As NIST’s top pick for post-quantum key exchange, ML-KEM is already shaping how modern cryptographic systems are being built, especially for use cases like code signing where long-term security is critical. Whether you’re signing firmware, distributing software updates, or managing CI/CD pipelines, it’s smart to assume that someone out there could be storing your signed code today to break it tomorrow. ML-KEM helps shut that door.
You don’t need to tear down your existing systems to start preparing. With hybrid models, ML-KEM can work right alongside RSA or ECDSA, securing the handshake and session while leaving the signature algorithm untouched for now. This makes it easy to add quantum-resistant protection to your code signing workflow without breaking compatibility with the tools and platforms you’re already using. Even adding ML-KEM to your signing server communications or certificate provisioning process makes a huge difference in future-proofing your pipeline.
Quantum attacks might not be here today, but they’re coming, and attackers are playing the long game. That’s why adopting post-quantum crypto early gives you a serious edge. Starting with secure key exchange is a practical first step, and ML-KEM is ready for it. You can layer it into your systems today and scale up over time as industry support grows.
If you’re looking to make this shift without the headache, our code signing platform, CodeSign Secure, is designed to help. Our platform supports ML-KEM for secure key exchange, works with HSMs via PKCS#11, and lets you run hybrid signing schemes without changing how your teams build and release software. Whether you’re modernizing your signing infrastructure or just getting started, our platform gives you the tools to stay ahead without compromising compatibility or security.