What is a decryption failure?

A decryption failure is a rare event in some key-encapsulation schemes where a valid ciphertext does not recover the sender's key. For ML-KEM it matters because invalid ciphertexts can leak information about the private key.

On this page

What is a decryption failure in ML-KEM and why does it matter?

A decryption failure is a rare event in which valid ciphertext, produced correctly by the sender, does not decapsulate to the same shared key the sender holds. In ML-KEM, the key encapsulation mechanism standardized in FIPS 203, the failure probability is very small but not zero. The ML-KEM discussion of this behavior appears in the security considerations drafts and related IETF documents, including draft-sfluhrer-cfrg-ml-kem-security-considerations-05 and the TLS and X.509 drafts that carry ML-KEM. You are most likely to meet the term in a vendor security document, a protocol specification, or an audit request asking how a product handles it.

Who meets it, and where, depends on the role. Engineers reviewing a cryptographic library need to know that the decapsulation function does not always signal failure through an error. The Go crypto/mlkem documentation, for example, says Decapsulate returns an error only when the ciphertext has the wrong length, and that a correct-length but invalid ciphertext yields a different shared key instead. Protocol implementers see the consequence in TLS: draft-ietf-tls-mlkem-11 requires that a failed decapsulation abort the connection with an internal_error alert, and that a wrong-length ciphertext produce an illegal_parameter alert. Reviewers should confirm, for the exact library and version they run, which error or key-mismatch behavior applies and how the TLS stack reports it.

Why it matters is that decryption failures can leak information. The security considerations draft warns that a maliciously generated ciphertext could induce failures that might let an attacker learn the private key, and it says such failures can leak information about the secret decapsulation key. Test teams should ask vendors how their implementation handles invalid ciphertexts, whether decapsulation returns a constant-length output for all inputs, and whether the behavior has been checked against the guidance in NIST SP 800-227. Confirm these points in the documentation and your own testing rather than assuming them.

Which names and parameter sets does decapsulation failure use?

This table lists the ML-KEM parameter sets, the X.509 identifiers and the hybrid TLS group names where decapsulation behavior is discussed. Use it to match the name in a specification, certificate or protocol trace to the parameter set it refers to, then check the failure rate and error handling that each source gives for that set.

NameWhere it appearsIdentifier or sizeFailure rate or handling
ML-KEM-512FIPS 203, the ML-KEM standardX.509 OID 2.16.840.1.101.3.4.4.1 (RFC 9935)Estimated failure rate 2^(-138.8) (draft-ietf-lamps-cms-kyber-10)
ML-KEM-768FIPS 203, the ML-KEM standardX.509 OID 2.16.840.1.101.3.4.4.2 (RFC 9935)Estimated failure rate 2^(-164.8) (draft-ietf-lamps-cms-kyber-10)
ML-KEM-1024FIPS 203, the ML-KEM standardX.509 OID 2.16.840.1.101.3.4.4.3 (RFC 9935)Estimated failure rate 2^(-174.8) (draft-ietf-lamps-cms-kyber-10)
TLS ML-KEM key sharesdraft-ietf-tls-mlkem-11Client and server shares: 800/768 bytes (512), 1184/1088 bytes (768), 1568/1568 bytes (1024)Failed decapsulation aborts the connection with an internal_error alert
X25519MLKEM768RFC 10024, hybrid TLS 1.3 group 4588 (0x11EC)Client and server shares: 1216/1120 bytesFailed decapsulation aborts with internal_error (RFC 10024)
SecP256r1MLKEM768RFC 10024, hybrid TLS 1.3 group 4587 (0x11EB)Client and server shares: 1249/1153 bytesFailed decapsulation aborts with internal_error (RFC 10024)
SecP384r1MLKEM1024RFC 10024, hybrid TLS 1.3 group 4589 (0x11ED)Client and server shares: 1665/1665 bytesFailed decapsulation aborts with internal_error (RFC 10024)
Decapsulation failure termIETF drafts on ML-KEM security considerationsNot a parameter set or identifierDiscussed as a rare event that can leak key information (draft-sfluhrer-cfrg-ml-kem-security-considerations-05)

Where do practitioners meet decryption failure in TLS and libraries?

Decryption failure matters differently depending on where it surfaces: in protocol alerts, in library return values, in certificate formats and in vendor guidance. The cards below cover what each source says about failure handling, so you can check how your stack behaves before relying on it.

TLS 1.3 hybrid groups in RFC 10024

