Full AES key extraction in 65 milliseconds using cache attacks

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

AES Side Channel Attacks
Rohit Kugaonkar CMSC 601 Spring 2011 May 9 th 2011
Fabián E. Bustamante, Spring 2007
Xiutao Feng Institute of Software Chinese Academy of Sciences A Byte-Based Guess and Determine Attack on SOSEMANUK.
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
White-Box Cryptography
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Wide Collisions in Practice Xin Ye, Thomas Eisenbarth Florida Atlantic University, USA 10 th ACNS Singapore.
Symmetric Encryption Example: DES Weichao Wang. 2 Overview of the DES A block cipher: – encrypts blocks of 64 bits using a 64 bit key – outputs 64 bits.
Exploring timing based side channel attacks against i CCMP Suman Jana, Sneha K. Kasera University of Utah Introduction
1 Information Security – Theory vs. Reality , Winter 2011 Lecture 1: Introduction Eran Tromer.
Cryptanalysis through Cache Address Leakage Eran Tromer Adi Shamir Dag Arne Osvik.
Towards Application Security On Untrusted OS
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Lecture 3: Cryptographic Tools modified from slides of Lawrie Brown.
1 Introduction to Security and Cryptology Enterprise Systems DT211 Denis Manley.
1 Introduction to Information Security , Spring 2013 Lecture 9: Trusted computing architecture (cont.) Side-channel attacks Eran Tromer Slides.
On Recycling Encryption Schemes or
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Cryptography and Network Security
CS110: Computers and the Internet Encryption and Certificates.
ICOM Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark.
Blowfish A widely used block cipher. Blowfish Designed by Bruce Schneier (1993) A variant of it (Twofish) was an AES finalist candidate 64-bit block size,
1 Information Security – Theory vs. Reality , Winter Lecture 1: Introduction Eran Tromer with guest appearance by Daniel Genkin.
CSCE 201 Introduction to Information Security Fall 2010 Data Protection.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
The Latest Attacks on AES Mehrdad Abdi 1 بسم الله الرحمن الرحیم.
Hardware-Software Integrated Approaches to Defend Against Software Cache-based Side Channel Attacks Jingfei Kong* University of Central Florida Onur Acıiçmez.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Exploiting Cache-Timing in AES: Attacks and Countermeasures Ivo Pooters March 17, 2008 Seminar Information Security Technology.
The “Taint” Leakage Model Ron Rivest Crypto in the Clouds Workshop, MIT Rump Session Talk August 4, 2009.
Architectural Side Channels in Cloud Computing
Cache Attacks and Countermeasures:
1 Information Security – Theory vs. Reality , Winter Lecture 1: Introduction Eran Tromer with guest appearance by Daniel Genkin.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
Encryption CS110: Computer Science and the Internet.
CRYPTOGRAPHY PRESENTED BY : NILAY JAYSWAL BRANCH : COMPUTER SCIENCE & ENGINEERING ENTRY NO. : 14BCS033 1.
1 Information Security – Theory vs. Reality , Winter Lecture 1: Introduction, Architectural side channels 1/2 Lecturer: Eran Tromer.
Chapter 2 Symmetric Encryption.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
OWASP AppSec Israel, 13/Oct/2015 Yossi Oren, Ben Gurion University Joint work with Vasileios P. Kemerlis,
1 Information Security – Theory vs. Reality , Winter Lecture 3: Power analysis, correlation power analysis Lecturer: Eran Tromer.
RSA Key Extraction via Low- Bandwidth Acoustic Cryptanalysis Daniel Genkin, Adi Shamir, Eran Tromer.
Lecture 3 Page 1 CS 236 Online Introduction to Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 5 Page 1 CS 236 Online More on Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
CST 312 Pablo Breuer. A block of plaintext is treated as a whole and used to produce a ciphertext block of equal length Typically a block size of 64 or.
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Modeling security 1. Models - encryption r Alice and Bob have the same key k r Alice and Bob exchange encrypted messages r Eve wants to get the plaintext.
หัวข้อบรรยาย Stream cipher RC4 WEP (in)security LFSR CSS (in)security.
Thwarting cache-based side- channel attacks Yuval Yarom The University of Adelaide and Data61.
Cache Advanced Higher.
Overview on Hardware Security
Provides Confidentiality
Triple DES.
New Cache Designs for Thwarting Cache-based Side Channel Attacks
Written by : Thomas Ristenpart, Eran Tromer, Hovav Shacham,
Information Security – Theory vs
RIC: Relaxed Inclusion Caches for Mitigating LLC Side-Channel Attacks
Bruhadeshwar Meltdown Bruhadeshwar
Lecture 3: Symmetric Key Encryption
Implementation of IDEA on a Reconfigurable Computer
csci5233 computer security & integrity (Chap. 4)
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Landon Cox January 17, 2018 January 22, 2018
MicroScope: Enabling Microarchitectural Replay Attacks
Presentation transcript:

