What is a timing attack in cryptography?

A timing attack learns secret values from how long cryptographic operations take to run. This page explains where it appears in post-quantum libraries and protocols, and what it means for your migration.

On this page

What is a timing attack in cryptography?

A timing attack is a side-channel attack that infers secret values from the time an operation takes to run. Rather than breaking the mathematics of an algorithm, the attacker measures how long a computation takes and uses differences in that duration to learn something about the key or other secret data being processed. NIST SP 800-227 defines a side-channel attack as an attack enabled by the leakage of information from a deployed cryptosystem, and names timing alongside power consumption and electromagnetic and acoustic emissions as exploitable characteristics. Timing is the one of these leakage paths a remote attacker can sometimes exploit over a network, which is why it comes up in software reviews as well as hardware work.

You are most likely to meet this term in a library review, a penetration test finding, an audit request or a vendor's security documentation. A reviewer might ask whether a decapsulation or signing routine is constant-time, or a vendor questionnaire might ask whether an implementation is hardened against side channels. Protocol and algorithm documents also use the term. RFC 8446 (TLS 1.3, August 2018) states that TLS has no specific defenses against side-channel attacks and leaves that work to the cryptographic primitives. RFC 10024 (Proposed Standard, August 2026) encourages implementers to use implementations resistant to side-channel attacks, especially those a remote attacker could exploit, and points to NIST SP 800-227 for guidance.

For post-quantum work, the term matters because the new algorithms have to be implemented with the same discipline as the classical ones. The IETF draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05 (Informational, 13 May 2026) says the adversary may have access to various side channels and advises implementers to consider an implementation resistant to such leakage. RFC 9881 (Standards Track, October 2025), which defines ML-DSA identifiers for X.509, reports that some side-channel leakage has been demonstrated in parts of the ML-DSA signing algorithm and that masking countermeasures exist but add performance overhead. The mlkem-native README says that project targets resistance to timing side channels only, and that other classes such as power and electromagnetic side channels are out of scope.

What to do with this: when a library or appliance claims side-channel resistance, ask which classes it covers. Timing resistance is not the same as protection against power or electromagnetic analysis, and a vendor's claim should name the leakage classes and the versions tested. Confirm the current status of any stated countermeasure against the library's own release notes and the cited standard, since the sources listed here do not say how a given product performs in practice. Use the sibling page on constant-time implementations to review what a time-invariant design looks like in code.

Which names and documents use the term timing attack

This table lists the parent term, the documents that discuss timing attacks, and the ML-KEM parameter sets that appear beside the term. Each row names one source or term and says what it covers for timing attacks. Read it to find which document to check for a given question, and note that this page covers the timing class only.

NameTypeWhat it says about timing attacks
Side-channel attackParent term (NIST CSRC glossary)Defined as an attack enabled by leakage of information from a deployed cryptosystem. Timing is one of the listed exploitable characteristics.
NIST SP 800-227Recommendations documentDiscusses timing as a side channel for key-encapsulation mechanisms. Published as final on 18 September 2025.
RFC 8446, Appendix E.4TLS 1.3 specificationStates that TLS has no specific side-channel defenses and relies on constant-time primitives, which TLS 1.3 enables by using only AEAD algorithms.
RFC 9881, Section 9X.509 ML-DSA identifiersNotes that side-channel leakage has been demonstrated in parts of the ML-DSA signing algorithm, and that randomized ML-DSA is easier to harden.
draft-sfluhrer-cfrg-ml-kem-security-considerations-05IETF draft (Informational)Section 3 says the adversary may use side channels and advises implementations resistant to such leakage.
ML-KEM-512Parameter set (FIPS 203)Appears beside the timing discussion as one of three ML-KEM parameter sets. Confirm which implementation covers it.
ML-KEM-768Parameter set (FIPS 203)Appears beside the timing discussion as one of three ML-KEM parameter sets. Confirm which implementation covers it.
ML-KEM-1024Parameter set (FIPS 203)Appears beside the timing discussion as one of three ML-KEM parameter sets. Confirm which implementation covers it.

Where practitioners meet timing attacks in post-quantum work

