Automatic Application of Power Analysis Countermeasures Ali Galip Bayrak Francesco Regazzoni David Novo Philip Brisk François-Xavier Standaert Paolo Ienne.

Slides:



Advertisements
Similar presentations
Cipher Techniques to Protect Anonymized Mobility Traces from Privacy Attacks Chris Y. T. Ma, David K. Y. Yau, Nung Kwan Yip and Nageswara S. V. Rao.
Advertisements

Data Dependencies Describes the normal situation that the data that instructions use depend upon the data created by other instructions, or data is stored.
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
White-Box Cryptography
Differential Power Analysis of Smartcards How secure is your private information? Author: Ryan Junee Supervisor: Matt Barrie.
Limits on ILP. Achieving Parallelism Techniques – Scoreboarding / Tomasulo’s Algorithm – Pipelining – Speculation – Branch Prediction But how much more.
Block Ciphers and the Data Encryption Standard
1 Authors: MILENA STANOJLOVIĆ PREDRAG PETKOVIĆ LABORATORY FOR ELECTRONIC DESIGN AUTOMATION Faculty of Electronic Engineering University of Nis.
Polymorphic blending attacks Prahlad Fogla et al USENIX 2006 Presented By Himanshu Pagey.
Extensible Processors. 2 ASIP Gain performance by:  Specialized hardware for the whole application (ASIC). −  Almost no flexibility. −High cost.  Use.
Strong Error Detection for Control Units Against Advanced Attackers Kahraman Daglar Akdemir Advisor: Berk Sunar Electrical and Computer Engineering MOTIVATION.
Exploring timing based side channel attacks against i CCMP Suman Jana, Sneha K. Kasera University of Utah Introduction
This Lecture: AES Key Expansion Equivalent Inverse Cipher Rijndael performance summary.
1 Validation and Verification of Simulation Models.
Testing an individual module
Session 6: Introduction to cryptanalysis part 1. Contents Problem definition Symmetric systems cryptanalysis Particularities of block ciphers cryptanalysis.
Radu Muresan CODES+ISSS'04, September 8-10, 2004, Stockholm, Sweden1 Current Flattening in Software and Hardware for Security Applications Authors: R.
Introduction to Computer and Network Security Iliano Cervesato 26 August 2008 – Modern Cryptography.
SIDE CHANNEL ATTACKS Presented by: Vishwanath Patil Abhay Jalisatgi.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Cryptography Week-6.
Cryptanalysis. The Speaker  Chuck Easttom  
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Managing Multi-Configuration Hardware via Dynamic Working Set Analysis By Ashutosh S.Dhodapkar and James E.Smith Presented by Kyriakos Yioutanis.
Fault Tolerant Infective Countermeasure for AES
Linear Fault Analysis of Block Ciphers Zhiqiang Liu 1, Dawu Gu 1, Ya Liu 1, Wei Li 2 1. Shanghai Jiao Tong University 2. Donghua University ACNS 2012 June.
Data Structures & AlgorithmsIT 0501 Algorithm Analysis I.
The Effects of Ranging Noise on Multihop Localization: An Empirical Study from UC Berkeley Abon.
Computer Science Open Research Questions Adversary models –Define/Formalize adversary models Need to incorporate characteristics of new technologies and.
LOGO Hardware side of Cryptography Anestis Bechtsoudis Patra 2010.
Resynchronization Attacks on WG and LEX Hongjun Wu and Bart Preneel Katholieke Universiteit Leuven ESAT/COSIC.
The Misuse of RC4 in Microsoft Office A paper by: Hongjun Wu Institute for Infocomm Research, Singapore ECE 578 Matthew Fleming.
Data Reduction. 1.Overview 2.The Curse of Dimensionality 3.Data Sampling 4.Binning and Reduction of Cardinality.
1 Exploring Custom Instruction Synthesis for Application-Specific Instruction Set Processors with Multiple Design Objectives Lin, Hai Fei, Yunsi ACM/IEEE.
Projekt „ESSNBS“ Niš, November 4 th – 7 th, DAAD Design and Simulation of Multiplexer Cell Resistant to Side Channel Attacks.
Swankoski MAPLD 2005 / B103 1 Dynamic High-Performance Multi-Mode Architectures for AES Encryption Eric Swankoski Naval Research Lab Vijay Narayanan Penn.
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
Sandrine AGAGLIATE, FTFC Power Consumption Analysis and Cryptography S. Agagliate Canal+Technologies P. Guillot Canal+Technologies O. Orcières Thalès.
CS 211: Computer Architecture Lecture 6 Module 2 Exploiting Instruction Level Parallelism with Software Approaches Instructor: Morris Lancaster.
1 Code optimization “Code optimization refers to the techniques used by the compiler to improve the execution efficiency of the generated object code”
Secure and Energy-Efficient Disjoint Multi-Path Routing for WSNs Presented by Zhongming Zheng.
A Configurable High-Throughput Linear Sorter System Jorge Ortiz Information and Telecommunication Technology Center 2335 Irving Hill Road Lawrence, KS.
CprE 458/558: Real-Time Systems
An EDA-Friendly Protection Scheme against Side-Channel Attacks Ali Galip Bayrak 1 Nikola Velickovic 1, Francesco Regazzoni 2, David Novo 1, Philip Brisk.
Exploiting Cache-Timing in AES: Attacks and Countermeasures Ivo Pooters March 17, 2008 Seminar Information Security Technology.
A paper by: Paul Kocher, Joshua Jaffe, and Benjamin Jun Presentation by: Michelle Dickson.
A Biased Fault Attack on the Time Redundancy Countermeasure for AES Sikhar Patranabis, Abhishek Chakraborty, Phuong Ha Nguyen and Debdeep Mukhopadhyay.
The RC5 Encryption Algorithm: Two Years On Lisa Yin RC5 Encryption –Ron Rivest, December 1994 –Fast Block Cipher –Software and Hardware Implementations.
CRYPTOGRAPHY PRESENTED BY : NILAY JAYSWAL BRANCH : COMPUTER SCIENCE & ENGINEERING ENTRY NO. : 14BCS033 1.
Coevolutionary Automated Software Correction Josh Wilkerson PhD Candidate in Computer Science Missouri S&T.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
A Memory-hierarchy Conscious and Self-tunable Sorting Library To appear in 2004 International Symposium on Code Generation and Optimization (CGO ’ 04)
CS519, © A.SelcukDifferential & Linear Cryptanalysis1 CS 519 Cryptography and Network Security Instructor: Ali Aydin Selcuk.
1 Information Security – Theory vs. Reality , Winter Lecture 3: Power analysis, correlation power analysis Lecturer: Eran Tromer.
1 A New Weakness in the RC4 Keystream Generator and an Approach to Improve the Security of the Cipher Souradyuti Paul and Bart Preneel K.U. Leuven, ESAT/COSIC.
Learning A Better Compiler Predicting Unroll Factors using Supervised Classification And Integrating CPU and L2 Cache Voltage Scaling using Machine Learning.
@Yuan Xue CS 285 Network Security Block Cipher Principle Fall 2012 Yuan Xue.
AppAudit Effective Real-time Android Application Auditing Andrew Jeong
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
Overview on Hardware Security
Automatic Application of Power Analysis Countermeasures
Xin Fang, Pei Luo, Yunsi Fei, and Miriam Leeser
New Cache Designs for Thwarting Cache-based Side Channel Attacks
Ali Galip Bayrak EPFL, Switzerland June 7th, 2011
High-Level Synthesis for Side-Channel Defense
Dynamic High-Performance Multi-Mode Architectures for AES Encryption
Information Theoretical Analysis of Digital Watermarking
Presentation transcript:

Automatic Application of Power Analysis Countermeasures Ali Galip Bayrak Francesco Regazzoni David Novo Philip Brisk François-Xavier Standaert Paolo Ienne EE260 Presentation by Joshua Potter

Overview Motivation ▫Side Channel Attacks ▫Power Analysis Attacks Counter Measures ▫Random Pre-Charging ▫Boolean Masking The Proposed Compiler ▫Information Leak Analysis, Static vs. Dynamic ▫Code Identification and Transformation ▫Local and Global Counter Measures Results Discussion 2/46

Motivation Historically, attacks on cryptosystems have attempted to exploit the weaknesses of cryptographic algorithms in terms of their mathematical structure Typically, it has been the responsibility of hardware designers or software engineers to determine the weaknesses of a given cryptosystem which requires a detailed understanding of the: ▫Cryptographic algorithm at the core of the cryptosystem ▫Hardware platform on which the system runs ▫Countermeasure mechanism 3/46

Side Channel Attacks Require no specific knowledge about the inner workings of the device under attack, nor the underlying implementation of the cryptographic cipher The attacker only needs to know which algorithm is being executed on the device under attack, which is usually publicly known Examples ▫Power Consumption ▫Electromagnetic Radiation ▫Sound Emission ▫Timing 4/46

Side Channel Attacks To perform these attacks, an adversary gains access to the device, and encrypts a statistically significant number of plaintexts The attacker measures the side-channel information as the program executes, and uses statistical methods to associate it with a subset of the bits of the key Provided sufficient time and plaintext, an attacker can uncover the value of each and every bit of the key using this approach 5/46

