Cryptology ePrint Archive: Report 2018/119

Drive-by Key-Extraction Cache Attacks from Portable Code

Daniel Genkin and Lev Pachmanov and Eran Tromer and Yuval Yarom

Abstract: 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.

Category / Keywords: implementation / Side-channel attack, cache attack, web page confinement, ElGamal, RSA, ECDH

Date: received 31 Jan 2018

Contact author: tromer at cs tau ac il

Available format(s): PDF | BibTeX Citation

Version: 20180131:202745 (All versions of this report)

Short URL:

Discussion forum: Show discussion | Start new discussion

[ Cryptology ePrint archive ]