RFC 10024 defines the hybrid TLS 1.3 groups X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024, and it repeats the rule that a failed ML-KEM decapsulation aborts the connection. Hybrid key shares are larger than classical ones, with X25519MLKEM768 using 1216 bytes from the client and 1120 bytes from the server. Check that your TLS stack negotiates these groups and that a failed decapsulation produces an internal_error alert rather than a silent fallback.

RFC 10024 text

Alert rules in the TLS ML-KEM draft

draft-ietf-tls-mlkem-11 separates two cases. A ciphertext of the wrong length requires an illegal_parameter alert, while any other decapsulation failure requires the connection to be aborted with an internal_error alert. Because this is a draft, confirm the final wording in the version your implementation targets, and test both alert paths in your own environment.

TLS ML-KEM draft

Go crypto/mlkem error behavior

The Go crypto/mlkem documentation says Decapsulate returns an error only when the ciphertext has the wrong length. A correct-length but invalid ciphertext returns a shared key that differs from the sender's, with no error. Application code that checks only for errors will not detect this mismatch, so a protocol layer must confirm key agreement through a later authenticated step.

Go crypto/mlkem docs

OpenSSL 3.5 EVP_KEM interface

OpenSSL 3.5 exposes ML-KEM-512, ML-KEM-768 and ML-KEM-1024 through the EVP_KEM interface. The EVP_KEM-ML-KEM documentation page does not discuss decapsulation failure behavior, so it does not tell you whether an invalid ciphertext returns an error or a mismatched shared key. Confirm this in the source or with tests against your build before assuming either behavior.

OpenSSL EVP_KEM docs

CMS key encapsulation in the LAMPS draft

draft-ietf-lamps-cms-kyber-10 describes how ML-KEM is carried in CMS for key encapsulation, and it gives estimated decapsulation failure rates of about 2^(-138.8) for ML-KEM-512, 2^(-164.8) for ML-KEM-768 and 2^(-174.8) for ML-KEM-1024. That draft was later published as RFC 9936, which does not contain this table. Use the draft figures as historical context and check the published RFC for current values.

CMS ML-KEM draft

Vendor and security-considerations guidance

draft-sfluhrer-cfrg-ml-kem-security-considerations-05 warns that a maliciously crafted ciphertext could induce decapsulation failures that leak information about the private key, and it advises implementers to consider side-channel-resistant code. Ask each vendor whether its ML-KEM implementation resists these leaks, and whether it has documented how it handles invalid ciphertexts. The sources listed on this page do not say what each vendor has published on this point.

Security considerations draft

How does decapsulation handle invalid ciphertexts?

Decapsulation is the step where the receiver turns a ciphertext into a shared key, and in ML-KEM the design choice that matters most is what happens when the ciphertext is malformed but still the right length. Rather than returning an error, the decapsulation procedure repeats some or all of the encapsulation process, so an invalid ciphertext yields an unrelated 32-byte value that carries no visible information. The IETF security considerations draft (draft-sfluhrer-cfrg-ml-kem-security-considerations-05) describes this behavior in Section 2.3. For engineers, the practical consequence is that a correct-length invalid ciphertext does not announce itself to the caller. Protocol code therefore cannot rely on a decapsulation error to detect tampering, and any check for a bad ciphertext has to happen at the protocol layer.

Library behavior is where engineers will see this in practice. The Go crypto/mlkem documentation states that Decapsulate returns an error only when the ciphertext has the wrong length, and that a correct-length but invalid ciphertext returns a shared key that differs from the sender's (Go crypto/mlkem). Reviewers should confirm how their own library and version handle these cases, because the OpenSSL EVP_KEM-ML-KEM page does not discuss decapsulation failure behavior, so that point has to be checked against the release actually deployed. Length checks should be expected in code, while the absence of an error for a bad ciphertext should be treated as normal rather than as a sign of success.

Why this design matters for an attacker is the reason the behavior exists. If decapsulation returned a distinguishable error for invalid ciphertexts, an adversary could submit crafted ciphertexts and learn from which ones were rejected, a pattern that the same draft warns could let an attacker learn the private key. Returning an unrelated value keeps those responses uniform. Teams planning a deployment should verify with their vendors that their implementation avoids leaking this distinction through timing or other side channels, since the draft notes that the adversary may have access to various side channels, and that implementers may wish to use implementations resistant to such leakage.

How a handshake reacts to a failed decapsulation

The diagram is illustrative and starts when a client sends an ML-KEM ciphertext in a TLS 1.3 key share. The server checks the ciphertext length first: a wrong-length ciphertext produces an illegal_parameter alert. Any other decapsulation failure produces an internal_error alert and the connection is aborted. Note that a correct-length but invalid ciphertext does not necessarily fail at all, since the Go documentation says it returns a different shared key instead of an error, so check your library's behavior for each case.