Timing attacks reach post-quantum work through the implementations that run the new algorithms, through the protocols that carry them, and through the documents and reviews that ask how those implementations were built. The cards below show where an engineer, tester or reviewer is most likely to face the question, and what each source says about it.

TLS 1.3 implementations

RFC 8446 says TLS has no specific defenses against side-channel attacks and leaves that work to the cryptographic primitives. It also notes that TLS 1.3 uses only AEAD algorithms so that implementations can use self-contained constant-time implementations of those primitives. When reviewing a TLS stack, check whether the library's primitives are documented as constant-time, since the protocol itself will not provide that protection.

RFC 8446 text

Hybrid key exchange groups

RFC 10024 defines the hybrid TLS 1.3 groups X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024. Its Section 6 encourages implementers to use side-channel resistant code, especially where a remote attacker could exploit the leakage. Check which library provides each hybrid group in the version you deploy, and ask the vendor how that implementation handles secret-dependent operations.

RFC 10024 record

ML-DSA signing implementations

RFC 9881 Section 9 states that some side-channel leakage has been demonstrated in parts of the ML-DSA signing algorithm. It also says masking countermeasures exist but carry performance overhead, and that randomized ML-DSA is easier to harden against fault and hardware side-channel attacks. When a signing library or hardware module is in scope, ask whether it applies masking and whether it uses the randomized variant.

RFC 9881 text

ML-KEM libraries

The mlkem-native README states that the project targets resistance against timing side-channels only, and that other classes such as power and electromagnetic side-channels are currently out of scope. An ML-KEM library choice therefore covers timing but not the other leakage channels. Confirm the scope the library claims and where the deployment's threat model needs more.

mlkem-native README

Vendor documents and audit questions

Vendors and assessors may ask whether a cryptographic module has been tested for non-invasive attacks, which covers timing. NIST SP 800-140F, published as final in March 2020, lists the CMVP approved test metrics for non-invasive attack mitigation. Ask vendors which of these metrics their module was tested against, and request the validation record that names the module and version.

NIST SP 800-140F

Implementation guidance for ML-KEM

The IETF draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05, dated 13 May 2026, says the adversary may have access to various side channels and advises implementers to consider an implementation resistant to such leakage. It is an informational draft, not a standard, so treat its advice as guidance to weigh against your own threat model. NIST SP 800-227, published as final on 18 September 2025, is the reference RFC 10024 points to on this topic.

ML-KEM considerations draft

How a timing attack exploits running code

A timing attack works by measuring how long a cryptographic operation takes and correlating those measurements with secret values. The attacker does not need to break the underlying math. Instead, they watch a running implementation perform a decapsulation, a signing operation or a comparison, record the elapsed time across many attempts, and look for patterns that depend on the secret being processed. NIST SP 800-227 lists timing among the characteristics that side-channel attacks can exploit in a deployed cryptosystem, which places this threat in how code runs rather than in the algorithm itself. For a developer reviewing a cryptographic library, the question to ask is whether any branch, memory access or early return depends on secret data, because that dependence is what gives the attacker a signal to correlate.

For a timing attack to succeed, the attacker must be able to observe timing, and that observation does not always require physical access. The sources supplied for this page describe timing as one of several leakage channels, alongside power consumption and electromagnetic emissions, but timing is the one that can be observed remotely. The IETF draft on ML-KEM security considerations advises implementers to consider implementations resistant to side-channel leakage, and RFC 10024 specifically encourages resistance to side-channel attacks that remote attackers could exploit. Whether a given deployment is reachable this way depends on its network position, its response behavior and how much noise surrounds each measurement, so the reader should confirm those conditions for their own environment rather than assume them. The sources do not quantify how many measurements a remote attacker would need, so that figure should be requested from the implementation's testing evidence or the vendor's documentation.

Practical risk review starts with the implementation, not the standard. The mlkem-native README states that the project targets resistance against timing side-channels only, and it lists other attack classes as currently out of scope, so a reader cannot assume that one library's coverage extends to power or electromagnetic leakage. When evaluating a library or product for post-quantum use, ask the vendor or maintainer which side-channel classes they tested, whether they document constant-time behavior for secret-dependent operations, and whether any independent review has covered the code. Request the evidence in writing and file it with the migration inventory, because the answers differ by version and build, and the reader should confirm them for the exact release they plan to run.

