Information Security Theory vs. Reality

Similar documents
אני יודע מה עשית בפענוח האחרון: התקפות ערוצי צד על מחשבים אישיים

אני יודע מה עשית בפענוח האחרון : התקפות ערוצי צד על מחשבים אישיים

Stealing Keys from PCs by Radio: Cheap Electromagnetic Attacks on Windowed Exponentiation

DUBLIN CITY UNIVERSITY

Side Channel Attacks on Smartphones and Embedded Devices using Standard Radio Equipment

Electromagnetic-based Side Channel Attacks

Local and Direct EM Injection of Power into CMOS Integrated Circuits.

Chapter-15. Communication systems -1 mark Questions

The number theory behind cryptography

Is Your Mobile Device Radiating Keys?

Current Probe. Inspector Data Sheet. Low-noise, high quality measurement signal for side channel acquisition on embedded devices.

Evaluation of On-chip Decoupling Capacitor s Effect on AES Cryptographic Circuit

Data security (Cryptography) exercise book

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

Investigation of a Voltage Probe in Microstrip Technology

One&Done: A Single-Decryption EM-Based Attack on OpenSSL s Constant-Time Blinded RSA

Testing Upstream and Downstream DOCSIS 3.1 Devices

Diffie-Hellman key-exchange protocol

High-Speed RSA Crypto-Processor with Radix-4 4 Modular Multiplication and Chinese Remainder Theorem

An on-chip glitchy-clock generator and its application to safe-error attack

When Electromagnetic Side Channels Meet Radio Transceivers

ElGamal Public-Key Encryption and Signature

Cryptography, Number Theory, and RSA

Debugging EMI Using a Digital Oscilloscope. Dave Rishavy Product Manager - Oscilloscopes

NUMERICAL METHODOLOGY FOR THE EMI RISK ASSESSMENT OF VEHICULAR ANTENNAS

A Design for Modular Exponentiation Coprocessor in Mobile Telecommunication Terminals

Microphonics. T. Powers

EMC Seminar Series All about EMC Testing and Measurement Seminar 1

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Public-Key Cryptosystem Based on Composite Degree Residuosity Classes. Paillier Cryptosystem. Harmeet Singh

Lecture 6. Angle Modulation and Demodulation

Exercise 2: FM Detection With a PLL

DUBLIN CITY UNIVERSITY

Announcements : Wireless Networks Lecture 3: Physical Layer. Bird s Eye View. Outline. Page 1

Power Analysis Attacks on SASEBO January 6, 2010

CHAPTER -15. Communication Systems

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.

Measurement of the THz comb with a spectrum analyzer

Special-Purpose Operational Amplifier Circuits

Lock in Amplifier. Introduction. Motivation. Liz Schell and Allan Sadun Project Proposal

Investigation of Electromagnetic Field Coupling from DC-DC Buck Converters to Automobile AM/FM Antennas

Related Ideas: DHM Key Mechanics

EMC Simulation of Consumer Electronic Devices

Todd Hubing. Clemson Vehicular Electronics Laboratory Clemson University

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT 678A 40MHZ TO 900MHZ DIRECT CONVERSION QUADRATURE DEMODULATOR

The EM Side Channel(s)

Classical Cryptography

Gilbert Cell Multiplier Measurements from GHz II: Sample of Eight Multipliers

Antenna Measurements using Modulated Signals

Cryptanalysis on short messages encrypted with M-138 cipher machine

Green ADVANTAGES. Spectrum Analyzer Two models available: 24 GHz and 8 GHz SPECTRUM ANALYZER. Antenna Panel Inputs. Auxiliary Antenna Inputs OSCOR

Overview. Lecture 3. Terminology. Terminology. Background. Background. Transmission basics. Transmission basics. Two signal types

SEMS SHIELDING EFFECTIVENESS MEASUREMENT SYSTEM IN MRI AND SHIELDED ENVIRONMENT. ELECTRIC AND MAGNETIC FIELD FROM 10 khz TO 300 MHz*

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2

EE 418: Network Security and Cryptography

RFID Systems: Radio Architecture

Comparison of Electromagnetic Side-Channel Energy Available to the Attacker from Different Computer Systems

COMMUNICATION SYSTEMS -I

Suppression Techniques using X2Y as a Broadband EMI Filter IEEE International Symposium on EMC, Boston, MA