Illustrative flow of how a TLS server reacts to a failed ML-KEM decapsulation.

Is the decryption failure rate published in a standard?

No. The standards and drafts that define ML-KEM do not set a formal requirement for a decryption failure rate, and implementers should not treat any figure below as a compliance target. The most specific numbers come from an earlier Internet-Draft, draft-ietf-lamps-cms-kyber-10, dated 17 June 2025. That draft gave estimated decapsulation failure rates of 2^(-138.8) for ML-KEM-512, 2^(-164.8) for ML-KEM-768 and 2^(-174.8) for ML-KEM-1024. The draft was later published as RFC 9936, and that RFC does not contain this table. The estimates therefore exist only in a draft that has since been superseded, and the published document a reader would cite does not repeat them.

The core parameter standards are FIPS 203, published as final on 13 August 2024, and NIST SP 800-227, Recommendations for Key-Encapsulation Mechanisms, published as final on 18 September 2025. Neither source, as summarized here, gives a required failure rate. The IETF's Proposed Standard RFC 10024, dated August 2026, covers hybrid TLS 1.3 groups and points implementers to NIST SP 800-227 for side-channel guidance, but it does not set a failure-rate threshold either. The security-considerations draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05 acknowledges a tiny probability of decapsulation failure and advises ignoring it in practice, which is guidance rather than a requirement.

If your organization needs a number for a review, confirm it with the standard text itself, with the vendor's documentation for the library you run, or with an assessor, and do not cite the LAMPS draft figures as an official specification value. Ask the vendor which ML-KEM parameter set and version it implements, and whether its decapsulation behavior has been analyzed in the form you need. Keep in mind that the failure behavior matters for security too: the security-considerations draft warns that a malicious ciphertext could induce failures that leak information about the decapsulation key, so the question is about implementation behavior as much as about a probability.

What should a migration team check for decryption failure handling?

This sequence shows how a migration team can verify that ML-KEM decapsulation in its TLS stack fails safely, returns the alerts the drafts specify, and resists side-channel leakage. The output is a checked record of where decapsulation runs and how each vendor handles invalid ciphertexts.

  1. Inventory where ML-KEM decapsulation runs

    Identify every TLS stack, library and service in the environment that performs ML-KEM decapsulation, including hybrid groups such as X25519MLKEM768 that carry an ML-KEM share. Record the library name, version and whether decapsulation happens in the server, the client, a load balancer or a termination proxy. The step is complete when each decapsulation point is listed with its owner and its version, so the team knows which components the later checks must cover.

  2. Confirm the wrong-length ciphertext alert

    For each library on the list, test how it handles a ciphertext of the wrong length. The TLS draft requires an illegal_parameter alert in this case, and the Go crypto/mlkem documentation states that Decapsulate returns an error only for wrong-length input. Send a malformed key share in a test handshake and capture the alert on the wire. The step is complete when the observed alert matches illegal_parameter for every component tested, and any mismatch is logged with the version involved.

  3. Confirm the internal error alert for other failures

    Check that decapsulation failures for any reason other than a wrong length abort the connection with an internal_error alert, as draft-ietf-tls-mlkem-11 and RFC 10024 specify. Note that a correct-length but invalid ciphertext does not produce an error in some implementations and instead yields a different shared key, so the check must confirm how the handshake then fails. The step is complete when the team has a record of the alert or failure path for each library and each hybrid group in use.

  4. Verify side-channel resistance of the implementation

    Review each decapsulation implementation against the side-channel guidance in NIST SP 800-227 and Section 6 of RFC 10024, which encourages implementations resistant to side-channel attacks, especially where remote attackers could exploit them. Ask the library maintainers which leakage classes they address, because some projects state they target timing only and leave power and electromagnetic leakage out of scope. The step is complete when each library has a written statement of its side-channel coverage, with gaps assigned to a mitigating control such as isolation or hardware protection.

  5. Ask vendors how decapsulation handles invalid ciphertexts

    Send each vendor a written question asking how decapsulation behaves when a ciphertext is invalid, including whether it returns an error, a different shared key or a fixed value, and which alert the TLS stack sends. Ask for the version to which the answer applies and a reference to their documentation or test results. The step is complete when every vendor has answered in writing and each answer has been matched against the library tests from the earlier steps.

  6. Record results and retest after upgrades

    Collect the inventory, alert captures, side-channel statements and vendor answers into one dated record that names the component, version and owner for each item. Flag any component whose behavior differs from the drafts and set it for remediation or a documented exception. Repeat the alert tests after any library or TLS stack upgrade, since the behavior can change between versions. The step is complete when the record is filed and a retest date is assigned for each upgrade path.

