What is a constant-time implementation, and why does it matter for post-quantum code?
A constant-time implementation is code whose running time does not depend on secret values such as private keys, decapsulation inputs or intermediate secret data. Its purpose is to resist timing side-channel attacks, in which an attacker learns secrets by measuring how long operations take. You are most likely to meet the term when a library review, vendor document or tender asks whether a cryptographic library uses constant-time code, or when a vendor claims side-channel resistance and you need to check what that claim covers.
Developers reviewing cryptographic libraries and security leads reading vendor claims both need to separate the property from its marketing. The term is discussed in NIST SP 800-227, Recommendations for Key-Encapsulation Mechanisms, which treats side-channel leakage as a deployment concern for key-encapsulation mechanisms, and in several IETF documents cited on this page. Confirm against those sources which primitives and versions a claim covers, because a constant-time claim about one routine says little about the rest of the library.
Post-quantum code makes this more pressing because new algorithms bring new secret-handling operations. The IETF draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05 says an adversary may have access to various side channels and advises implementers to consider implementations resistant to such leakage. RFC 9881 notes that side-channel leakage has been demonstrated in parts of the ML-DSA signing algorithm, that masking countermeasures exist but add performance overhead, and that randomized ML-DSA is easier to harden against fault and hardware side-channel attacks. Ask any vendor which of these countermeasures it applies and at what cost.
Scope matters as much as the claim itself. The mlkem-native README says that project targets resistance against timing side-channels only, and that power and electromagnetic side-channels are currently out of scope. Ask for the attack classes a product covers, and treat a constant-time claim as one control among several, not as full side-channel protection.
Which names and documents use the term constant-time?
This table lists the phrases practitioners meet for the same idea, along with the documents that use each one. Read it to recognize which wording a specification, draft or library is using. The main takeaway is that the names differ across documents, so check each document's own wording before assuming two of them mean the same thing.
| Name as written | Where it appears | What the sources say |
|---|---|---|
| Constant-time implementation | NIST SP 800-227 (final, 18 September 2025) | Covered in the sources as a defense against timing and other side-channel leakage. Confirm the exact wording in the document itself. |
| Self-contained constant-time implementations | RFC 8446, TLS 1.3 (August 2018), Appendix E.4 | TLS 1.3 uses only AEAD algorithms so that implementations can use self-contained constant-time implementations of those primitives. TLS itself adds no side-channel defenses. |
| Side-channel resistant implementation | RFC 10024 (Proposed Standard, August 2026), Section 6 | Encourages implementers to use implementations resistant to side-channel attacks, especially those remote attackers could exploit, and points to NIST SP 800-227. |
| Resistant to such leakage | draft-sfluhrer-cfrg-ml-kem-security-considerations-05 (Informational, 13 May 2026), Section 3 | Says the adversary may have access to various side channels and advises implementers to possibly use an implementation resistant to such leakage. |
| Timing side-channel resistance (scope statement) | mlkem-native README | States the project targets resistance against timing side-channels only, with power and electromagnetic side-channels currently out of scope. |
| Protects the algorithm, not the whole system | FIPS 203, ML-KEM (final, 13 August 2024) | Defines the ML-KEM standard with parameter sets ML-KEM-512, ML-KEM-768 and ML-KEM-1024. Check the standard and its implementation guidance for any side-channel requirements. |
| Protects the algorithm, not the whole system | FIPS 204, ML-DSA (final, 13 August 2024) | Specifies the ML-DSA signature standard. RFC 9881 notes side-channel leakage has been shown in parts of its signing algorithm, with masking available at a performance cost. |
Where constant-time code shows up in TLS, libraries and certificates
Constant-time behavior is rarely named directly in a product configuration, but it appears in the protocol rules, library documentation and certificate profiles you review during a post-quantum migration. The cards below show where readers meet the requirement and what to check at each point.
TLS 1.3 and AEAD-only design
RFC 8446 Appendix E.4 says TLS has no specific defenses against side-channel attacks and leaves that work to the cryptographic primitives. It also says TLS 1.3 uses only AEAD algorithms so that implementations can rely on self-contained constant-time implementations of those primitives. When you review a TLS stack, check which AEAD implementations it links against and whether its vendor documents constant-time behavior for them. The protocol does not enforce this for you, so the protocol text alone does not prove the library is protected.
RFC 8446 textHybrid TLS groups such as X25519MLKEM768
RFC 10024 defines hybrid TLS 1.3 groups including X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024. Its Section 6 encourages implementers to use side-channel resistant implementations, especially where a remote attacker could exploit leakage, and points to NIST SP 800-227. When a vendor lists a hybrid group, ask whether the key exchange code is documented as constant-time and which library provides the ML-KEM part. A group name in a configuration file says nothing about implementation resistance.
RFC 10024 pageML-DSA certificates
RFC 9881 defines X.509 algorithm identifiers for ML-DSA and says in Section 9 that some side-channel leakage has been demonstrated in parts of the signing algorithm. It also says masking countermeasures exist but add performance overhead, and that randomized ML-DSA is easier to harden against fault and hardware side-channel attacks. When a certificate authority or signing service is in scope, ask which signing implementation it uses and what countermeasures it applies. Note that signing is the operation most exposed here, so check the signing side, not just the verification side.
RFC 9881 textThe mlkem-native library
The mlkem-native README describes a project supported by the Post-Quantum Cryptography Alliance under the Linux Foundation. It states the project targets resistance against timing side-channels only, and that power and electromagnetic side-channels are currently out of scope. If your platform embeds this library, record that timing resistance is the claimed property and that other side-channel classes need separate controls. Confirm the version you ship matches the version the README describes, since the stated scope applies to the project as documented, not to every build.
mlkem-native READMEVendor tenders and audit requests
Procurement questionnaires and audit requests often ask whether a product resists side-channel attacks. The sources listed on this page do not give a standard answer format, so ask the vendor to name the library and version behind each cryptographic operation, state whether timing resistance is documented, and say what is not covered, such as power or electromagnetic leakage. NIST SP 800-227, published as final on 18 September 2025, is a reference point for these questions. Treat any answer that says a product is simply secure against side channels as an unsupported claim until the vendor cites its evidence.
NIST SP 800-227How constant-time code limits what a timing observer can learn
A constant-time implementation matters most when the attacker can measure how long a cryptographic operation takes. If execution time changes with a secret key or with message data, an observer who times many operations can infer bits of that secret. Constant-time code is built so that its running time stays the same regardless of those secret values. The observer then gains little from timing, whether the measurement is taken over a network by a remote party or on the same machine by a local process. In practice, this is a property the library author designs for and a property the operator relies on, so it belongs in the review of any cryptographic component that handles keys.
The protocol layer does not supply this protection. RFC 8446, which defines TLS 1.3, states in Appendix E.4 that TLS has no specific defenses against side-channel attacks and leaves that work to the cryptographic primitives. The same appendix notes that TLS 1.3 uses only AEAD algorithms so that implementers can use self-contained constant-time implementations of those primitives. For a team running TLS terminators, key exchange or signing services, the practical step is to ask which library and build provide the primitives, and whether their constant-time behavior has been documented and tested for the versions in production.
A constant-time property holds only for the attack class it targets. The mlkem-native README, from a project supported by the Post-Quantum Cryptography Alliance under the Linux Foundation, says it targets resistance to timing side channels only, and that power and electromagnetic side channels are currently out of scope. The IETF draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05 advises implementers to consider implementations resistant to such leakage where the adversary may have access to side channels. Before relying on a library, confirm which leakage classes its documentation covers and which ones need separate controls.
Which standards and drafts recommend side-channel resistant implementations
Several recent documents recommend that cryptographic code resist side-channel leakage, including timing leakage that a constant-time implementation is designed to prevent. These are recommendations, not certification requirements. The sources listed on this page do not state a mandatory requirement, and no standard here makes constant-time behavior a condition of compliance. The most direct guidance comes from NIST SP 800-227, Recommendations for Key-Encapsulation Mechanisms, which was published as a final document on 18 September 2025 after an initial public draft on 7 January 2025. The IETF's RFC 10024, a Proposed Standard from August 2026, encourages implementers to use implementations resistant to side-channel attacks, especially those a remote attacker could exploit, and points readers to NIST SP 800-227 for further detail.
The IETF draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05, dated 13 May 2026 and classed as Informational, takes the same line. Its Section 3 says an adversary may have access to various side channels and advises implementers to consider an implementation resistant to such leakage. The underlying algorithm documents, FIPS 203 for ML-KEM and FIPS 204 for ML-DSA, were both published as final on 13 August 2024. The sources do not indicate that either FIPS text mandates constant-time behavior as a requirement, so check the published text for the exact wording you need to cite. RFC 9881, which defines X.509 identifiers for ML-DSA, notes that masking countermeasures exist for ML-DSA but carry a performance cost, so plan for that tradeoff when you evaluate a library.
For a review, ask the library vendor or project which side-channel protections it claims, and whether those claims cover timing alone or also power and electromagnetic leakage. The mlkem-native project, for example, states that it targets timing side channels only and that power and electromagnetic side channels are out of scope. Use the cited standards as the reference for what to request, and confirm the version and parameter set you deploy, such as ML-KEM-768, against the vendor's documentation.
What to check in an inventory and from vendors before a migration
This sequence establishes where constant-time claims matter in your environment and what each vendor actually says about its implementations. It produces a documented list of ML-KEM and ML-DSA code locations, vendor answers on library versions and side-channel scope, and a retest record after each upgrade. Work through the steps in order, since later checks depend on the inventory built earlier.
List where ML-KEM and ML-DSA code runs
Start by finding every place in your environment where ML-KEM or ML-DSA operations execute, including TLS terminators, application code, SSH and VPN endpoints, signing services and hardware-backed modules. Record the host, service, language runtime and the library that performs the call. Note which systems handle secret keys on shared hardware or in environments where a remote party can submit inputs and measure response times. The step is complete when each entry names an owner and a concrete component, not a general category like 'crypto library'.
Ask each vendor for its primitive library and version
For every product in the inventory that performs ML-KEM or ML-DSA operations, ask the vendor which library and exact version supplies the primitives. Request whether the library is a reference implementation, an optimized build, or a vendor-maintained fork, and whether the vendor has tested it against timing side channels. The sources on this page do not establish how any particular vendor implements these primitives, so treat the answer as the vendor's own statement. The step is complete when you hold a written answer for each product that names the library and version.
Ask whether the documentation describes side-channel resistance
Ask each vendor whether its documentation states what side-channel resistance the implementation provides, and which attack classes it addresses. Look for explicit statements about constant-time behavior and for any listed exclusions. Compare the answer with the relevant specifications: RFC 8446 says TLS has no defenses of its own against side-channel attacks and relies on the primitives, and the IETF draft on ML-KEM security considerations advises implementers to consider resistant implementations. Record which claims are documented, which are absent, and which are vague. The step is complete when each vendor's answer is filed with a reference to the document that makes it.
Check the scope of each side-channel claim
Read each claim closely to confirm which attack classes it covers. The mlkem-native README states that it targets resistance against timing side channels only, and that power and electromagnetic side channels are currently out of scope. A timing-only claim leaves those other channels unaddressed, so note the gap wherever a product's documentation mentions protection without naming the channel. Mark each entry as covering timing only, covering additional channels, or silent on scope. The step is complete when every claim in the inventory carries a scope label that a reviewer can verify against the cited document.
Confirm the deployed version and build type
Verify the exact version of each library in use on each host, not only the version the vendor advertises. Confirm whether the deployed build is the timing-resistant configuration the vendor describes or a general-purpose build, and check the build flags or package variant where that distinction exists. Compare the running version with the version named in the vendor's answer from the earlier step, and resolve any mismatch with the vendor before proceeding. The check is complete when each inventory entry shows the observed version and build type, with the source of that information recorded.
Retest after every upgrade or configuration change
Repeat the confirmation and scope checks after each library upgrade, configuration change, or vendor patch that touches a primitive in the inventory. The FIPS 203 and FIPS 204 notes say that identified issues will be corrected in future updates, so expect the code to change over time and verify each change rather than assuming continuity. Where your environment allows, run timing tests against the deployed build and compare results with the baseline recorded earlier. The step is complete when each upgrade has a dated entry showing the version tested, the checks performed and the result, and when any open vendor issue has been noted against the affected host.
Common confusions about constant-time claims in vendor documents
Vendor documents and project READMEs often use constant-time language in ways that look broader than they are. The four cards below separate what a constant-time claim covers from what it leaves open, so you can check the right property when you read about any implementation.
Constant-time is not full side-channel resistance
A constant-time implementation is designed to keep running time independent of secret values, which addresses timing leakage. It does not by itself address every side channel. The mlkem-native README says it targets resistance against timing side-channels only and that other attack classes, such as power and electromagnetic side-channels, are currently out of scope. When a vendor says a library is constant-time, ask which side channels the claim covers and whether power and electromagnetic leakage were assessed separately.
mlkem-native READMETLS does not supply the protection
It is easy to assume that a TLS deployment is protected from timing attacks because the protocol is secure. RFC 8446 Appendix E.4 says TLS has no specific defenses against side-channel attacks and leaves that work to the cryptographic primitives. TLS 1.3 uses only AEAD algorithms so that implementations can use self-contained constant-time implementations of those primitives. Check the constant-time properties of the libraries your TLS stack calls, not only the protocol version or cipher suite.
RFC 8446 textHybrid group names are not interchangeable
Vendor configurations often list hybrid TLS groups by name, and the three names look similar. RFC 10024 defines X25519MLKEM768 (4588, 0x11EC), SecP256r1MLKEM768 (4587, 0x11EB) and SecP384r1MLKEM1024 (4589, 0x11ED) as separate groups, each with its own code point. Each name pairs a different classical key exchange with a different ML-KEM parameter set. Confirm which exact group a server or client negotiates, and do not treat a claim about one group as covering the others.
RFC 10024A recommendation is not a certification
Guidance that recommends constant-time or side-channel-resistant implementations is not a certification of any product. RFC 10024 Section 6 encourages implementers to use side-channel-resistant implementations, especially those a remote attacker could exploit, and points to NIST SP 800-227. NIST SP 800-140F covers non-invasive attack mitigation test metrics for validation. When a vendor cites a recommendation, ask for the validation record, module name, version and issuer rather than treating the recommendation as evidence of conformance.
NIST SP 800-227Questions people search about constant-time implementations
What does constant-time mean in cryptographic code?
A constant-time implementation is code whose running time does not depend on secret values such as keys, decapsulated secrets or intermediate state. An attacker who can measure how long an operation takes should learn nothing about the secret from that timing. Constant-time is a property of the code path, not of the algorithm: the same algorithm can be written with secret-dependent branches or table lookups and be vulnerable, or written without them and be resistant. Reviewers usually check for secret-dependent branches, secret-indexed memory accesses and variable-time arithmetic. NIST SP 800-227 lists timing among the characteristics a side-channel attack can exploit, which is why this property matters for key-encapsulation implementations.
Is constant-time implementation standardized?
The sources listed on this page do not describe a single standardized test or certification for constant-time behavior. What they do show is that standards and guidance expect implementers to address side channels. NIST SP 800-227, Recommendations for Key-Encapsulation Mechanisms, was published as a final document on 18 September 2025, after an initial public draft on 7 January 2025, and it covers side-channel leakage as part of implementation guidance. FIPS 203 and FIPS 204 define ML-KEM and ML-DSA, and RFC 10024 encourages implementers to use implementations resistant to side-channel attacks, pointing to NIST SP 800-227. Confirm the current requirements in these documents directly, since they are updated over time.
Does TLS 1.3 provide constant-time implementations?
No. RFC 8446, which defines TLS 1.3, says in Appendix E.4 that TLS has no specific defenses against side-channel attacks and leaves that work to the cryptographic primitives. TLS 1.3 does help by using only AEAD algorithms, so that implementations can use self-contained constant-time implementations of those primitives. Whether a given TLS stack is constant-time therefore depends on the cryptographic library it links against, not on the protocol. For hybrid groups such as X25519MLKEM768 defined in RFC 10024, the protocol negotiates the key exchange while the constant-time properties come from the underlying ML-KEM and elliptic-curve code.
Does my product's cryptographic library use constant-time code?
The sources on this page cannot answer this for any specific product, and you should not assume a product is constant-time because it implements a standard. Start with the vendor's documentation for the exact library name, version and build you run, and look for stated side-channel or constant-time design claims and any test evidence behind them. Then test it yourself: timing measurements across secret-dependent inputs, code review of the hot paths, and reproducible tests in your own environment. The mlkem-native README, supported by the Post-Quantum Cryptography Alliance under the Linux Foundation, says it targets resistance against timing side-channels only and that power and electromagnetic side-channels are currently out of scope. Read other projects' scope statements the same way.
Is timing resistance enough to protect against all side-channel attacks?
No. A constant-time implementation addresses timing leakage. It does not by itself address power analysis, electromagnetic emissions or fault injection. RFC 9881, which defines X.509 identifiers for ML-DSA, says in Section 9 that some side-channel leakage has been demonstrated in parts of the signing algorithm, that masking countermeasures exist but add performance overhead, and that randomized ML-DSA is easier to harden against fault and hardware side-channel attacks. Your threat model decides which channels matter. A server in a data center and an embedded device in the field face different leakage, so confirm which classes a library claims to cover and which it leaves out.
What should I ask a vendor about constant-time behavior?
Ask these questions and request written answers:
- Which library, version and build is covered, and which algorithms (for example ML-KEM-768 or ML-DSA) does the claim apply to?
- Which side-channel classes are in scope (timing, power, electromagnetic, fault), and which are explicitly out of scope?
- What testing supports the claim, such as timing tests, code review or independent evaluation, and when was it last run?
- Does the vendor follow the guidance in NIST SP 800-227 and RFC 10024, and how does it treat known leakage such as the ML-DSA issues in RFC 9881?
- How are patches for side-channel issues delivered, and what is the upgrade path?
Answers should be specific to the version you run.
Can my team test constant-time behavior without a vendor?
Yes, to a degree. Your team can run timing measurements on secret-dependent inputs, review code paths that handle secrets for branches and memory accesses that depend on secret values, and check whether results change with the secret. These tests are imperfect, because environment noise can hide small differences and a clean timing result does not rule out other channels. The cost depends on your in-house skills, the number of libraries you run and how deep you go, and recurs as you upgrade. Independent security testing firms can run these checks for you under a fixed scope agreed in writing before work starts. Confirm scope, deliverables and the library versions covered in that agreement.
How DeployOpen works on this
DeployOpen treats constant-time behaviour as a property to be scoped, tested and documented in each deployment, not assumed from a library name. Engagements are fixed-scope, and the written scope sets which cryptographic components, versions and attack classes are reviewed for timing leakage.
How we scope
- Confirm which key-encapsulation and signature implementations run in your stack and their exact versions.
- Agree in writing whether timing side channels are in scope, since some libraries state they target timing resistance only.
- Record which other side-channel classes, such as power or electromagnetic leakage, are excluded and why.
How we build
- Test the deployed implementations against timing measurements in a controlled environment you approve.
- Check whether TLS endpoints and hybrid groups use constant-time primitives, as RFC 8446 leaves this to the primitives.
- Review signing paths for leakage, since RFC 9881 notes demonstrated leakage in parts of ML-DSA signing.
How we hand over
- Deliver a written report listing each component, version, test method and any timing leakage found.
- Document which side-channel classes were not tested, so auditors can see the boundary of the review.
- Provide remediation steps and a retest, with configuration changes recorded for your compliance evidence.
How we support
- Offer ongoing support as a retainer, covering upgrades when NIST or library maintainers publish corrections.
- Repeat timing tests after library or configuration changes, since a version update can change constant-time behaviour.
- Keep an inventory of implementations so future reviews start from current, documented versions.

