Research Library · Idea
Timing attacks
Timing attacks are side-channel attacks that recover secret keys from how long a system takes to perform cryptographic operations. Paul Kocher's paper “Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems”, published in the proceedings of CRYPTO '96, showed that by carefully measuring the time required for private-key operations an attacker may be able to find fixed Diffie-Hellman exponents, factor RSA keys and break other cryptosystems, often with only known ciphertext; it named cryptographic tokens and network-based cryptosystems among the systems potentially at risk 1.
Kocher's starting point was that cryptosystems often take slightly different amounts of time to process different inputs, because of optimisations that bypass unnecessary operations, branches and conditional statements, RAM cache hits, and processor instructions such as multiplication and division that run in non-fixed time 1. Against modular exponentiation with a secret exponent, the attacker times many operations on known inputs and works through the exponent bit by bit: for each guess it simulates the steps so far, and correctly simulated steps reduce the variance of the remaining measured time, while a wrong guess tends to show up later, which gives the attack an error-detection property 1.
The paper also showed why simple defences fall short. Always performing the optional multiplication step does not make an implementation run in constant time, because the squaring operation and later loop iterations still leak; random delays only raise the number of samples needed, roughly as the square of the timing noise 1. Kocher recommended adapting blinding techniques so that the attacker does not know the input to the modular exponentiation 1.
Until 2003, published timing attacks had targeted hardware security tokens such as smartcards, and it was generally believed that general-purpose servers were not exposed. David Brumley and Dan Boneh's “Remote Timing Attacks are Practical”, at the 12th USENIX Security Symposium, challenged that belief: using about a million queries they extracted a 1024-bit RSA private key from an OpenSSL 0.9.7 server in about two hours, between machines in different buildings with three routers and multiple switches between them 2. Blinding was available in OpenSSL but not enabled by default before version 0.9.7b, which defeats the attack 2.
Symmetric ciphers leak through timing too. In 2004 Daniel Bernstein showed that a simple cache-timing attack against AES software reveals some key bits, because it is difficult for software to perform an array lookup in time independent of the array index; he warned that using secret data as an array index is a recipe for disaster 3. The 2023 update of FIPS 197 notes that physical implementations may leak key-dependent information through the time taken to perform a computation and that cache-timing attacks may affect AES software, while placing such protections outside the scope of the standard itself 4.
Source · Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems (opens in a new tab) · Paul C. Kocher, Advances in Cryptology, CRYPTO '96
References
- Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems (opens in a new tab) · Paul C. Kocher, Advances in Cryptology, CRYPTO '96 (Springer LNCS), author copy ↩ ↩ ↩ ↩ ↩
- Remote Timing Attacks are Practical (opens in a new tab) · David Brumley and Dan Boneh, 12th USENIX Security Symposium (2003), author copy at Stanford University ↩ ↩
- Cache-timing attacks on AES (opens in a new tab) · Daniel J. Bernstein, University of Illinois at Chicago · November 21, 2004 ↩
- FIPS 197, Advanced Encryption Standard (AES), updated text (opens in a new tab) · National Institute of Standards and Technology · May 9, 2023 · Section 6.4 on implementation attacks. ↩
Research articles
- Secrecy as mathematics: a reader in cryptography from Shannon's secrecy paper to provable security and the timing leak · Cybersecurity foundations
- The bit, the channel and the code: a reader in information theory from Shannon and Hamming to the side channel · Computer science
- CISSP Domain 3: security architecture and engineering, taught for the exam · Cybersecurity foundations
In the news
See what connects to it on the map of ideas →

SecSIG