The Frequency Injection Attack on Ring-Oscillator-Based True Random - - PowerPoint PPT Presentation

the frequency injection attack on ring oscillator based
SMART_READER_LITE
LIVE PREVIEW

The Frequency Injection Attack on Ring-Oscillator-Based True Random - - PowerPoint PPT Presentation

The Frequency Injection Attack on Ring-Oscillator-Based True Random Number Generators A. Theodore Markettos and Simon Moore www.cl.cam.ac.uk/research/security Computer Laboratory A.T. Markettos and S. W. Moore, The Frequency Injection Attack


slide-1
SLIDE 1

The Frequency Injection Attack on Ring-Oscillator-Based True Random Number Generators

  • A. Theodore Markettos and Simon Moore

www.cl.cam.ac.uk/research/security Computer Laboratory

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-2
SLIDE 2

Importance of unpredictable random number generation

Many protocols are vulnerable to attacks if the random number generator (RNG) is predictable.

◮ Many kinds of key generation ◮ Replay attacks ◮ Digital Signature Algorithm ◮ Masking of RSA to protect against DPA

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-3
SLIDE 3

A source of randomness... jitter

◮ Sources of cryptographic randomness measure some physical

property

◮ Jitter: timing variations due to noise ◮ Measure jitter of ring oscillators

t 0 t ∆ σ

∆t

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-4
SLIDE 4

A source of randomness... jitter

◮ Sources of cryptographic randomness measure some physical

property

◮ Jitter: timing variations due to noise ◮ Measure jitter of ring oscillators

Whitening eg LFSR Sampling clock D-type latch Random bitstream Ring r 1 2 ... nr Ring 1 1 2 ... n1

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-5
SLIDE 5

Injection locking

◮ But what happens to jitter if the ring oscillators aren’t independent? ◮ Christiaan Huyghens, 1665: Independent pendulum clocks on a wall

tend to synchronise via nonlinear vibrations through the wall

◮ Applying a signal near to the fundamental ‘pulls-in’ the oscillator to

a different nearby frequency

ωinj ω0 V

ω1 ω0 ω2 Locking range Pulling

ωinj |ωinj − ω0|

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-6
SLIDE 6

Injection locking in ring oscillators

◮ Ring oscillators tend to ring synchronise by parasitic injection locking ◮ ...so what if we try to force them to lock? ◮ A basic ring oscillator ◮ ...can have an injection signal coupled into the ring (not easy) ◮ A ring oscillator with power supply/EM injection is balanced ◮ ...unless it isn’t ◮ ...or until an extra load is added

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-7
SLIDE 7

Injection locking in ring oscillators

◮ Ring oscillators tend to ring synchronise by parasitic injection locking ◮ ...so what if we try to force them to lock? ◮ A basic ring oscillator ◮ ...can have an injection signal coupled into the ring (not easy) ◮ A ring oscillator with power supply/EM injection is balanced ◮ ...unless it isn’t ◮ ...or until an extra load is added

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-8
SLIDE 8

Injection locking in ring oscillators

◮ Ring oscillators tend to ring synchronise by parasitic injection locking ◮ ...so what if we try to force them to lock? ◮ A basic ring oscillator ◮ ...can have an injection signal coupled into the ring (not easy) ◮ A ring oscillator with power supply/EM injection is balanced ◮ ...unless it isn’t ◮ ...or until an extra load is added

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-9
SLIDE 9

Injection locking in ring oscillators

◮ Ring oscillators tend to ring synchronise by parasitic injection locking ◮ ...so what if we try to force them to lock? ◮ A basic ring oscillator ◮ ...can have an injection signal coupled into the ring (not easy) ◮ A ring oscillator with power supply/EM injection is balanced ◮ ...unless it isn’t ◮ ...or until an extra load is added

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-10
SLIDE 10

Injection locking in ring oscillators

◮ Ring oscillators tend to ring synchronise by parasitic injection locking ◮ ...so what if we try to force them to lock? ◮ A basic ring oscillator ◮ ...can have an injection signal coupled into the ring (not easy) ◮ A ring oscillator with power supply/EM injection is balanced ◮ ...unless it isn’t ◮ ...or until an extra load is added

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-11
SLIDE 11

Injection locking in ring oscillators

◮ Ring oscillators tend to ring synchronise by parasitic injection locking ◮ ...so what if we try to force them to lock? ◮ A basic ring oscillator ◮ ...can have an injection signal coupled into the ring (not easy) ◮ A ring oscillator with power supply/EM injection is balanced ◮ ...unless it isn’t ◮ ...or until an extra load is added

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-12
SLIDE 12

Injection locking in ring oscillators

◮ Ring oscillators tend to ring synchronise by parasitic injection locking ◮ ...so what if we try to force them to lock? ◮ A basic ring oscillator ◮ ...can have an injection signal coupled into the ring (not easy) ◮ A ring oscillator with power supply/EM injection is balanced ◮ ...unless it isn’t ◮ ...or until an extra load is added ◮ Injection locking reduces global jitter ◮ Injection locking of multiple rings prevents

measurement of jitter differences between them

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-13
SLIDE 13

Experiment with discrete logic gates

Injection locking is:

◮ Difficult to solve analytically ◮ Difficult to simulate with SPICE ◮ Difficult to measure inside an FPGA

So we tried some discrete logic gates:

◮ 74HC04 inverter, 3-element and 5-element rings, inject 24 MHz

Oscilloscope +5V IC1: 74HC04N 100 Ω Vss Vdd IC2: 74HC04N Vss Vdd GND

900mV pk-pk

ADT1-1WT

(0-800MHz @ <3dB)

finject 50 Ω A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-14
SLIDE 14