Which confusions about decryption failure do vendors create?

Vendor material about decryption failure often blurs a few distinct points: how rare the event is, which operation it belongs to, what standards and libraries document, and whether a hybrid group changes the underlying behaviour. Each card below separates one of these points so that engineers can check what a specific product actually does.

Rare does not mean ignorable

The IETF draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05 says the probability of decapsulation failure in ML-KEM is tiny and advises ignoring it in practice. The same draft warns that a maliciously generated ciphertext could induce decapsulation failures that might let an attacker learn the private key, and that failures can leak information about the secret decapsulation key. A low failure rate is therefore a statement about honest traffic, not about attacker-crafted input. When reviewing a product, check whether it treats the failure rate as a reason to skip handling of adversarial ciphertexts, and whether it documents any rejection or logging for them. The estimated rates in draft-ietf-lamps-cms-kyber-10 (2^(-138.8) for ML-KEM-512, 2^(-164.8) for ML-KEM-768 and 2^(-174.8) for ML-KEM-1024) describe a different parameter set and document, so cite them with their source.

Security considerations draft

Key exchange is not signing

Decryption failure belongs to key encapsulation: ML-KEM decapsulation recovers a shared secret from a ciphertext. Signature verification is a separate operation, and ML-DSA under FIPS 204 has its own failure and rejection behaviour, with side-channel concerns described in RFC 9881. Vendor documents often say a product "fails safely" or "handles errors" without naming which operation is meant. When you read such a claim, ask whether it refers to a TLS key share, a CMS recipient key, a certificate signature or a token signature. The handling differs by protocol, and a fix in one path does not carry over to another. Write the operation name into your test plan so that each failure path is tested separately.

FIPS 204 record

OpenSSL does not document failure handling

OpenSSL 3.5 exposes ML-KEM-512, ML-KEM-768 and ML-KEM-1024 as EVP_KEM algorithms, but its EVP_KEM-ML-KEM documentation page does not discuss decapsulation failure behaviour. A vendor that says its product inherits safe failure handling from OpenSSL is therefore making a claim the cited page does not support. If the product depends on OpenSSL for ML-KEM, ask which version it bundles, whether the integration checks ciphertext length, and what it does on a failed decapsulation. Confirm this against the library source and the product's own test results for the exact version you run, rather than against the general documentation.

OpenSSL ML-KEM page

Hybrid groups keep the ML-KEM behaviour

Hybrid TLS groups such as X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024 combine a classical exchange with ML-KEM, defined in RFC 10024. They do not change how ML-KEM decapsulation fails. RFC 10024 repeats the rule from draft-ietf-tls-mlkem-11: if ML-KEM decapsulation fails for any other reason, the connection MUST be aborted with an internal_error alert, and a wrong-length ciphertext requires an illegal_parameter alert. The hybrid key shares are larger (1216 bytes for the client share of X25519MLKEM768, for example), which changes message sizes but not the failure contract. Check that a product's hybrid configuration produces the alerts the RFC requires, and test each group it enables. Do not assume that a hybrid name implies identical behaviour across groups or across vendors.

RFC 10024

Common questions about decryption failure

What does decryption failure stand for in post-quantum cryptography?

In post-quantum key encapsulation, a decryption failure is the rare event where a correctly formed ciphertext does not recover the same shared key on the receiving side. The term is used for ML-KEM, which is defined in FIPS 203 with the parameter sets ML-KEM-512, ML-KEM-768 and ML-KEM-1024. The sources give estimated failure rates of 2^(-138.8) for ML-KEM-512, 2^(-164.8) for ML-KEM-768 and 2^(-174.8) for ML-KEM-1024, as estimated in draft-ietf-lamps-cms-kyber-10. A draft on ML-KEM security considerations says there is a tiny probability of decapsulation failure and advises ignoring it in practice. Engineers should still know the term, because the same draft warns that failures can leak information about the secret key.

Is decryption failure an older name for a different event?

The sources do not describe decryption failure as an older name for another event. The term refers to the rare decapsulation failure built into ML-KEM's design, not to a general error in encryption. Do not confuse it with a protocol-level error. When decapsulation fails for another reason, TLS 1.3 hybrid groups require the connection to be aborted with an internal_error alert, while a wrong-length ciphertext requires an illegal_parameter alert, according to draft-ietf-tls-mlkem-11. Confirm the behavior of the library you run, since the sources do not define a single error model across all products.