Which standards address timing attacks and when they were published

Several documents address timing attacks, but they differ in status. NIST SP 800-227, Recommendations for Key-Encapsulation Mechanisms, is a final document, published on 18 September 2025 after an initial public draft on 7 January 2025. It names timing among the exploitable characteristics of a deployed cryptosystem, alongside power consumption and electromagnetic and acoustic emissions, and it is the document the IETF points implementers to for side-channel guidance. FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA) are final NIST standards, both published on 13 August 2024. A NIST note dated 17 November 2025 says an identified issue in FIPS 203 will be corrected in a future update, and a note dated 31 July 2026 says minor issues listed in an errata spreadsheet will be corrected for FIPS 204. Confirm the current revision and errata status on the NIST pages before citing either one.

The IETF documents split the same way. RFC 8446 (TLS 1.3, August 2018) is a Standards Track document. Its Appendix E.4 says TLS has no specific defenses against side-channel attacks and leaves that work to the cryptographic primitives, and it restricts TLS 1.3 to AEAD algorithms so implementations can use self-contained constant-time code. RFC 9881 (October 2025, Standards Track) covers X.509 identifiers for ML-DSA. Its Section 9 reports side-channel leakage demonstrated in parts of the signing algorithm and notes that masking countermeasures exist at a performance cost. RFC 10024 is a Proposed Standard dated August 2026 that defines the hybrid TLS 1.3 groups and encourages implementers to use side-channel-resistant code, especially where remote attackers could exploit leakage. draft-sfluhrer-cfrg-ml-kem-security-considerations-05, dated 13 May 2026, is an Informational draft, not a standard, and advises implementers to consider leakage-resistant implementations.

What these documents ask of an implementer is a resistant implementation, not a certified one. None of them makes a product compliant. Ask your library or appliance vendor which of these documents its ML-KEM and ML-DSA code follows, whether it has been tested against timing leakage, and which version it ships. The mlkem-native README states that its project targets timing side-channel resistance only and that power and electromagnetic side channels are out of scope, so a timing review does not cover those classes. Record which standard, draft or project each claim rests on so the evidence stays checkable.

How a timing attack moves from code to recovered secret

The attacker starts by sending many requests to a running cryptographic operation, such as a decapsulation or signing routine, and records how long each response takes. Those measurements are then correlated with candidate secret values, so that variable running time reveals which inputs were slower or faster. Once the correlation is strong enough, the attacker recovers the secret. A constant-time implementation branch removes the dependency: when running time no longer depends on secret values, the correlation step produces nothing. Check each library's code path for secret-dependent branches and memory access, and confirm the claim against the version you run.

Timing attack path from measurement to recovered secret, with the constant-time defense branch.

What to check for timing attacks during a post-quantum migration

