Paper 2018/119

Drive-by Key-Extraction Cache Attacks from Portable Code

Daniel Genkin, Lev Pachmanov, Eran Tromer, and Yuval Yarom


We show how malicious web content can extract cryptographic secret keys from the user's computer. The attack uses portable scripting languages supported by modern browsers to induce contention for CPU cache resources, and thereby gleans information about the memory accesses of other programs running on the user's computer. We show how this side-channel attack can be realized in both WebAssembly and PNaCl; how to attain very fine-grained measurements; and how to use these to extract ElGamal, ECDH and RSA decryption keys from various cryptographic libraries. The attack does not rely on bugs in the browser's nominal sandboxing mechanisms, or on fooling users. It applies even to locked-down platforms with strong confinement mechanisms and browser-only functionality, such as Chromebook devices. Moreover, on browser-based platforms the attacked software too may be written in portable JavaScript; and we show that in this case even implementations of supposedly-secure constant-time algorithms, such as Curve25519's, are vulnerable to our attack.

Available format(s)
Publication info
Preprint. MINOR revision.
Side-channel attackcache attackweb page confinementElGamalRSAECDH
Contact author(s)
tromer @ cs tau ac il
2018-01-31: received
Short URL
Creative Commons Attribution


      author = {Daniel Genkin and Lev Pachmanov and Eran Tromer and Yuval Yarom},
      title = {Drive-by Key-Extraction Cache Attacks from Portable Code},
      howpublished = {Cryptology ePrint Archive, Paper 2018/119},
      year = {2018},
      note = {\url{}},
      url = {}
Note: In order to protect the privacy of readers, does not use cookies or embedded third party content.