Power Analysis Attacks Power analysis attacks rely on the fact that the instantaneous power consumption of most modern CMOS devices is strongly correlated with the data that is being processed at the same instant The attacker provides different inputs to the cryptosystem running on the device, and measures the real-time power consumption of each input After the measurements are completed, the attacker statistically analyzes the relationship between the inputs and collected power traces 6/46

Side Channel Attack Countermeasures Many countermeasures have been proposed to protect against side-channel attacks, typically, a countermeasure is proposed for a specific attack ▫Unlikely that a universal countermeasure will be found for silicon devices To date, these countermeasures are inserted manually by experts in side-channel protection; ▫These experts are often not those who implemented the cryptosystem that is being protected 7/46

Countermeasures Software countermeasures include: ▫Random insertion of dummy instructions ▫Shuffling ▫Random pre-charging ▫Boolean and arithmetic masking 8/46

The Proposed Compiler Focuses on power-based side-channel attacks ▫Could easily be applied to other attacks, particularly EM- and acoustic-based ones Automatically applies known software countermeasures to cryptographic software to protect against side-channel attacks The user selects which countermeasure to apply and the compiler inserts it automatically 9/46

Compiling Counter Measures The application of these countermeasures can significantly impact performance and code size It is impractical to protect every instruction instance in a cryptographic implementation The objective of the compiler is to automatically identify a subset of the implementation for protection, while meeting a user-specified level of security. 10/46

Countermeasures Random Pre-charging ▫is selected as an example of countermeasures which need local analysis and code transformations Boolean masking ▫A more advanced countermeasure requiring global treatment. The compiler can automatically detect and protect all instructions that leak critical information; ▫The resulting program ensures the same level of protection with modest run time and code-size overheads 11/46

Compilation Flow 1.Information Leakage Analysis identifies the instructions that are sensitive to side-channel attacks ▫The compiler can analyze the traces of real side-channel measurements if the user provides traces; alternatively, it can perform static analysis 2.Transformation Target Identification ▫Looks at data dependencies involving the sensitive instructions to determine larger groups of instructions that require protection to ensure security 3.Code Transformation ▫Applies the protection mechanism on instructions identified 12/46

Compiler Stages 13/46

Information Leakage Analysis Methods Static analysis ▫Decompiles the assembly to indentify instructions that operate on critical data and their dependencies ▫Requires no manual intervention from the user ▫Does not allow for platform-specific considerations ▫Could be overly protective Dynamic analysis ▫Requires the user to acquire power traces off-line ▫Exploits highly accurate device specific leakage information 14/46

Information Leakage Analysis The input to this step is an assembly language implementation of a cryptographic algorithm that requires protection The output is a set of annotations that indicate the sensitivity of each instruction 15/46

Why at the Assembly Level? By operating on assembly instructions, rather than a higher level representation, the countermeasures applied do not alter the output behavior of the program A strong optimizing compiler, which is unaware of this behavior, could recognize these countermeasures as redundant code, and eliminate them in an effort to improve performance and reduce code size 16/46

Static Analysis The compiler decompiles and identifies the idioms (a), and constructs the CFG (b), and DFG (c); afterwards, the DFG is analyzed to determine the sensitive operations. 17/46

Static Analysis An idiom is a group of instructions that defines a single operation which the compiler constructs basic blocks so that each of them contains a single idiom The CFG preserves the control structure of the application The DFG facilitates propagation of relevant information, such as sensitivity and protection requirements ▫The compiler analyzes the DFG to determine which idioms are sensitive and require protection 18/46

Dynamic Analysis Dynamic analysis uses empirical measurements to determine the sensitivity of each instruction The user provides an assembly language implementation of the cryptographic algorithm and power traces acquired by executing different pairs on the target platform The compiler produces a set of annotations that indicate the sensitivity of each instruction 19/46

Dynamic Analysis Before running the compiler, power traces can be obtained via measurement with an oscilloscope The measurements are suggested to be taken at a high frequency and then compressed to obtain a single power measurement for each clock cycle High frequency sampling is to get better accuracy, whereas compression is to obtain a single sensitivity value for each instruction and for efficiency of the analysis 20/46

Dynamic Analysis The compiler automatically performs the following steps for dynamic analysis: 1.The power traces are analyzed, and the sensitivity of each clock cycle is determined using an information theoretic metric, which estimates the amount of information that the system leaks 2.Clock cycles whose sensitivity exceeds a user-provided threshold are marked as sensitive 3.The compiler associates each clock cycle from the traces with an assembly instruction 4.The most sensitive clock cycle associated with each instruction defines the sensitivity of that instruction 21/46

