SlideShare a Scribd company logo
LOGO

New Cache Designs for Thwarting
Software Cache-based Side Channel
Attacks - Z. Wang & R. B. Lee

Anestis Bechtsoudis
mpechtsoud@ceid.upatras.gr
Patra 2010
Cache Based Side Channel Attacks

Contents

1

Introduction

2

Threat Model and Attacks

3

Proposed Models

4

Evaluation

5

Conclusions
2

COMPANY LOGO
Cache Based Side Channel Attacks

1.

Introduction

3

COMPANY LOGO
Cache Based Side Channel Attacks

Introduction 1/4
 Information intensive society – imperative
need for security
 Design of cryptographic systems to ensure
the data protection
 Extensive test to cryptosystems over time
 Cryptanalysis: the study of techniques to
reveal the secret parameters of a security
system
4

COMPANY LOGO
Cache Based Side Channel Attacks

Introduction 2/4
 Classical cryptanalysis approach
 Weaknesses in the algorithm – mathematical model
 Attacks based on: ciphertext-only, known plaintext,
chosen plaintext/ciphertext …
 Black box approach of the cryptosystem

 The cryptographic primitive is actually
implemented in hardware
 Modern cryptanalysis: attacker knows much
more for the device – side channel leakage
5

COMPANY LOGO
Cache Based Side Channel Attacks

Introduction 3/4

6

COMPANY LOGO
Cache Based Side Channel Attacks

Introduction 4/4

7

COMPANY LOGO
Cache Based Side Channel Attacks

2.

Threat Model and Attacks

8

COMPANY LOGO
Cache Based Side Channel Attacks

Threat Model and Attacks 1/6
 Goal of the adversary is to learn information
that he has no legitimate access to
 Adversary: one or more unprivileged user
processes, including remote clients, in the
server where the secrets are processed
 No physical access to the device
 Goal achieved by performing legitimate
operations – normal process
 Victim and adversary are isolated processes
9

COMPANY LOGO
Cache Based Side Channel Attacks

Threat Model and Attacks 2/6
Percival’s attack on OpenSSL implementation
of RSA algorithm in a SMT CPU
 RSA core operation: modulo exponentiation –
implemented with a series of ^2 and *
 The encryption key is divided into segments
 For each *, a multiplier is selected from precomputed constants stored in a LUT
 Segment of key is used to index the LUT
10

COMPANY LOGO
Cache Based Side Channel Attacks

Threat Model and Attacks 3/6
 Attacker manages to run simultaneously
 Attack process sequentially and repeatedly
accesses an array, thus loading data to
occupy all cache lines
 At the same time he measures the delay for
each access to detect cache misses (ex. rdtsc
timer in intel x86)
 Victim’s cache accesses evict attacker’s data,
enabling detection from the attacker
11

COMPANY LOGO
Cache Based Side Channel Attacks

Threat Model and Attacks 4/6
Cache

RAM

RSA

Attacker

 The attacker can identify which table entry is
accessed -> the index used -> segment of
the key

12

COMPANY LOGO
Cache Based Side Channel Attacks

Threat Model and Attacks 5/6
Bernstein’s Attack on AES
 AES - “Black Box” software module
 Give inputs and measure computation time
 The execution time is input dependant and
can be exploited to recover secret key
 Attack consists of three phases: Learning,
Attacking and Key Recovery
 Statistical correlation analysis
13

COMPANY LOGO
Cache Based Side Channel Attacks

Threat Model and Attacks 6/6

14

COMPANY LOGO
Cache Based Side Channel Attacks

3.

Proposed Models

15

COMPANY LOGO
Cache Based Side Channel Attacks

Proposed Models 1/4
 Problem -> Directly or indirectly cache
interference
 Learn from attacks and rewrite software
 Solutions are attack specific and performance
degradation (2x, 4x slower)
 Authors attempt to eliminate the root cause
with minimum impact and low cost
 Ideas -> Partitioning - Randomization
16

COMPANY LOGO
Cache Based Side Channel Attacks

Proposed Models 2/4
Partition-Locked Cache (PLCache)
L

ID

Original Cache Line

17

COMPANY LOGO
Cache Based Side Channel Attacks