Optoelectronic Components Testing with a VNA(Vector Network Analyzer) VNA Roadshow Budapest 17/05/2016

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Analog front-end electronics

Overview of the ATLAS Electromagnetic Compatibility Policy

Outline / Wireless Networks and Applications Lecture 3: Physical Layer Signals, Modulation, Multiplexing. Cartoon View 1 A Wave of Energy

University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Inductors

SEMS SHIELDING EFFECTIVENESS MEASUREMENT SYSTEM IN MRI AND SHIELDED ENVIRONMENT. ELECTRIC AND MAGNETIC FIELD FROM 10 khz TO 300 MHz*

DESIGN AND PERFORMANCE OF A SATELLITE TT&C RECEIVER CARD

LNS ultra low phase noise Synthesizer 8 MHz to 18 GHz

MAT 302: ALGEBRAIC CRYPTOGRAPHY. Department of Mathematical and Computational Sciences University of Toronto, Mississauga.

APPLICATION NOTE 6206 SIMPLE, EFFECTIVE METHOD AND CIRCUIT TO MEASURE VERY-LOW 1/F VOLTAGE REFERENCE NOISE (< 1ΜV P-P, 0.

EM Noise Mitigation in Electronic Circuit Boards and Enclosures

SETTING UP A WIRELESS LINK USING ME1000 RF TRAINER KIT

Cryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1

Collision-based Power Analysis of Modular Exponentiation Using Chosen-message Pairs

Spectrum Analyzer Two models available: OGR-24 (24 GHz) and OGR-8 (8 GHz)

HIFAS: Wide-band spectrometer ASIC

TSEK02: Radio Electronics Lecture 6: Propagation and Noise. Ted Johansson, EKS, ISY

Security Enhancement and Speed Monitoring of RSA Algorithm

Block Ciphers Security of block ciphers. Symmetric Ciphers

Device Pairing at the Touch of an Electrode

How EMxpert Diagnoses Board-Level EMC Design Issues

Synthesis and Analysis of 32-Bit RSA Algorithm Using VHDL

Course Introduction Purpose Objectives Content Learning Time

Recommendations for Secure IC s and ASIC s

Communication Channels

Changing the sampling rate

Advanced Test Equipment Rentals ATEC (2832)

Top Ten EMC Problems

Unclassified Distribution A: Unlimited Public Release

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

Course Introduction. Content 16 pages. Learning Time 30 minutes

Spectrum Analyzer. Spectrum Analyzer. Antenna Panel Inputs. Auxiliary Antenna Inputs. Two models available: 24 GHz and 8 GHz OSCOR

Noise Temperature. Concept of a Black Body

Interface to the Analog World

Measurement & Control of energy systems. Teppo Myllys National Instruments

ni.com Sensor Measurement Fundamentals Series

Spectrum Analyzer Two models available: OBL-24 (24 GHz) and OBL-8 (8 GHz)

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Comparison of IC Conducted Emission Measurement Methods

Algorithmic Number Theory and Cryptography (CS 303)

Transcription:

Information Security Theory vs. Reality 0368-4474, Winter 2015-2016 Lecture 6: Physical Side Channel Attacks on PCs Guest lecturer: Lev Pachmanov 1

Side channel attacks probing CPU architecture optical power 2 electromagnetic chassis potential acoustic

Traditional side channel attacks methodology 1. Grab/borrow/steal device 2. Find key-dependent instruction 3. Record emanations using high-bandwidth equipment (> clock rate, PC: >2GHz) 4. Obtain traces 5. Signal and cryptanalytic analysis 6. Recover key for i=1 2048 sqr( ) if key[i]=1 mul( ) Hard for PCs 3

Traditional side channel attacks methodology 1. Grab/borrow/steal device 2. Find key-dependent instruction 3. Record emanations using high-bandwidth equipment (> clock rate, PC: >2GHz) 4. Obtain traces 5. Signal and cryptanalytic analysis 6. Recover key Hard for PCs 4

Traditional side channel attacks methodology 1. Grab/borrow/steal device 2. Find key-dependent instruction 3. Record emanations using high-bandwidth equipment (> clock rate, PC: >2GHz) 4. Obtain traces 5. Signal and cryptanalytic analysis 6. Recover key Complex electronics running complicated software Hard for (in PCs parallel) 5 vs. Not handed out vs. Measuring a 2GHz PC requires expansive and bulky equipment (compared to a 100 MHz smart card) 100,000$ vs. 1,000$

Our results Channels for attacking PCs 6 Ground potential (chassis and others) Power Electromagnetic Acoustic Exploited via low-bandwidth cryptanalytic attacks Adaptive attack (50 khz bandwidth) [Genkin Shamir Tromer 14] Non-adaptive attacks (1.5 MHz bandwidth) [Genkin Pipman Tromer 14] [Genkin Pachmanov Pipman Tromer 15] Common cryptographic software GnuPG 1.4.13-1.4.16 (CVE 2013-4576, 2014-3591, 2014-5270) RSA and ElGamal, various implementations Worked with GnuPG developers to mitigate the attacks Applicable to various laptop models

7 Chassis-potential channel

Ground-potential analysis Attenuating EMI emanations Unwanted currents or electromagnetic fields? Dump them to the circuit ground! (Bypass capacitors, RF shields, ) Device is grounded, but its ground potential fluctuates relative to the mains earth ground. affects dumped to connected to Computation currents and EM fields device ground conductive chassis Key = 101011 8

Connecting to the chassis 9

Demo: distinguishing instructions Key = 101011 10

Distinguishing various CPU operations 11 frequency (2-2.3 MHz) time (10 sec)

12 Low-bandwidth leakage of RSA

13 Definitions (RSA) Key setup sk: random primes pp, qq, private exponent dd pk: nn = pppp, public exponent ee Encryption cc = mm ee mod nn Decryption mm = cc dd mod nn A quicker way used by most implementations mm pp = cc dd pp mod pp mm qq = cc dd qq mod qq Obtain mm using Chinese Remainder Theorem

GnuPG RSA key distinguishability 14 frequency (1.9-2.4 MHz) time (0.8 sec) mod pp mod qq Can distinguish between: 1. Decryptions and other operations 2. Two exponentiations (mod pp, mod qq) 3. Different keys 4. Different primes

15 Key extraction

GnuPG modular exponentiation modular_exponentiation(c,d,p){ m=1 for i=n to 1 do m = m 2 mod p t = m*c mod p //always mult if d[i]==1 then m=t return m m = cc dd nn dd ii+1 mmmmmm pp m = cc dd nn dd ii+1 0 mmmmmm pp tt = cc dd nn dd ii+1 1 mmmmmm pp m = cc dd nn dd ii mmmmmm pp Q: Why always compute tt mm cc then conditionally copy? A: This is a side channel countermeasure meant to protect dd 16 } no key dependent operation to measure

GnuPG modular exponentiation 17 modular_exponentiation(c,d,p){ m=1 for i=n to 1 do m = m 2 mod p t = m*c mod p //always mult } if d[i]==1 then m=t return m 2GHz CPU speed vs. 1.5MHz measurements can only see drastic changes inside squaring operation mm depends on both dd[ii] and cc Idea: leakage self-amplification abuse algorithm s own code to amplify its own leakage! 1. Craft suitable cipher-text to affect the inner-most loop 2. Small differences in repeated inner-most loops cause a big overall difference in code behavior mm is squard in next iteration of the main loop craft cc to affect the squaring in the next loop iteration, based on dd[ii] measure changes inside squaring operation and obtain dd[ii]

Non-adaptive key extraction (similar to [Yen, Lien, Moon and Ha 05]) 18 modular_exponentiation(c,d,p){ } m=1 for i=n to 1 do m = m 2 mod p t = m*c mod p //always mult if d[i]==1 then ±1 m=t return m mm ±1 Many zeros or random looking, based on dd[ii] karatsuba_sqr( m ){ } 0/$ basic_sqr( x ) basic_sqr( x ){ if( x[j]==0) y = 0 else y = x[j]*x } cc 1 (mod pp) mm 1 (mod pp) tt 1 (mod pp) If dd ii == 11 then mm 1 (mod pp) so bits of mm are random. If dd ii == 00 then mmmm 1(mod pp) so bits of mm have many zeros. x7 x27 repeated 189 times per bit of dd ~0.2ms of measurement per bit of dd

A chosen ciphertext attack 19 Non-adaptive ciphertext choice cc 1 mod pp (similar to [YLMH05]): RSA: cc = NN 1 ElGamal: cc = pp 1 Overall attack performance: Algorithm Attack type # ciphertexts Time BW Cipher Ref Sqr-andalways-mlt Non-adaptive chosen ciphertext 1 3 sec 2 MHz ElGamal, RSA [GPT14]

A chosen ciphertext attack 20 Non-adaptive ciphertext choice cc 1 mod pp (similar to [YLMH05]): RSA: cc = NN 1 ElGamal: cc = pp 1 Overall attack performance: Algorithm Attack type # ciphertexts Time BW Cipher Ref Sqr-andalways-mlt Sliding / fixed window Non-adaptive chosen ciphertext Non-adaptive chosen ciphertext 1 3 sec 2 MHz ElGamal, RSA 2 ww 1 (usually 8 or 16) 30 sec 2 MHz ElGamal, RSA [GPT14] [GPPT15]

A chosen ciphertext attack 21 Non-adaptive ciphertext choice cc 1 mod pp (similar to [YLMH05]): RSA: cc = NN 1 ElGamal: cc = pp 1 Overall attack performance: Algorithm Attack type # ciphertexts Time BW Cipher Ref Sqr-andalways-mlt Sliding / fixed window Non-adaptive chosen ciphertext Non-adaptive chosen ciphertext 1 3 sec 2 MHz ElGamal, RSA 2 ww 1 (usually 8 or 16) 30 sec 2 MHz ElGamal, RSA [GPT14] [GPPT15] Sqr-andalways-mlt Adaptive chosen ciphertext KKKKKK ssssssss 4 1 hour 50 khz RSA [GST14]

A chosen ciphertext attack Non-adaptive ciphertext choice cc 1 mod pp (similar to [YLMH05]): RSA: cc = NN 1 ElGamal: cc = pp 1 Overall attack performance: Algorithm Attack type # ciphertexts Time BW Cipher Ref Sqr-andalways-mlt Sliding / fixed window Non-adaptive chosen ciphertext Non-adaptive chosen ciphertext 1 3 sec 2 MHz ElGamal, RSA 2 ww 1 (usually 8 or 16) 30 sec 2 MHz ElGamal, RSA [GPT14] [GPPT15] Sqr-andalways-mlt Adaptive chosen ciphertext KKKKKK ssssssss 4 1 hour 50 khz RSA [GST14] 22 Ciphertext injection Send chosen ciphertexts via email (PGP/MIME). Decrypted by email client (e.g., Enigmail) automatically.

23 Empirical results: ground-potential attacks

24 Demo: RSA key extraction from chassis potential

Reading the secret key (non-adaptive attack) 25 carrier FM-modulated key due to squaring of a random-looking / mostly zero limb value of mm Key = 101011

Reading the secret key (non-adaptive attack) Acquire trace Filter around carrier (1.7 MHz) FM demodulation Read out bits ( simple ground analysis ) interrupt 26

RSA and ElGamal key extraction in a few seconds using human touch (non-adaptive attack) 27 Key = 101011

Ground-potential analysis Attenuating EMI emanations Unwanted currents or electromagnetic fields? Dump them to the circuit ground! (Bypass capacitors, RF shields, ) Device is grounded, but its ground potential fluctuates relative to the mains earth ground. affects dumped to connected to Computation currents and EM fields device ground conductive chassis 28

Ground-potential analysis Attenuating EMI emanations Unwanted currents or electromagnetic fields? Dump them to the circuit ground! (Bypass capacitors, RF shields, ) Device is grounded, but its ground potential fluctuates relative to the mains earth ground. affects dumped to connected to connected to Key = 101011 Computation currents and EM fields device ground conductive chassis Even when no data, or shielded cables port is turned off. 29

RSA and ElGamal key extraction in a few seconds using the far end of 10 meter network cable 30 works even if a firewall is present, or port is turned off key= 101011

31 Empirical results: electromagnetic attacks

Electromagnetic key extraction Currents inside the target create electromagnetic waves. Can be detected using an electromagnetic probe (e.g., a loop of cable). target attacker 32

33 Portable Instrument for Trace Acquisition Cost to build: ~300$

Key extraction via commodity radio receiver 34

35 Acoustic cryptanalysis

Acoustic emanations from PCs 36 Noisy electrical components in the voltage regulator Bzzzzzz Commonly known as coil-whine but also originates from capacitors

Experimental setup (example) 37 attacker amplifier microphone target digitizer

Adaptive key extraction Severe attenuation of high frequency signals. Effective bandwidth of 50 khz Cannot observe a single squaring Make the entire decryption depend on a single attacked bit Extreme version of self-amplification Extract the prime qq bit-by-bit (adaptive chosen ciphertext) Total #measurements: 2048 decryptions for RSA-4096 (~1 hour) 38

39 An adaptive chosen-ciphertext attack 1111...1 qq = 11?????? qq cc = 11011111 11011010 qq = 110????? qq = 1??????? cc = 10111111 Bit-distinguisher oracle cc =...... 111 1 1000 0 10 0 iiii cc > qq 1 iiii cc qq

An adaptive chosen-ciphertext attack Total #measurements: KKKKKK ssssssss 2 2 2 Error correction Bit distinguisher oracle cc =...... 111 1 Just q Coppersmith lattice reduction: half the bits suffice Overall: 2048 decryptions for RSA-4096 (~1 hour) 0 iiii cc > qq 1 iiii cc qq 40

GnuPG RSA decryption - mm qq = cc dd qq mmmmmm qq 41 modular_exponentiation(c,d,q){ karatsuba_mult(m,c) } karatsuba_mult(m,c){ basic_mult(x,y) } basic_mult(x,y){ if (y[j]==0) return 0 else return y[j]*x } x7 Grand total: 272384 times ~0.5 sec of measurements x19 x2048 craft c such that qq ii = 1 yy[jj] = 0 qq ii = 0 yy jj 0 (for most jj s)

Extracting qq ii (simplified) cc ii = qq 2048 qq ii+1 01 1 If qq ii = 11 then cc ii < qq, thus cc = cc ii. That is, cc has special structure. If qq ii = 00 then 2q > cc ii > qq, thus cc = cc ii qq. That is, cc is random looking. and we now multiply by cc causing the bit-dependent leakage. 42

Extracting qq ii cc ii = qq 2048 qq ii+1 01 1 + nn If qq ii = 11 then cc ii nn < qq, thus cc = cc ii nn. That is, cc has special structure. If qq ii = 00 then 2q > cc ii nn > qq, thus cc = cc ii qq nn. That is, cc is random looking. and we now multiply by cc causing the bit-dependent leakage. 43

Extracting qq ii (problem) 44 Multiplication is repeated 2048 times (0.5 sec of data) Single multiplication is way too fast for us to measure

45 Empirical results: acoustic attacks

Distinguishing a key bit by a spectral signature 46 frequency frequency mod p mod p time time mod q mod q

47 Demo: key extraction

Acoustic: results 48 RSA 4096-bit key extraction from 1 meter away using a microphone

Acoustic: results RSA 4096-bit key extraction from 10 meters away using a parabolic microphone 49

Acoustic: results 50 RSA 4096-bit key extraction from 30cm away using a smartphone

51 Countermeasures

Countermeasures Common suggestions 1. Shielding EM (Faraday cages), ground difficult and expensive Acoustic? Vents! 2. Add analog noise (expensive, correlations remain) 3. Parallel software load (inadequate, may help attacker) Attacks rely on decryption of chosen ciphertexts. Solution: ciphertext randomization use equivalent but random-looking ciphertexts Negligible slowdown for RSA x2 slowdown for ElGamal 52

53 Effective countermeasure: ciphertext randomization (added in GnuPG 1.4.16) Given a ciphertext cc: 1. Generate a random number rr and compute rr ee 2. Decrypt rr ee cc and obtain mmm 3. Output mm rr 1 Works since eeee = 1 mmmmmm φφ(nn) thus: rr ee cc dd rr 1 mmmmmm nn = rr eeee rr 1 cc dd mmmmmm nn = rr rr 1 cc dd mmmmmm nn = cc dd mmmmmm nn = mm

tau.ac.il/~tromer/acoustic CRYPTO 14 CVE 2013-4576 tau.ac.il/~tromer/handsoff CHES 14 CVE-2014-5270 tau.ac.il/~tromer/radioexp CHES 15 CVE-2014-3591 54