Power, EM and all that: Is your crypto device really secure? Pankaj Rohatgi Dakshi Agrawal, Bruce Archambeault, Suresh Chari, Josyula R Rao IBM T.J. Watson.

Slides:



Advertisements
Similar presentations
Physical Layer: Signals, Capacity, and Coding
Advertisements

Side-Channel Attacks on RSA with CRT Weakness of RSA Alexander Kozak Jared Vanderbeck.
Principles of Electronic Communication Systems
Randomized Signed-Scalar Multiplication of ECC to Resist Power Attacks JaeCheol Ha * and SangJae Moon ** * Korea Nazarene University **
Multiuser Detection for CDMA Systems
"The generation of random numbers is too important to be left to chance.” 1 -- Robert R. Coveyou Oak Ridge National Laboratory.
Information Security – Theory vs. Reality , Winter 2011 Guest Lecturer: Yossi Oren 1.
Whole-Home Gesture Recognition Using Wireless Signals —— MobiCom’13 Author: Qifan Pu et al. University of Washington Presenter: Yanyuan Qin & Zhitong Fei.
Is there Safety in Numbers against Side Channel Leakage? Colin D. Walter UMIST, Manchester, UK
C ● O ● M ● O ● D ● O RESEARCH LAB Longer Keys may Facilitate Side Channel Attacks (Bradford, UK) Colin.
Wide Collisions in Practice Xin Ye, Thomas Eisenbarth Florida Atlantic University, USA 10 th ACNS Singapore.
Theoretical Program Checking Greg Bronevetsky. Background The field of Program Checking is about 13 years old. Pioneered by Manuel Blum, Hal Wasserman,
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization.
Introduction to Mobile Robotics Bayes Filter Implementations Gaussian filters.
EE360: Lecture 8 Outline Multiuser Detection
Digital Voice Communication Link EE 413 – TEAM 2 April 21 st, 2005.
Machine Learning CUNY Graduate Center Lecture 3: Linear Regression.
Probabilistic Robotics
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
Linear and generalised linear models
Radu Muresan CODES+ISSS'04, September 8-10, 2004, Stockholm, Sweden1 Current Flattening in Software and Hardware for Security Applications Authors: R.
Laurent Itti: CS599 – Computational Architectures in Biological Vision, USC Lecture 7: Coding and Representation 1 Computational Architectures in.
COMMUNICATION SYSTEMS- CONTINUOUS
IT-101 Section 001 Lecture #15 Introduction to Information Technology.
Data Communication and Networking 332 Hardware Components of Data Communication.
Machine Learning CUNY Graduate Center Lecture 3: Linear Regression.
1 Secure Cooperative MIMO Communications Under Active Compromised Nodes Liang Hong, McKenzie McNeal III, Wei Chen College of Engineering, Technology, and.
Fault Tolerant Infective Countermeasure for AES
Template attacks Suresh Chari, Josyula R. Rao, Pankaj Rohatgi IBM Research.
1 Introduction to. 2 Contents: DEFINITION OF SPREAD SPECTRUM ( SS ) CHARACTERISTICS OF SPREAD SPECTRUM BASIC PRINCIPLES OF DIRECT SEQUENCE SPREAD SPECTRUM.
9/17/15UB Fall 2015 CSE565: S. Upadhyaya Lec 6.1 CSE565: Computer Security Lecture 6 Advanced Encryption Standard Shambhu Upadhyaya Computer Science &
Wireless Communication Technologies 1 Outline Introduction OFDM Basics Performance sensitivity for imperfect circuit Timing and.
Issues of Security with the Oswald-Aigner Exponentiation Algorithm Colin D Walter Comodo Research Lab, Bradford, UK Colin D Walter.
9th IMA Conference on Cryptography & Coding Dec 2003 More Detail for a Combined Timing and Power Attack against Implementations of RSA Werner Schindler.
1 UCR Hardware Security Primitives with focus on PUFs Slide credit: Srini Devedas and others.
H.M.Gamaarachchi (E/10/102) P.B.H.B.B.Ganegoda (E/10/104)
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
Smart card security Nora Dabbous Security Technologies Department.
The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.
Utilizing Performance Monitors for Compromising keys of RSA on Intel Platforms Sarani Bhattacharya and Debdeep Mukhopadhyay Dept. of Computer Science and.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
Possible Testing Solutions and Associated Costs
Exploiting the Order of Multiplier Operands: A Low-Cost Approach for HCCA Resistance Poulami Das and Debapriya Basu Roy under the supervision of Dr. Debdeep.
Analysis of Optimal and Suboptimal Discrete-Time Digital Communications Receivers Clemson University SURE Program 2005 Justin Ingersoll, Prof. Michael.
A DPA Countermeasure by Randomized Frobenius Decomposition Tae-Jun Park, Mun-Kyu Lee*, Dowon Hong and Kyoil Chung * Inha University.
"The generation of random numbers is too important to be left to chance.” 1 -- Robert R. Coveyou Oak Ridge National Laboratory.
A paper by: Paul Kocher, Joshua Jaffe, and Benjamin Jun Presentation by: Michelle Dickson.
ECE 4710: Lecture #13 1 Bit Synchronization  Synchronization signals are clock-like signals necessary in Rx (or repeater) for detection (or regeneration)
A Biased Fault Attack on the Time Redundancy Countermeasure for AES Sikhar Patranabis, Abhishek Chakraborty, Phuong Ha Nguyen and Debdeep Mukhopadhyay.
M IST : An Efficient, Randomized Exponentiation Algorithm for Resisting Power Analysis Colin D. Walter formerly: (Manchester, UK)
Analyzing Expression Data: Clustering and Stats Chapter 16.
IEEE ARITH 17 Cape Cod, 27th – 29th June 2005 Data Dependent Power Use in Multipliers Colin D. Walter David Samyde
M IST : An Efficient, Randomized Exponentiation Algorithm for Resisting Power Analysis Colin D. Walter (Manchester, UK)
Amplitude/Phase Modulation
1 Information Security – Theory vs. Reality , Winter Lecture 3: Power analysis, correlation power analysis Lecturer: Eran Tromer.
WISA 2007 Jeju Island, Korea, 27th – 29th Aug 2007 Longer Randomly Blinded RSA Keys may be Weaker than Shorter Ones Colin D. Walter
RSA Key Extraction via Low- Bandwidth Acoustic Cryptanalysis Daniel Genkin, Adi Shamir, Eran Tromer.
Machine Learning CUNY Graduate Center Lecture 6: Linear Regression II.
1 Angle Demodulator using AM FM demodulators first generate an AM signal and then use an AM demodulator to recover the message signal.  To transform the.
Yossi Oren, yos strudel bgu.ac.il, yossioren System Security Engineering course, Dec
IT-101 Section 001 Lecture #15 Introduction to Information Technology.
Advanced Information Security 6 Side Channel Attacks
Topics discussed in this section:
School of Mathematical Sciences, University of Nottingham.
Hardware Masking, Revisited
Unknown Input Attacks in the Parallel Setting Improving the Security of the CHES 2012 Leakage Resilient PRF Marcel Medwed François-Xavier Standaert Ventzislav.
Protect Your Hardware from Hacking and Theft
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
Independent Factor Analysis
Colin D. Walter Comodo CA, Bradford, UK
Presentation transcript:

Power, EM and all that: Is your crypto device really secure? Pankaj Rohatgi Dakshi Agrawal, Bruce Archambeault, Suresh Chari, Josyula R Rao IBM T.J. Watson Research Center

Side-Channel Analysis: Some recent advances I: A new side channel: EM emanations –Extends power analysis style attacks to large classes of cryptographic hardware SSL Accelerators, Cryptographic tokens. – Additional leakages compared to power. II: Better Analysis: Template Attacks. –(Near) optimal use of side-channel data. –Single sample attacks for ephemeral keys.

EM History Classified TEMPEST standards. –Partly declassified Jan '01, Other, openly published work on EM. –EM Leakages from Peripherals, E.g., Monitors: Van Eck, Anderson & Kuhn. –EM Leakage from smart-cards during computation. Quisquater & Samyde, E-smart 2001, Gemplus Team [GMO ’01], CHES ’01. –SEMA/DEMA attacks. Best results required decapsulation of chip packaging and/or precise micro-antenna positioning on chip surface

Our EM Work Deeper understanding of EM leakages. –Similar to now declassified TEMPEST literature. Plenty of EM signals are available, provided you know what to look for and where. –Superior signals and attacks possible without micro- antennas or decapsulation. –Some attacks possible from a distance. EM side-channel(s) >> Power side-channel EM can break DPA-resistant implementations.

