Skip to main content

Drive-by key-extraction cache attacks from portable code


Daniel Genkin, Lev Pachmanov, Eran Tromer and Yuval Yarom


University of Pennsylvania & University of Maryland

Tel-Aviv University

The University of Adelaide


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 constanttime algorithms, such as Curve25519’s, are vulnerable to our attack.

BibTeX Entry

    year             = {2018},
    month            = jul,
    pages            = {83--102},
    publisher        = {No idea},
    paperurl         = {},
    booktitle        = {Applied Cryptography and Network Security},
    author           = {Genkin, Daniel and Pachmanov, Lev and Tromer, Eran and Yarom, Yuval},
    address          = {Leuven, Belgium},
    title            = {Drive-by Key-Extraction Cache Attacks from Portable Code},
    date             = {2018-7-2}