This sequence gives teams a repeatable way to find where ML-KEM, ML-DSA and decapsulation run on reachable paths, and to record what each library and vendor says about timing resistance. The output is an inventory with vendor answers and retest evidence that a reviewer can check against each upgrade.

  1. Inventory network-reachable ML-KEM and ML-DSA components

    Identify every component that performs ML-KEM encapsulation or decapsulation, or ML-DSA signing, on a path an attacker can reach over the network. This includes TLS terminators, VPN gateways, application servers that run hybrid key exchange, and services that sign certificates or tokens. For each component, record the product, version, library and the protocol group it negotiates, such as the hybrid TLS 1.3 groups defined in RFC 10024. The step is complete when every reachable component appears in one list with its owner. Network-reachable paths matter most, because RFC 10024 specifically encourages implementations resistant to side-channel attacks that remote attackers could exploit.

  2. Confirm timing resistance claims for each library

    For each library on the inventory, read its documentation and determine whether it states that it targets timing resistance. The mlkem-native README, for example, says it targets resistance against timing side-channels only, and that other classes such as power and electromagnetic side channels are currently out of scope. Record the exact wording, the version it applies to and the source URL. Where a library says nothing on timing, record that the documentation is silent and do not infer a claim. The step is complete when each component has a recorded statement, or a recorded absence of one, with its version attached.

  3. Ask vendors which side-channel classes they test

    Send each vendor a written question asking which side-channel classes they test for, which they leave out of scope, and how they handle the classes they do not test. Ask specifically whether timing is covered, and whether power, electromagnetic and fault classes are covered, since NIST SP 800-227 names timing, power consumption and electromagnetic and acoustic emissions as exploitable characteristics. Ask for the test method, the version tested and the date of the last test. The step is complete when each vendor has answered in writing, and each answer is filed with the component it covers. Answers that name a class as out of scope are useful, because they show where additional controls must come from.

  4. Check whether signing uses randomized ML-DSA

    For every component that signs with ML-DSA, determine whether the signing mode is randomized. RFC 9881 says that some side-channel leakage has been demonstrated in parts of the ML-DSA signing algorithm, that masking countermeasures exist but carry performance overhead, and that randomized ML-DSA is easier to harden against fault and hardware side-channel attacks. Record the configured mode for each signer, and the library setting or configuration key that controls it. The step is complete when every signer has a recorded mode, and any deterministic signer is flagged for review by its owner.

  5. Retest after each library upgrade

    After any upgrade to a library, product or configuration on the inventory, rerun the timing checks you chose for that component and compare the results against the prior baseline. Include the version before and after the change, the test method, and the pass or fail result. Re-read the vendor answers, because a change in version can change the claimed scope. The step is complete when the retest output is stored with the upgrade record. Retesting after each upgrade keeps the evidence matched to the version actually running, which matters because the sources say compatibility and fixes are tied to specific versions.

  6. Record evidence for each component and review

    Combine the inventory, library statements, vendor answers, signing modes and retest results into one evidence record per component. Assign an owner who reviews each record and marks any gap, such as a missing vendor answer or an out-of-scope class with no compensating control. Store the record where security and compliance reviewers can read it during assessments. The step is complete when every component on the inventory has a current record, each gap has a named owner, and the record shows the version it describes. This record is what a reviewer will ask for, and it is evidence of your checks rather than a certification that a product is safe.

Where readers mix up timing attacks with other terms

Readers meet timing attacks alongside power analysis, constant-time implementation, and the broad side-channel label, often in vendor documents. These cards separate what each term measures or covers, so you can tell which claim a product actually makes.

Timing attack versus power analysis

A timing attack measures how long an operation takes. A power analysis attack measures the power a device draws while it runs. Both are side-channel attacks, but they read different physical quantities, so a defense against one does not automatically cover the other. NIST SP 800-227 lists timing and power consumption as separate exploitable characteristics. When reviewing a product, ask which measured quantity its testing covers.

NIST SP 800-227

Timing attack versus constant-time implementation

A timing attack is the threat: an attacker learns secrets from how long operations take. A constant-time implementation is a defense: code whose running time does not depend on secret values. The two are not the same thing. RFC 8446 notes that TLS itself has no specific defenses against side-channel attacks and relies on the cryptographic primitives, which can use self-contained constant-time implementations. When reviewing a library, check whether its primitives are constant-time, not only whether the term appears in its documentation.

RFC 8446

Vendor claims of side-channel resistance

Some vendors state that a product resists side channels without naming which classes it covers. That phrase can mean timing resistance, power resistance, or both, and the sources do not treat it as equivalent. The mlkem-native project, for example, states that it targets resistance against timing side channels only, and that power and electromagnetic side channels are currently out of scope. Ask the vendor to name each class it tested, the method used, and the version it applies to.

mlkem-native README

The broad side-channel label

Older documents and some tools use side-channel attack to cover any leakage class at once. NIST SP 800-227 defines a side-channel attack as an attack enabled by leakage from a deployed cryptosystem, and names timing, power consumption, and electromagnetic and acoustic emissions as examples. Because the label is broad, a finding of side-channel in a report does not say which class was tested. Confirm the specific class before you accept a result as covering timing attacks.

NIST CSRC glossary

Questions readers ask about timing attacks

What does timing attack mean in cryptography?

A timing attack is an attack that learns a secret by measuring how long an operation takes to run. If the time an implementation spends depends on secret values, such as key bits or intermediate results, an observer who can measure those durations may infer the secret. The attack does not break the underlying mathematics. It exploits the way the code runs on a real system, which is why it is classed as an implementation attack. The term is used in NIST's glossary under the broader heading of side-channel attacks, and the sources on this page describe timing as one of the leakage characteristics that such attacks can exploit.

