[Paper Review] TPM-FAIL: TPM meets Timing and Lattice Attacks
This paper demonstrates that timing side-channel vulnerabilities in TPM 2.0 devices—specifically in Intel's firmware-based TPM and an STMicroelectronics hardware TPM—enable recovery of 256-bit ECDSA and ECSchnorr private keys using lattice-based cryptanalysis. The attack succeeds in under two minutes on Intel fTPM after ~1,300 observations and recovers keys from a CC EAL 4+-certified hardware TPM in fewer than 40,000 observations.
Trusted Platform Module (TPM) serves as a hardware-based root of trust that protects cryptographic keys from privileged system and physical adversaries. In this work, we perform a black-box timing analysis of TPM 2.0 devices deployed on commodity computers. Our analysis reveals that some of these devices feature secret-dependent execution times during signature generation based on elliptic curves. In particular, we discovered timing leakage on an Intel firmware-based TPM as well as a hardware TPM. We show how this information allows an attacker to apply lattice techniques to recover 256-bit private keys for ECDSA and ECSchnorr signatures. On Intel fTPM, our key recovery succeeds after about 1,300 observations and in less than two minutes. Similarly, we extract the private ECDSA key from a hardware TPM manufactured by STMicroelectronics, which is certified at Common Criteria (CC) EAL 4+, after fewer than 40,000 observations. We further highlight the impact of these vulnerabilities by demonstrating a remote attack against a StrongSwan IPsec VPN that uses a TPM to generate the digital signatures for authentication. In this attack, the remote client recovers the server's private authentication key by timing only 45,000 authentication handshakes via a network connection. The vulnerabilities we have uncovered emphasize the difficulty of correctly implementing known constant-time techniques, and show the importance of evolutionary testing and transparent evaluation of cryptographic implementations. Even certified devices that claim resistance against attacks require additional scrutiny by the community and industry, as we learn more about these attacks.
Motivation & Objective
- To investigate whether TPM 2.0 devices exhibit secret-dependent timing behavior during elliptic curve signature generation.
- To evaluate the feasibility of recovering 256-bit ECDSA and ECSchnorr private keys from timing side-channel leakage in TPMs.
- To demonstrate a practical remote key recovery attack on a StrongSwan IPsec VPN using network-based timing measurements.
- To highlight the limitations of current constant-time implementation practices and certification processes in cryptographic hardware.
Proposed method
- Conducted black-box timing analysis on TPM 2.0 devices deployed in commodity systems to measure execution time variations during signature generation.
- Collected timing measurements from both firmware-based (Intel fTPM) and hardware-based (STMicroelectronics) TPMs during ECDSA and ECSchnorr signing operations.
- Applied lattice-based cryptanalysis techniques to the collected timing data to recover the private key from the observed timing leakage.
- Constructed a remote attack on a StrongSwan IPsec VPN by measuring timing of 45,000 network-based authentication handshakes to extract the server's private key.
- Used statistical modeling to correlate timing variations with secret scalar values in elliptic curve operations.
- Evaluated the effectiveness of timing leakage exploitation despite claims of constant-time implementation and Common Criteria certification.
Experimental results
Research questions
- RQ1Can timing side-channel leakage be exploited to recover 256-bit private keys from TPM 2.0 devices during ECDSA and ECSchnorr signature generation?
- RQ2To what extent do certified TPMs, such as the STMicroelectronics hardware TPM at CC EAL 4+, remain vulnerable to timing-based key recovery attacks?
- RQ3How practical is a remote network-based attack that leverages timing side channels to extract private keys from a TPM-protected system?
- RQ4What are the implications of timing leakage in TPMs for the security of widely deployed cryptographic protocols like IPsec?
- RQ5Can lattice-based techniques effectively recover secrets from low-precision timing measurements in real-world TPM implementations?
Key findings
- The Intel firmware-based TPM (fTPM) exhibited secret-dependent timing during ECDSA and ECSchnorr signature generation, enabling key recovery after approximately 1,300 timing observations in under two minutes.
- A hardware TPM from STMicroelectronics, certified at Common Criteria EAL 4+, was compromised after fewer than 40,000 timing observations, demonstrating that certification does not guarantee resistance to timing attacks.
- A remote attack on a StrongSwan IPsec VPN was successfully executed by measuring timing of 45,000 network-based authentication handshakes, leading to full private key recovery.
- The attack succeeded despite the TPMs' claims of constant-time implementation, indicating that subtle side-channel leaks can persist even in formally verified and certified systems.
- Lattice-based cryptanalysis was effective in recovering 256-bit elliptic curve private keys from timing data, even with limited observation counts and imperfect timing resolution.
- The results underscore the difficulty of correctly implementing constant-time code and the need for continuous community scrutiny and evolutionary testing of cryptographic implementations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.