Full AES key extraction in 65 milliseconds using cache attacks Dag Arne Osvik Adi Shamir 1 Eran Tromer 1 1 Weizmann Institute of Science

Main memory CPU CPU cache memory CPU core

Cache Attacks The state of the cache persists between processes, resulting in inter-process contention for cache resources. The data in the memory and caches is protected by virtual memory mechanisms, but the metadata is unprotected. This causes a leak of information about memory access patterns. … which can be exploited cryptanalytically (e.g., breaking AES) … very efficiently (e.g., just 300 encryptions for a known-plaintext attack) … or in a very powerful attack model (no knowledge of plaintexts or ciphertexts)

Past works on cache attacks Covert channels [Hu ‘92] Theoretical attacks [Page ‘02] Timing attacks using internal collisions in block ciphers [Tsunoo Tsujihara Minematsu Miyuachi ’02] [Tsunoo Saito Suzaki Shigeri Miyauchi ’03] Recently: Timing attacks on AES based on external collisions [Bernstein ’04] Cache probing attack, Improved timing attacks via cache modeling, “Hyper Attacks” on AES [Osvik Shamir Tromer ’05] “Hyper Attacks” on RSA [Percival ’05] UPDATES

A typical software implementation of AES char p[16], k[16]; // plaintext and key int32 T0[256],T1[256],T2[256],T3[256]; // lookup tables int32 Col[4]; // intermediate state ... /* Round 1 */ Col[0] T0[p[ 0]©k[ 0]]  T1[p[ 5]©k[ 5]]  T2[p[10]©k[10]]  T3[p[15]©k[15]]; Col[1] T0[p[ 4]©k[ 4]]  T1[p[ 9]©k[ 9]]  T2[p[14]©k[14]]  T3[p[ 3]©k[ 3]]; Col[2] T0[p[ 8]©k[ 8]]  T1[p[13]©k[13]]  T2[p[ 2]©k[ 2]]  T3[p[ 7]©k[ 7]]; Col[3] T0[p[12]©k[12]]  T1[p[ 1]©k[ 1]]  T2[p[ 6]©k[ 6]]  T3[p[11]©k[11]]; lookup index = plaintext  key (and the parameters are favorable to the attack)

Associative memory cache memory block (64 bytes) main memory cache set (4 cache lines) cache line (64 bytes) cache

AES tables in memory T0 DRAM cache

Detecting access to AES tables (basic idea) Attacker memory T0 DRAM cache

Attack 1: Evict+Time Selectively manipulate the state of the cache (e.g., evict a full cache set) Trigger encryption Measure how long it took Deduce what cache sets it accessed … cryptanalyze Our experimental result When attacking OpenSSL AES encryptions, can recover full key using 35 seconds of measurements.

Attack 2: Prime+Probe Fill cache with attacker’s own data Trigger encryption Time access to attacker memory to see if it is still in cache Deduce what cache sets the encryption accessed … cryptanalyze Oblivious to timing variability in attacker code, hence applicable to larger real systems.

Attack 2 Our experimental results: When attacking OpenSSL AES encryptions: Full key recovery using 16 milliseconds of measurements (300 encryptions with known inputs). Next talk: If you have known outputs, 30 encryptions suffice. When attacking a Linux dm-crypt AES encrypted filesystem (complicated system call going through filesystem, VM, scheduler…): Full key recovery using 65 milliseconds of measurements (800 encryptions) and 3 seconds of off-line analysis.

Attack 3: “Hyper Attack” No explicit interaction between attacker and victim. No knowledge of specific plaintexts or ciphertexts. One implementation exploits HyperThreading. Fill cache with attacker’s data Wait for someone else to perform encryption Time access to attacker memory to see if it is still in cache Deduce what cache sets the encryption accessed … cryptanalyze based on knowledge of prior distribution of plaintexts/ciphertexts

Experimental results measuring OpenSSL AES encryption of English text

Implications Impact: Easy to deploy – pure software Hard to detect Multiuser systems VPNs Virtual machines Trusted computing Sandboxes (JVM, JavaScript) Remote attacks Easy to deploy – pure software Hard to detect Hard to protect efficiently Full paper on my webpage: http://www.wisdom.weizmann.ac.il/~tromer