Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 1282

Timing Attack

Reviewed byCybersecurity entrepreneur & security researcher

What is Timing Attack?

Timing AttackA side-channel attack that recovers secret information by measuring how long an operation takes under different inputs.


Timing attacks exploit input-dependent execution time in cryptographic and authentication code. Classic targets are non-constant-time string comparisons (an early-mismatch byte short-circuits and reveals how far the guess matched), modular exponentiation (square-and-multiply leaking key bits), AES table lookups affected by cache state, and account lookups whose duration reveals whether a username exists. Even nanosecond differences can be amplified by averaging thousands of measurements to suppress network jitter.

Paul Kocher's 1996 paper first weaponized this against RSA and Diffie-Hellman. Crucially, Brumley and Boneh's 2003 "Remote Timing Attacks Are Practical" (USENIX Security) extracted an OpenSSL 0.9.7 RSA private key over a network, exploiting timing variation in Montgomery reduction and the Karatsuba/normal multiplication switch — this is why OpenSSL enabled RSA blinding by default. Lucky Thirteen (CVE-2013-0169, 2013) recovered TLS plaintext by measuring MAC-verification time differences in CBC-mode padding handling.

flowchart TD
  A[Attacker submits many crafted inputs] --> B[Measure precise response time]
  B --> C[Average samples to cancel jitter]
  C --> D{Time correlates<br/>with secret?}
  D -->|Yes| E[Infer one bit/byte of secret]
  E --> F[Repeat, narrowing key space]
  F --> G[Full secret recovered]
  D -->|No| H[Constant-time code: no leak]

Defences require constant-time implementations: branch-free conditional moves, fixed-time comparisons (crypto_memcmp, Python's hmac.compare_digest, Java's MessageDigest.isEqual), blinding for RSA/ECC, and cache-hardened cipher primitives. Automated tooling (dudect, ctgrind, MicroWalk) helps audit for data-dependent timing, and rate-limiting narrows the attacker's measurement budget at network boundaries.

Examples

  1. 01

    Kocher's 1996 timing attack recovering RSA/Diffie-Hellman private-key bits.

  2. 02

    Lucky Thirteen (CVE-2013-0169) — a TLS CBC padding timing attack.

Frequently asked questions

What is Timing Attack?

A side-channel attack that recovers secret information by measuring how long an operation takes under different inputs. It belongs to the Vulnerabilities category of cybersecurity.

What does Timing Attack mean?

A side-channel attack that recovers secret information by measuring how long an operation takes under different inputs.

How do you defend against Timing Attack?

Defences for Timing Attack typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Timing Attack?

Common alternative names include: Timing side-channel.

Related terms

See also