EM Emanations Background Types of EM Emanations –Direct emanations from intended current flows. Maxwell ’ s equations, Ampere ’ s and Faraday ’ s laws. See [Quisquater,Samyde 01], Gemplus [GMO ’ 01] –Unintentional emanations from coupling effects. Depend on physical factors, e.g., circuit geometry. Most couplings ignored by circuit designers. Manifest as modulation of carriers (e.g. clock harmonics) present/generated/introduced in device. –AM or Angle (FM/Phase) Modulation. Compromising signals available via demodulation.

AM: Example 1 ECCLib on 16Mhz Palm Pilot. –Posted on Internet by Feng Zhu, Northeastern Univ. Point multiplication (k * P) on a Koblitz curve over GF[2^163] using Solinas’s technique. –Doubling replaced by Frobenius Map ( t ) k = S s i t i ( t -adic NAF decomposition) s i 2 {0,1,-1} – Cost of kP ~ |k|/3 ~ 54 point additions/subtractions, Structure can be heard in demo Good signal via AM demodulation at 241Mhz.

Map/(Add/Subtract) Sequence

3 successive Frobenius Map computations

Point Add/Sub

Comparing two different point addition/subraction

AM: Example 2 PCI-bus based RSA Accelerator S inside a Intel/Linux server. Multiple AM modulated carriers. –Several carriers at clock harmonics propogate upto 50 feet and through walls. Precise RSA timing available at 50 feet.

Precise Timing (SSL Music) Music can be heard 50 feet away by AM- demodulating 299MHz clock harmonic carrier. Enables better timing attacks. S looping with ~3s each of –512-bit RSA –1024-bit RSA –2048-bit RSA –4096-bit RSA

RSA Internals in S AM-demodulating an intermodulated carrier at Mhz, bandwidth 150Khz. Clear signal available upto 3-4 feet. –Further distance requires statistical techniques. Large class of attack techniques applicable. – Such techniques earlier restricted to power analysis attacks on RSA in smart-cards.

S: Two identical 2048-bit exponentiations with 12-bit exponent. Data/Modulus Dependent Initialization Data & Key Dependent Exponentiation

S: Initialization (Fixed modulus, 2 exponents X 2 data) E1, D1 E2, D1 E1, D2 E2, D2

S: Data and Key Dependent Exponentiation (2 exponents X 2 data)

Angle Modulation: Example 1 PCI based RSA/Crypto Accelerator R inside an Intel/Linux server. AM-demodulate a 99Mhz carrier (clock harmonic).

R performing an RSA operation in a loop

Internals of RSA Exponentiation in R with small exponent Data/Modulus Dependent Initialization Key & Data Dependent Exponentiation

RSA Exponentiation Key/Data Dependent Internals Obscured by interfering signal G GENERATED asynchronously during operation

Can we get RSA internals ? Not directly…. But, timing of asynchronously generated G affected by ongoing computation due to coupling effects. –Timing statistics of G (using ~1000 samples) gives information about internals!! –G strong enough to be captured at feet.

G: Timing Statistics of G for fixed modulus, 3 exponents (2 same)

EM vs. Power EM may be only side-channel available. Is EM useful in the presence of power channel? –Direct emanations: micro-sensor positioning, decorrelated noise [QS01, GMO 01] –Unintended emanations: Several EM carriers: DEMA/DPA correlation plots show extent of leakage from different EM carriers & comparison with power signal. –Different carriers carry different information. –Some EM leakages substantially different/better than Power leakages.

4 Time Synchronized DPA/DEMA Correlation Plots

Bad Instructions Instructions where some EM leakage >> Power leakage. Typically CPU intensive rather than bus intensive. All architectures have BAD Instructions. Caution: Bad Instructions can break power analysis resistant implementations. Bad Instruction Example: Bit-test on several 6805 based systems leaks tested bit.

O TESTED BIT = 0 IN BOTH TRACES

O TESTED BIT DIFFERENT