Proposed Models 3/4
Random Permutation Cache (RPCache)
 Introduce randomization factor – no useful
information about which cache lines evicted
 Memory-to-cache mappings

18

COMPANY LOGO
Cache Based Side Channel Attacks

Proposed Models 4/4

19

COMPANY LOGO
Cache Based Side Channel Attacks

4.

Evaluation

20

COMPANY LOGO
Cache Based Side Channel Attacks

Evaluation 1/

 OpenSSL 0.9.7a AES implementation
 Traditional cache, L1 PLCache and L1 RPCache
 5KByte AES protected data
 L2 large enough – no performance impact
21

COMPANY LOGO
Cache Based Side Channel Attacks

Evaluation 1/

 PLCache & RPCache implemented in M-Sim v2.0

22

COMPANY LOGO
Cache Based Side Channel Attacks

5.

Conclusions

23

COMPANY LOGO
Cache Based Side Channel Attacks

Conclusions
 Cache-based side channel attacks can harm
general purpose cache based systems
 Software solution -> attack specific
 Hardware solutions -> general purpose
 PLCache: minimal hardware cost – software
developer must use different API
 RPCache: area & complexity in hardware – no
special treatment from software developers

24

COMPANY LOGO
LOGO

Anestis Bechtsoudis
mpechtsoud@ceid.upatras.gr
Patra 2010

More Related Content

PPT
Hacking Cisco
PDF
Remote file path traversal attacks for fun and profit
PDF
[CB21] Appearances are deceiving: Novel offensive techniques in Windows 10/11...
PPTX
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
PDF
MIT Bitcoin Expo 2018 - Hardware Wallets Security
PDF
Clang: More than just a C/C++ Compiler
PDF
Frontend Security: Applying Contextual Escaping Automatically, or How to Stop...
PDF
CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)
Hacking Cisco
Remote file path traversal attacks for fun and profit
[CB21] Appearances are deceiving: Novel offensive techniques in Windows 10/11...
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
MIT Bitcoin Expo 2018 - Hardware Wallets Security
Clang: More than just a C/C++ Compiler
Frontend Security: Applying Contextual Escaping Automatically, or How to Stop...
CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)

Similar to Cache based side_channel_attacks Anestis Bechtsoudis (20)

PDF
Report PAPID 7
PDF
Отчет Audit report RAPID7
PDF
2010.hari_kannan.phd_thesis.slides.pdf
PDF
20100309 03 - Vulnerability analysis (McCabe)
PPT
Wireshark Inroduction Li In
PDF
ENPM808 Independent Study Final Report - amaster 2019
PDF
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOs
PDF
Automated prevention of ransomware with machine learning and gpos
PDF
Tricky sample? Hack it easy! Applying dynamic binary inastrumentation to ligh...
PPT
Pacemaker+DRBD
PDF
Monitoring ICS Communications
PPTX
Linux binary analysis and exploitation
PPTX
Big Data for Security - DNS Analytics
PDF
Streaming meetup
PPT
allfiltering dgyfv hfjrg htyuttgjg gy.ppt
PDF
Designing and implementing malicious processors
PDF
Ceph Day Shanghai - On the Productization Practice of Ceph
PDF
Network_Forenic_Training_for_beginner.pdf
PPTX
ASIP (Application-specific instruction-set processor)
PPTX
fjfh mjgkj jkhglkjh jhlkh lhlkkhl kjhjkhjk
Report PAPID 7
Отчет Audit report RAPID7
2010.hari_kannan.phd_thesis.slides.pdf
20100309 03 - Vulnerability analysis (McCabe)
Wireshark Inroduction Li In
ENPM808 Independent Study Final Report - amaster 2019
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOs
Automated prevention of ransomware with machine learning and gpos
Tricky sample? Hack it easy! Applying dynamic binary inastrumentation to ligh...
Pacemaker+DRBD
Monitoring ICS Communications
Linux binary analysis and exploitation
Big Data for Security - DNS Analytics
Streaming meetup
allfiltering dgyfv hfjrg htyuttgjg gy.ppt
Designing and implementing malicious processors
Ceph Day Shanghai - On the Productization Practice of Ceph
Network_Forenic_Training_for_beginner.pdf
ASIP (Application-specific instruction-set processor)
fjfh mjgkj jkhglkjh jhlkh lhlkkhl kjhjkhjk
Ad