Determining Sensitivity Values 22/46

Metric for Sensitivity Evaluation Let K, X, L and respectively be random variables representing the secret key, plaintext, and information leakage from the physical device which is obtained via power trace analysis; and k, x, and l, be realizations of K, X, and L from an execution of the algorithm. Leakage is normally distributed with mean μ and standard deviation sigma where the probability density function of L is: The conditional entropy of L given is 23/46

Transformation Target Identification Once sensitive instructions have been identified, the compiler automatically selects transformation targets which are instructions to protect For relatively simple countermeasures, such as random pre-charging and random delay insertion, a peephole optimization suffice 24/46

Transformation Target Identification Other countermeasures, such as masking and instruction shuffling protect idioms that depend on critical data and its control dependencies The program slicing technique is used to group the sensitive idioms that have dependencies A forward slice contains all idioms in a program that may be affected by a given set of variables at some point in the program As a result, transformation targets of countermeasures that use dependencies of idioms are forward slices constructed for all of the critical data in the program 25/46

Code Transformation The compiler applies the appropriate code transformation to the transformation targets identified The protected assembly language program is returned as output 26/46

Local Code Transformations Random pre-charging ▫The data path is randomly charged before and after a critical instruction using randomly generated operands ▫effective on devices that have high dynamic power consumption The key idea is to randomize the bits and therefore power consumption on the critical components, such as a register or data bus 27/46

Local Code Transformations The protection offered by random pre-charging differ for each device, depending on its power consumption characteristics. For example, random pre-charging would not offer protection for devices that employ pre- charged busses. 28/46

Global Code Transformations Boolean masking known to provide strong protection against first-order attacks Boolean masking XOR’s the intermediate results of a computation with some uniformly random values (masks) so that none of the intermediate values are revealed 29/46

Global Code Transformations Each slice identified for protection includes a set of idioms that directly access critical data followed by their ancestors that depend on the critical data The compiler first applies the masks at the sources then traverses the slice forward, propagating the masks along to intermediate nodes Masks are removed at the sinks at the end of slice 30/46

Mask Application and Propagation 31/46

Masking Linear Operations For maximum security, the compiler never reveals the intermediate values It also does not generate an assembly language program that performs two consecutive operations whose Hamming distance is equal to an intermediate value 32/46

Masking Non-Linear Operations Cryptographic algorithms use non-linear operations to obscure the relationship between plaintext and cipher text Non-linear operations are generally the target of side channel attacks, because they highlight the difference between incorrect and correct key guesses; this increases the probability of a successful attack Non-linear operations are typically implemented as lookup tables in software 33/46

Experimental Setup Random pre-charging selected as an example of a countermeasure for which peephole optimization suffices Boolean masking is an example of a countermeasure that requires global code transformation for proper insertion AES and Clefia were the two block ciphers used as benchmarks 34/46

Experimental Setup Attacks actually performed and counter measures tested on real-world device 35/46

Random Pre-charging Results Sensitivity values for each clock cycle during the execution of one round of the unprotected AES implementation. Higher sensitivity values means higher vulnerability to side-channel attacks 36/46

Random Pre-charging Results Sensitivity values for the partially-protected implementation are below the threshold value of 0.4 during every clock cycle 37/46

Reduction in Sensitivity Values For the protected code segment, the sensitivity of all instructions is now below the threshold 38/46

Random Pre-charging Results Random pre-charging is automatically applied on each implementation, using two different threshold values: the 0.4 and zero (for full protection) The partially-protected version of each implementation achieves the same level of security as the fully-protected version with up to 52% runtime and 48% code-size improvement 39/46

Instruction Overhead % for Partial Protection % for Full Protection 40/46

Code Size Overhead % for Partial Protection % for Full Protection 41/46

Boolean Masking Results Performance hit ranged from 4%-66% Code size increased between 19% and 66% 42/46

Discussion Information leakage analysis and transformation target identification are generic and can be used for the application of any countermeasure Code transformations are countermeasure specific and have to be extended to support different countermeasures 43/46

Discussion The proposed compiler: ▫Automatically determines and protects the most sensitive instructions, while obtaining comparable security to fully-protected implementations, with much less overhead ▫Can be used by software engineers who do not have any background in cryptography 44/46

Discussion None of the known countermeasures guarantee perfect security! They increase the effort required to mount a successful attack 45/46

Thank you!