Part II: Template Attacks Sometimes a single (few) side-channel sample available. –Stream ciphers, Ephemeral keys. –“System Level Countermeasures” to side channel attacks. Higher level protocols limit key usage. Non-linear key update countermeasure (Kocher et al [KJJ ’99]). Are these inherently immune to side-channel attacks? –Immune to traditional simple/differential attacks Easy to secure implementations against SPA/SEMA –Ensure signal differences < noise level. DPA/DEMA and higher order DPA/DEMA inapplicable. –Cannot remove noise by averaging over multiple samples. –Not against Template Attacks (with some assumptions).

Example: RC4 on a smart-card At best, single trace during RC4 state initialization with ephemeral key available. i= j = 0; for (ctr=0;ctr < 256; ctr++) { j = key[i] + state[ctr] + j; SwapByte(state[ctr], state[j] ); i=i+1; } Can avoid SPA. No DPA style attack possible. One key byte used per iteration. Is a single sample enough to recover the whole key ? Can two fixed keys different in 1 st byte be distinguished during 1 st iteration ?

Power Sample showing 6 iterations of loop

Sample = Signal + Noise

Signals (and signal difference) for two fixed keys with different first byte DIFFUSION Differences start in first iteration (Contamination)

Signals difference for the two fixed keys with different first byte during first iteration of loop (CONTAMINATION) { j = key[i] + state[ctr] + j; SwapByte(state[ctr], state[j] ); i=i+1; }

Sample noise vs. Signal differences (6 iterations)

Sample noise vs. Signal difference in first iteration

Template Attack Basics: How to distinguish between the two keys ? Don’t (cannot) eliminate sample noise, use it! How ? Use identical device (assumption) for building signal and noise templates T1 and T2 for keys K1 and K2 in 1 st iteration. T1 = {s1(t), D 1(t) }, T2= {s2(t), D 2(t) } Given sample S = s(t) use theoretically optimal maximum likelihood estimator: Which noise is more likely ? s(t)-s1(t) under D 1(t) OR s(t)-s2(t) under D 2(t)

Theory vs. Practice Need T1 = {s1(t), D 1(t) }, T2= {s2(t), D 2(t) } s1(t), s2(t) easily estimated by averaging. What about D 1(t) and D 2(t) ? –Can be restricted to L sample points where s1(t) and s2(t) differ, e.g., L=42 in example. –Still infeasible to estimate a general probability dist. over R L. –Borrow from the large body of work in Signal Detection and Estimation Theory which deals with precisely this problem! Several realistic and computable noise models available. We used the popular Multivariate Gaussian Noise model

Mutivariate Gaussian Noise Model Estimating D 1(t), D 2(t) reduces to estimating LxL noise covariance matrices S L:1 and S L:2 for keys K1 and K2 Maximum Likelihood test easy, matrix inverse/ multiplication/determinant and taking logs.

Generalization and Results These 10 keys deliberately chosen to be very close. –Widely different keys easily separated with 100% success even with weaker noise models. Estimated that only a 5-6% error probability in identifying the correct 1 st byte out of 256 possibilities. Key byte 0xFE0xEE0xDE0xBE0x7E0xFD0xFB0xF70xED0xEB Technique generalizes to multiple choices for first key byte: E.g., among these 10 key bytes, correct classification probability:

Attacking multi-byte keys 5-6% error in identifying single byte is too much. Maximum Likelihood: Retains hypothesis with max probability for observed noise (P max ) Approximate Approach: Retain ALL hypotheses with noise probability > (P max /c), c constant. Tradeoff between number of hypothesis retained and correctness.

Approximate Approach Tradeoff c=1c=e 6 c=e 12 c=e 24 Success probability (retaining correct byte hypothesis out of 256) Avg. number of hypothesis retained

Attacking Multi-byte Keys: Extend and Prune Base case: Narrow candidates for first byte to a small number (e.g., on average 1.3 possibilities with 98.67% correctness for c=e 6 ) Assume T i candidates for first i key bytes. –Extend: For each candidate, build larger templates for all 256 possible values of next byte. –Prune : Use approximate approach to reduce 256 T i candidates down to T i+1 < 1.3 * T i (diffusion). Tedious but feasible for reasonable sized keys. –N bytes: Failure probability 1.33N% (N=16, failure prob.= 21.5%) –Number of remaining candidates < 1.3^N (N=16, candidates < 67)

For more information on topics such as –Multiple EM/Power channel attack techniques. –EM vulnerability assessment see & Upcoming CHES Questions?