Is a timing attack the same as a side-channel attack?

A timing attack is one kind of side-channel attack, not a separate category. NIST SP 800-227 defines a side-channel attack as an attack enabled by the leakage of information from a deployed cryptosystem, and it names timing alongside power consumption and electromagnetic and acoustic emissions as exploitable characteristics. So every timing attack is a side-channel attack, but not every side-channel attack is a timing attack. Teams reviewing a library should treat timing as one channel among several, and should check which of the others apply to their deployment.

Is protection against timing attacks standardized?

The standards do not define a timing attack protection as a single requirement, but they point implementers toward it. 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. RFC 8446 (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, and it notes that TLS 1.3 uses only AEAD algorithms so that implementations can use constant-time primitives. The IETF draft draft-sfluhrer-cfrg-ml-kem-security-considerations-05 advises implementers to possibly use implementations resistant to such leakage. Confirm the exact requirements in the document your auditors cite.

Are post-quantum cryptography products exposed to timing attacks?

Post-quantum implementations can be exposed to timing leakage like any other cryptographic code, and the sources on this page do not claim otherwise. RFC 9881, which defines X.509 identifiers for ML-DSA, notes in Section 9 that some side-channel leakage has been demonstrated in parts of the signing algorithm, and that masking countermeasures exist but carry performance overhead. The mlkem-native project states that it targets resistance against timing side-channels only, and that other classes such as power and electromagnetic side-channels are currently out of scope. Exposure depends on the specific library, version and deployment, so ask the vendor which channels its implementation is tested against.

What changes in a migration when timing attacks matter?

A migration to post-quantum algorithms adds new code paths that handle secret values, so each new implementation needs review for timing leakage, not only the classical code it replaces. Teams should inventory which libraries provide the ML-KEM and ML-DSA operations in their stack, since FIPS 203 and FIPS 204 define the algorithms and implementations differ in how they handle secrets. Where a library is replaced, the change should be retested. The RFC 10024 hybrid TLS groups are one example where implementers are encouraged to use side-channel resistant implementations, particularly where a remote attacker could exploit leakage. Plan for this review as part of the migration work, not after it.

What should I ask a vendor about timing attacks?

Ask which side channels the vendor's implementation is designed and tested to resist, and whether timing resistance is claimed for the exact version you run. Ask whether the implementation is constant-time for operations that handle secrets, and what testing supports that claim. Ask whether the product has been reviewed against NIST SP 800-227 and how it addresses the channels that the sources on this page mention, such as power and electromagnetic leakage, if your threat model includes them. Ask for the version, edition and component each answer applies to. Vendor answers are their own statements, so verify them with your own testing where the risk warrants it.

How DeployOpen works on this

DeployOpen reviews timing exposure as part of post-quantum deployment work, looking at the code that handles secret values in the cryptographic libraries and services a client runs. The review is scoped in writing, built into the client's own infrastructure, and handed over with documentation the client's security and compliance teams can check.

How we scope

  • Engagements are fixed-scope, with the systems, libraries and endpoints to review agreed in writing before work starts.
  • The written scope lists which post-quantum components are in view, such as ML-KEM or ML-DSA implementations and the TLS 1.3 hybrid groups in use.
  • Ongoing review of timing exposure can be offered as a retainer when the client's deployments change over time.

How we build

  • We set up the deployment inside the client's own cloud accounts, data centers or air-gapped networks, with no outside hosting.
  • We check which cryptographic implementations claim constant-time behavior, and test their running time against secret inputs.
  • We document where a library addresses timing leakage only, since some implementations state that power and electromagnetic leakage is out of scope.

How we hand over

  • The handover includes findings that name the component, version and code path where timing behavior was observed.
  • Each finding comes with a recommended fix, such as a constant-time implementation or a configuration change, and a retest plan.
  • Documentation is written so the client's auditors and compliance teams can review the evidence themselves.

How we support

  • After handover, we retest affected components when the client upgrades a library or moves to a newer library version.
  • Support covers updates for new revisions, such as the planned corrections noted for FIPS 203 and FIPS 204, when they are published.
  • Ask any provider, including DeployOpen, to confirm which versions were tested and which components remain out of scope.

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.