Is decryption failure standardized in FIPS 203?

The sources do not show that FIPS 203 uses the term decryption failure in a defined way. FIPS 203, the Module-Lattice-Based Key-Encapsulation Mechanism Standard, was published as final on 13 August 2024 and defines ML-KEM. A NIST note dated 17 November 2025 says an identified issue will be corrected in a future update or revision. Check the current text of FIPS 203 and any errata before relying on how it handles failed decapsulation. NIST SP 800-227, published as final on 18 September 2025, gives recommendations for key-encapsulation mechanisms and is the next document to read for implementation guidance.

Do products use decryption failure as a feature or documented behavior?

The sources show that some libraries expose ML-KEM behavior but do not describe decapsulation failure in detail. OpenSSL 3.5 exposes ML-KEM-512, ML-KEM-768 and ML-KEM-1024 as EVP_KEM algorithms, and its documentation page does not discuss decapsulation failure behavior. The Go crypto/mlkem documentation says Decapsulate returns an error only when the ciphertext is the wrong length, and that a correct-length but invalid ciphertext returns a shared key that differs from the sender's instead of an error. Read the documentation for the exact version you run, because the sources do not cover every product.

What does decryption failure change for a post-quantum migration?

The main change is that an implementation must handle invalid ciphertexts without leaking information. The IETF draft on ML-KEM security considerations says decapsulation should repeat some or all of the encapsulation process so that invalid ciphertexts produce an unrelated 32 byte value that gives no information. It also warns that a maliciously generated ciphertext could induce decapsulation failures that might let an attacker learn the private key. For migration planning, include the TLS and certificate components that carry ML-KEM key shares, and confirm the library's handling of invalid input. The key share sizes are 1184 bytes (client) and 1088 bytes (server) for ML-KEM-768 in draft-ietf-tls-mlkem-11.

What should I ask a vendor about decryption failure?

Ask how the product handles a correct-length but invalid ciphertext, and whether decapsulation returns an error or a different shared key. Ask which ML-KEM parameter set and library version they use, and whether the implementation resists side-channel attacks. Ask whether the vendor has tested for leakage from failed decapsulation, and what the sources they rely on say. The IETF draft advises implementers to consider implementations that resist side-channel leakage, and RFC 10024 encourages implementers to use implementations resistant to side-channel attacks, especially those a remote attacker could exploit. Confirm the answers against the version you run, because the sources do not show the behavior of every product.

Does decryption failure change how a team should test cryptographic code?

Yes, testing should include invalid and malformed ciphertexts, not only valid input. The IETF draft on ML-KEM security considerations says an adversary may have access to various side channels, and advises implementers to consider implementations resistant to such leakage. The mlkem-native project says it targets resistance against timing side-channels only, and that power and electromagnetic side-channels are currently out of scope. Teams should record which side channels a chosen library covers, and test the error paths that a failed decapsulation exercises. Use the constant-time guidance in RFC 8446 as background, since TLS 1.3 leaves side-channel defenses to the cryptographic primitives.

How DeployOpen works on this

DeployOpen reviews how an ML-KEM implementation and the protocols that carry it handle decapsulation failures, with attention to where error handling could leak information. The work runs inside the client's own infrastructure and produces written findings, fixes and documentation that the client's security and engineering teams can check.

How we scope

  • Scope covers which ML-KEM parameter sets, libraries and protocol groups the client runs, such as ML-KEM-768 in a TLS hybrid group.
  • The written scope lists which code paths handle invalid ciphertexts, which error alerts are sent and which logs record failures.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any review work starts.

How we build

  • We inspect how the chosen library returns a shared key for a correct-length invalid ciphertext, instead of returning an error.
  • We check that protocol code aborts with the alert the protocol specifies when decapsulation fails for any reason.
  • We test whether timing, error responses or logs differ between valid and malformed ciphertexts, and where that difference reaches an attacker.

How we hand over

  • The findings report names each affected component, the observed behavior and the specific code or configuration involved.
  • Each finding comes with a recommended fix, and the report states which fixes change code and which change configuration.
  • A retest confirms the fixes, and the documentation records the handling approach for the client's compliance and audit teams.

How we support

  • Ongoing support is available as a retainer for upgrades when libraries and protocol stacks change how they handle decapsulation.
  • Continuous testing can recheck error handling after each library update, so regressions are caught in the client's environment.
  • Ask your library and protocol vendors which versions you run, and confirm their decapsulation failure behavior against the specifications for those versions.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.