More from Information Security Awareness Group (20)

PDF
Securing the Data in Big Data Security Analytics by Kevin Bowers, Nikos Trian...
PPTX
Mobile Device Security by Michael Gong, Jake Kreider, Chris Lugo, Kwame Osaf...
PDF
Mobile Devices – Using Without Losing Mark K. Mellis, Associate Information S...
PPT
IBM Security Strategy Intelligence,
PDF
Addressing Big Data Security Challenges: The Right Tools for Smart Protection...
PDF
Big data analysis concepts and references by Cloud Security Alliance
PDF
Big data analysis concepts and references
PPT
Authorization Policy in a PKI Environment Mary Thompson Srilekha Mudumbai A...
PPT
Introduction to distributed security concepts and public key infrastructure m...
PDF
OThe Open Science Grid: Concepts and Patterns Ruth Pordes, Mine Altunay, Bria...
PDF
Optimal Security Response to Attacks on Open Science Grids Mine Altunay, Sven...
PDF
THE OPEN SCIENCE GRID Ruth Pordes
PPT
Open Science Grid security-atlas-t2 Bob Cowles
PPT
Security Open Science Grid Doug Olson
PPTX
Open Science Group Security Kevin Hill
PDF
Xrootd proxies Andrew Hanushevsky
PPT
Privilege Project Vikram Andem
Securing the Data in Big Data Security Analytics by Kevin Bowers, Nikos Trian...
Mobile Device Security by Michael Gong, Jake Kreider, Chris Lugo, Kwame Osaf...
Mobile Devices – Using Without Losing Mark K. Mellis, Associate Information S...
IBM Security Strategy Intelligence,
Addressing Big Data Security Challenges: The Right Tools for Smart Protection...
Big data analysis concepts and references by Cloud Security Alliance
Big data analysis concepts and references
Authorization Policy in a PKI Environment Mary Thompson Srilekha Mudumbai A...
Introduction to distributed security concepts and public key infrastructure m...
OThe Open Science Grid: Concepts and Patterns Ruth Pordes, Mine Altunay, Bria...
Optimal Security Response to Attacks on Open Science Grids Mine Altunay, Sven...
THE OPEN SCIENCE GRID Ruth Pordes
Open Science Grid security-atlas-t2 Bob Cowles
Security Open Science Grid Doug Olson
Open Science Group Security Kevin Hill
Xrootd proxies Andrew Hanushevsky
Privilege Project Vikram Andem
Ad

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Per capita expenditure prediction using model stacking based on satellite ima...
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine Learning_overview_presentation.pptx
A comparative analysis of optical character recognition models for extracting...
Programs and apps: productivity, graphics, security and other tools
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Cache based side_channel_attacks Anestis Bechtsoudis

  • 1. LOGO New Cache Designs for Thwarting Software Cache-based Side Channel Attacks - Z. Wang & R. B. Lee Anestis Bechtsoudis mpechtsoud@ceid.upatras.gr Patra 2010
  • 2. Cache Based Side Channel Attacks Contents 1 Introduction 2 Threat Model and Attacks 3 Proposed Models 4 Evaluation 5 Conclusions 2 COMPANY LOGO
  • 3. Cache Based Side Channel Attacks 1. Introduction 3 COMPANY LOGO
  • 4. Cache Based Side Channel Attacks Introduction 1/4  Information intensive society – imperative need for security  Design of cryptographic systems to ensure the data protection  Extensive test to cryptosystems over time  Cryptanalysis: the study of techniques to reveal the secret parameters of a security system 4 COMPANY LOGO
  • 5. Cache Based Side Channel Attacks Introduction 2/4  Classical cryptanalysis approach  Weaknesses in the algorithm – mathematical model  Attacks based on: ciphertext-only, known plaintext, chosen plaintext/ciphertext …  Black box approach of the cryptosystem  The cryptographic primitive is actually implemented in hardware  Modern cryptanalysis: attacker knows much more for the device – side channel leakage 5 COMPANY LOGO
  • 6. Cache Based Side Channel Attacks Introduction 3/4 6 COMPANY LOGO
  • 7. Cache Based Side Channel Attacks Introduction 4/4 7 COMPANY LOGO
  • 8. Cache Based Side Channel Attacks 2. Threat Model and Attacks 8 COMPANY LOGO
  • 9. Cache Based Side Channel Attacks Threat Model and Attacks 1/6  Goal of the adversary is to learn information that he has no legitimate access to  Adversary: one or more unprivileged user processes, including remote clients, in the server where the secrets are processed  No physical access to the device  Goal achieved by performing legitimate operations – normal process  Victim and adversary are isolated processes 9 COMPANY LOGO
  • 10. Cache Based Side Channel Attacks Threat Model and Attacks 2/6 Percival’s attack on OpenSSL implementation of RSA algorithm in a SMT CPU  RSA core operation: modulo exponentiation – implemented with a series of ^2 and *  The encryption key is divided into segments  For each *, a multiplier is selected from precomputed constants stored in a LUT  Segment of key is used to index the LUT 10 COMPANY LOGO
  • 11. Cache Based Side Channel Attacks Threat Model and Attacks 3/6  Attacker manages to run simultaneously  Attack process sequentially and repeatedly accesses an array, thus loading data to occupy all cache lines  At the same time he measures the delay for each access to detect cache misses (ex. rdtsc timer in intel x86)  Victim’s cache accesses evict attacker’s data, enabling detection from the attacker 11 COMPANY LOGO
  • 12. Cache Based Side Channel Attacks Threat Model and Attacks 4/6 Cache RAM RSA Attacker  The attacker can identify which table entry is accessed -> the index used -> segment of the key 12 COMPANY LOGO
  • 13. Cache Based Side Channel Attacks Threat Model and Attacks 5/6 Bernstein’s Attack on AES  AES - “Black Box” software module  Give inputs and measure computation time  The execution time is input dependant and can be exploited to recover secret key  Attack consists of three phases: Learning, Attacking and Key Recovery  Statistical correlation analysis 13 COMPANY LOGO
  • 14. Cache Based Side Channel Attacks Threat Model and Attacks 6/6 14 COMPANY LOGO
  • 15. Cache Based Side Channel Attacks 3. Proposed Models 15 COMPANY LOGO
  • 16. Cache Based Side Channel Attacks Proposed Models 1/4  Problem -> Directly or indirectly cache interference  Learn from attacks and rewrite software  Solutions are attack specific and performance degradation (2x, 4x slower)  Authors attempt to eliminate the root cause with minimum impact and low cost  Ideas -> Partitioning - Randomization 16 COMPANY LOGO
  • 17. Cache Based Side Channel Attacks Proposed Models 2/4 Partition-Locked Cache (PLCache) L ID Original Cache Line 17 COMPANY LOGO
  • 18. Cache Based Side Channel Attacks Proposed Models 3/4 Random Permutation Cache (RPCache)  Introduce randomization factor – no useful information about which cache lines evicted  Memory-to-cache mappings 18 COMPANY LOGO
  • 19. Cache Based Side Channel Attacks Proposed Models 4/4 19 COMPANY LOGO
  • 20. Cache Based Side Channel Attacks 4. Evaluation 20 COMPANY LOGO
  • 21. Cache Based Side Channel Attacks Evaluation 1/  OpenSSL 0.9.7a AES implementation  Traditional cache, L1 PLCache and L1 RPCache  5KByte AES protected data  L2 large enough – no performance impact 21 COMPANY LOGO
  • 22. Cache Based Side Channel Attacks Evaluation 1/  PLCache & RPCache implemented in M-Sim v2.0 22 COMPANY LOGO
  • 23. Cache Based Side Channel Attacks 5. Conclusions 23 COMPANY LOGO
  • 24. Cache Based Side Channel Attacks Conclusions  Cache-based side channel attacks can harm general purpose cache based systems  Software solution -> attack specific  Hardware solutions -> general purpose  PLCache: minimal hardware cost – software developer must use different API  RPCache: area & complexity in hardware – no special treatment from software developers 24 COMPANY LOGO