The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

26
The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM

Transcript of The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Page 1: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

The EM Side-Channel(s)

Dakshi AgrawalBruce Archambeault

Josyula R RaoPankaj Rohatgi

IBM

Page 2: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

EM History Classified TEMPEST standards. Some parts declassified

Jan '01, http://www.cryptome.org. Published work

EM Leakages from Peripherals, E.g., Monitors: Van Eck, Anderson & Kuhn.

EM Leakage from smart-cards during Computation. J.-J. Quisquater & David Samyde, E-smart 2001, Gemplus Team [GMO ’01], CHES ’01.

SEMA/DEMA attacks. Best results require "decapsulation" of chip packaging

and/or precise micro-antennas positioning on chip surface

Page 3: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Our Work Deeper understanding of the EM leakages.

Similar to declassified TEMPEST literature. Key Insights/Results

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.

Page 4: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

EM Emanations Background Origin/Types of EM Emanations

Direct emanations from intended currents. Maxwell’s equations, Ampere’s and Faraday’s laws.

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. Propagation of EM

Radiation, Conduction, Combination of both. E.g., Faint EM signals riding on power line.

Page 5: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

EXAMPLE 1 6805-based smart-card using

external 3.68Mhz clock. 3 instruction, 13 cycle loop:

Access RAM containing a value B (5 cycles)

Check for external condition (5 cycles)

Jump back to start of loop (3 cycles)

Page 6: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Time (2 ns)

Sig

nal

Am

plit

ud

e

Raw signal from near-field sensor during 2 iterations of loop (26 cycles)

Page 7: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

FREQ (KHZ)

FFT

mag

nit

ud

e

FFT OF RAW SIGNAL FROM EXPERIMENT 1 (0-250MHZ)

Page 8: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Time (10ns)

Sig

nal

Am

plit

ud

e AM Demodulated signal (150Mhz carrier, 50Mhz band) showing 2 iterations of Loop

5 5 3 5 5 3

Page 9: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

EXAMPLE 2: Angle Modulation Same 6805-based smart-card

executing same loop, running on variable internal clock (a DPA countermeasure).

3 instructions. Check RAM containing value B (5 cycles) Check for external condition (5 cycles) Jump back (3 cycles)

Varied B and looked at loop frequency.

Page 10: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

FFT

Mag

nit

ud

e

Frequency (KHZ)

LSB(B)=1

LSB(B)=0

Loop Frequency for LSB(B) = 0/1

Page 11: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

EM Capturing Equipment

Antennas (Far-field) and Near-field probes

Current probes. Analog processing:

Filters/Amplifiers, Tunable wideband receiver or equivalent $$

Digital sampling hardware.

Page 12: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

ICOM wideband radio receiver with IF output

Page 13: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

MAKE YOUR OWN

Page 14: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

EM vs. Power Sometimes, EM is the only

side-channel available. Filtered power supplies,

restricted access… E.g. Crypto Tokens, SSL

Accelerators,...

Page 15: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

SSL Accelerator Music SSL Accelerator S, looping with

~3s each of 512-bit RSA 1024-bit RSA 2048-bit RSA 4096-bit RSA

Can be heard on a Radio Receiver 40 feet away.

Page 16: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Time (10ns)

Am

plit

ud

e

EM Signal from SSL Accelerator S at 15 feet

Page 17: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Conditional operations within montgomery multiplication in S

Page 18: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

EM vs. Power Is EM useful in the presence of power? Yes, several EM carriers: Generated,

Ambient, Introduced… Experimentally verified:

Different carriers carry different information. Some EM leakages substantially different from

Power leakages. Experiment: Use DEMA/DPA correlation plots

to judge extent of leakage from different EM carriers & compared with power signal.

Page 19: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

4 Time Synchronized DPA/DEMA Correlation Plots

Page 20: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

4 Time Synchronized DPA/DEMA Correlation Plots

Page 21: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Bad Instructions Instructions where some EM

leakage >> Power leakage. Typically CPU intensive rather than

bus intensive. All architectures have BAD

Instructions. Example: Bit-test on several 6805

based systems leaks tested bit.

Page 22: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

OTESTED BIT = 0 IN BOTH TRACES

Page 23: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

OTESTED BIT DIFFERENT

Page 24: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Bad instructions can break power analysis countermeasures

Assumption behind power analysis countermeasures Minimize information leakage (from power) from

each execution sequence. Additional techniques[KJJ, C et al, GP] can amplify

uncertainty. Bad instructions in DPA-resistant implementations

violate the assumption and create vulnerabilities. Large EM leakage SEMA. Moderate EM leakage Higher-order EM attacks on

share-based DPA countermeasures [C et al, GP]. Some attacks work even when code unknown! Example given in paper.

Page 25: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Results and Further Work

Attacks Commercially deployed smart cards

Identification of compromising AM/Phase modulated carriers and bad instructions for several cards.

DES, RSA, DPA-resistant DES COMP-128 on GSM SIM cards

RSA on SSL Accelerators. Further Work

Multi EM-channel attack techniques EM vulnerability assessment http://www.research.ibm.com/intsec/

Page 26: The EM Side-Channel(s) Dakshi Agrawal Bruce Archambeault Josyula R Rao Pankaj Rohatgi IBM.

Countermeasures Require sound vulnerability assessment. Countermeasures include:

Circuit redesign to reduce unintentional emanations.

Reducing S/N ratio EM Shielding Noise introduction Physically secure zones.

Randomization based software countermeasures similar to DPA countermeasures.