Experiment with discrete logic gates

Yellow = output of 3-element ring (trigger), blue = 5-element

200 ns 8 V

No injection

200 ns 8 V

10 MHz injection at 900 mV pk-pk

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-15
SLIDE 15

Experiment with discrete logic gates

Yellow = output of 3-element ring (trigger), blue = 5-element

200 ns 8 V

No injection

200 ns 8 V

10 MHz injection at 900 mV pk-pk

Trigger on rising edge 50% of 3-element ring, measure phase lag until 50% rising of 5-element

20 40 60 100 200 300

No injection: phase lag/ns

Occurrences 20 40 60 100 200 300

24MHz injection: phase lag/ns

Occurrences A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-16
SLIDE 16

ATM secure microcontroller

◮ 8051-based 8-bit microcontroller, used in

ATMs

◮ Tamper detection, anti-probing coating,

‘the most secure’ at release

◮ Our example datecode 1995, still

recommended for new banking applications

◮ TRNG from frequency differences

between ring oscillators and system crystal

◮ 8 bits entropy every 160µs ◮ 64 bits make up internal key

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-17
SLIDE 17

ATM secure microcontroller

◮ Injected 500 mV sinusoid into 5 V power supply. ◮ Extract full bitstream from microcontroller. Bit patterns as rasters:

No injection

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-18
SLIDE 18

ATM secure microcontroller

◮ Injected 500 mV sinusoid into 5 V power supply. ◮ Extract full bitstream from microcontroller. Bit patterns as rasters:

No injection 1.822880 MHz injection 1.929629 MHz injection

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-19
SLIDE 19

ATM secure microcontroller

Overlaid sequences from 1.822880 MHz injection. Tuples made from random bits

  • ne each from two recordings

black=(0,0), grey=(1,1), yellow=(0,1), cyan=(1,0) 32 bits has not 232 possible values but 225!

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-20
SLIDE 20

EMV smartcard

◮ EMV (‘Chip and PIN’) payment card from major British bank,

issued 2004 (first one we picked)

◮ First we worked out an injection frequency using an electromagnetic

attack:

Copper foil on underside

  • f card below chip

Topside copper foil

  • n ground pad of chip

Copper tape overlaid on each side to minimise magnetic loop area P7330 0-3.5GHz differential probe

IN CH3 OUT CH3

Anritsu MS2601B spectrum analyser Tektronix TDS7254B

  • scilloscope (used as

passthrough amplifier, internal bandwidth filters off)

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-21
SLIDE 21

EMV smartcard

◮ Then we modified a card reader to inject a 1 V 24.04 MHz sinusoid

into the 5 V supply

◮ Device still ran EMV transactions ◮ Read 1.6 Gbit from ISO7816 GET CHALLENGE command ◮ Without injection, failed 1 of 188 NIST tests ◮ With injection, failed 160 of 188 NIST tests ◮ Obvious failures: 32 × 32 rank test, discrete Fourier transform

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-22
SLIDE 22

EMV smartcard

◮ Then we modified a card reader to inject a 1 V 24.04 MHz sinusoid

into the 5 V supply

◮ Device still ran EMV transactions ◮ Read 1.6 Gbit from ISO7816 GET CHALLENGE command ◮ Without injection, failed 1 of 188 NIST tests ◮ With injection, failed 160 of 188 NIST tests ◮ Obvious failures: 32 × 32 rank test, discrete Fourier transform

DFT, no injection DFT, with injection. Sequences of 2000 and 15000 bits visible. A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-23
SLIDE 23

An ATM attack

◮ The nonce sent to an EMV smartcard used in an ATM is 32 bits ◮ An attacker irradiates the ATM with 10 GHz amplitude modulated

with 1.8 MHz

◮ Ventilation slots are transparent to 10 GHz ◮ Device capacitance filters out the 10 GHz leaving 1.8 MHz in the

power supply

◮ Entropy of ATM’s 32 bit nonce reduced to < 8 bits (≈ 225) ◮ The attacker records some challenge/responses with the victim card

in a modified store terminal

◮ A fake card is used to select the correct reply to a challenge from

the irradiated ATM

◮ Birthday paradox: need <

√ 225 = 15 attempts for 50% chance of success (stealing money)

◮ Random number vulnerabilities are very difficult to detect or prove

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-24
SLIDE 24

Defences

Similar to DPA defences:

◮ Power supply filtering ◮ Balanced rings ◮ Differential ring oscillator (ie dual rail)

+ Vsupply Vinject A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-25
SLIDE 25

Defences

Similar to DPA defences:

◮ Power supply filtering ◮ Balanced rings ◮ Differential ring oscillator (ie dual rail)

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-26
SLIDE 26

Defences

Similar to DPA defences:

◮ Power supply filtering ◮ Balanced rings ◮ Differential ring oscillator (ie dual rail)

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-27
SLIDE 27

Defences

Similar to DPA defences:

◮ Power supply filtering ◮ Balanced rings ◮ Differential ring oscillator (ie dual rail)

But won’t our smartcard already have DPA protection?

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-28
SLIDE 28

Summary

◮ Injection locking is well-known as a parasitic effect ◮ We have extended it to an attack ◮ The attack is straightforward to implement ◮ The attack works surprisingly well

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-29
SLIDE 29

Questions?

The Security Group:

◮ blog:

http://www.lightbluetouchpaper.org

◮ webpage:

http://www.cl.cam.ac.uk/research/security

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009

slide-30
SLIDE 30

Injection locking

ωin ωout The “Devil’s Staircase”

A.T. Markettos and S. W. Moore, The Frequency Injection Attack on Ring-Oscillator TRNGs, CHES 2009