FPGA-based True Random Number Generation using Circuit - - PowerPoint PPT Presentation

fpga based true random number generation
SMART_READER_LITE
LIVE PREVIEW

FPGA-based True Random Number Generation using Circuit - - PowerPoint PPT Presentation

FPGA-based True Random Number Generation using Circuit Meta-stability with Adaptive Feedback Control Mehrdad Majzoobi 1 , Farinaz Koushanfar 1, and


slide-1
SLIDE 1

FPGA-­‑based ¡True ¡Random ¡Number ¡ Generation ¡ ¡

using ¡Circuit ¡Meta-­‑stability ¡with ¡Adaptive ¡Feedback ¡ Control ¡ Mehrdad ¡Majzoobi1, ¡Farinaz ¡Koushanfar1, ¡ ¡and ¡ Srinivas ¡Devadas2 ¡

1 ¡Rice ¡University, ¡ECE ¡ 2 ¡Massachuse@s ¡InsBtute ¡of ¡Technology, ¡EECS ¡

1 ¡

slide-2
SLIDE 2

Random ¡Number ¡Generator ¡ (RNG) ¡

  • Pseudo-­‑RNG ¡(PRNG) ¡
  • Seed ¡
  • Source ¡of ¡entropy, ¡i.e., ¡a ¡longer ¡random ¡

number ¡from ¡a ¡shorter ¡seed ¡ ¡

  • Algorithm ¡
  • How ¡is ¡the ¡PRNG ¡seed ¡generated? ¡
  • Predictable? ¡ ¡
  • E.g., ¡Netscape ¡browser[1]: ¡srand(Bme(0)) ¡
  • True-­‑RNG ¡
  • No ¡seed ¡ ¡
  • Based ¡on ¡a ¡random ¡physical ¡phenomenon ¡ ¡

2 ¡ [1] ¡h@p://www.cs.berkeley.edu/~daw/papers/ddj-­‑netscape.html ¡

slide-3
SLIDE 3

Sources ¡of ¡Randomness ¡

  • Lavarand ¡
  • Developed ¡in ¡1996 ¡ ¡
  • Generate ¡randomness ¡from ¡lava ¡lamps ¡
  • Efficiency/Cost? ¡

3 ¡ Thermal ¡ Noise ¡ Shot ¡ Noise ¡ Flicker ¡ Noise ¡ Clock ¡ Ji@er ¡ Phase ¡ Noise ¡ Atmospheric ¡ Noise ¡ Radio ¡Noise ¡ h@p://www.lavarnd.org/ ¡

slide-4
SLIDE 4

Applications ¡

  • GeneraBng ¡ ¡
  • Keys ¡
  • Nonce ¡
  • Seeds ¡
  • Random ¡numbers ¡used ¡in ¡
  • Lo@ery ¡
  • Gaming ¡and ¡Gambling ¡
  • Demand ¡
  • Secure ¡communicaBon ¡
  • Servers ¡
  • E.g. ¡Intel ¡is ¡embedding ¡TRNGs ¡in ¡its ¡new ¡generaBon ¡processors ¡

4 ¡

h@p://spectrum.ieee.org/semiconductors/processors/behind-­‑intels-­‑new-­‑randomnumber-­‑generator/? utm_source=techalert&utm_medium=email&utm_campaign=090111 ¡

slide-5
SLIDE 5

What ¡is ¡the ¡Challenge? ¡

  • Source ¡of ¡randomness? ¡
  • ImplementaBon ¡cost ¡
  • The ¡cost ¡of ¡generaBng ¡one ¡(entropy) ¡bit ¡ ¡
  • Quantum ¡random ¡number ¡generaBon ¡* ¡
  • Specialized ¡hardware ¡(high ¡cost) ¡
  • Speed/throughput ¡
  • Power ¡
  • Ease ¡of ¡implementaBon ¡
  • Security ¡
  • Biasing ¡a@acks ¡

5 ¡

UnconvenBonal ¡Specialized ¡ ¡ Hardware ¡ ASICs ¡ FPGAs, ¡PSoC ¡ Digital ¡ Analog ¡ Mechanical, ¡OpBcal, ¡etc ¡

* ¡h@p://www.idquanBque.com/ ¡

  • FPGA ¡ ¡
  • More ¡FPGA ¡

designs ¡than ¡ASICs ¡ ¡

  • Reconfigurable ¡
  • Shorter ¡Time-­‑to-­‑

Market ¡

  • Cheaper ¡in ¡low ¡

volume ¡

slide-6
SLIDE 6

Related ¡Work ¡

  • Analog ¡TRNGs ¡
  • Digital ¡TRNGs ¡
  • Clock ¡ji@er ¡
  • Metastability ¡

6 ¡

[1] ¡Sunar, ¡MarBn, ¡SBnson: ¡A ¡provably ¡ secure ¡true ¡random ¡number ¡generator ¡with ¡ built-­‑in ¡tolerance ¡to ¡acBve ¡a@acks. ¡IEEE ¡

  • Trans. ¡on ¡Computers ¡58, ¡109–119 ¡(2007) ¡

Sampling ¡ring ¡oscillator ¡ji@er ¡ ¡

[2] ¡O’Donnell, ¡Suh, ¡& ¡Devadas: ¡PUF-­‑ based ¡random ¡number ¡generaBon: ¡MIT ¡ CSAIL ¡CSG ¡Tech. ¡Memo ¡481 ¡2004 ¡

  • Cons ¡of ¡popular ¡ROs ¡
  • Low ¡entropy ¡rate ¡
  • Strong ¡dependence ¡on ¡

working ¡condiBon ¡

  • Can ¡synchronize ¡on ¡

perturbaBons ¡or ¡other ¡ ROs ¡

  • High ¡power ¡consumpBon ¡ ¡
slide-7
SLIDE 7

This ¡Work ¡

  • Flip-­‑flop ¡metastability ¡ ¡
  • circuit/ambient ¡noise ¡sensor ¡
  • Fine ¡delay ¡tuning ¡ ¡
  • force ¡metastable ¡operaBon ¡
  • At-­‑speed ¡feedback ¡mechanism ¡ ¡
  • automaBc ¡tuning ¡
  • Robust ¡operaBon ¡
  • Resilient ¡against ¡acBve ¡a@acks ¡-­‑ ¡biasing ¡
  • Simple ¡design ¡principle ¡
  • Easy ¡to ¡observe ¡how ¡randomness ¡relies ¡on ¡physical ¡phenomena ¡
  • High ¡entropy ¡and ¡throughput ¡per ¡unit ¡area ¡

7 ¡

1

slide-8
SLIDE 8

Q C D Hold Margin Setup Margin

Flip-­‑Blop ¡Metastability ¡

  • Metastability ¡
  • Highly ¡sensiBve ¡to ¡noise ¡

¡

  • Flip-­‑flop ¡
  • Delay ¡difference ¡
  • Simultaneous ¡arrival ¡

8 ¡

1

0.5 1 Δ Probability

  • f Q=1

Metastable Region

Majzoobi, ¡Koushanfar, ¡and ¡Potkonjak ¡Techniques ¡for ¡ Design ¡and ¡ImplementaBon ¡of ¡Secure ¡Reconfigurable ¡

  • PUFs. ¡TRETS. ¡Syst. ¡2, ¡1, ¡ArBcle ¡5, ¡2009 ¡

40~50 ¡ps ¡

slide-9
SLIDE 9

Delay ¡tuning ¡

  • FPGA ¡
  • Lookup ¡table ¡(LUT) ¡
  • Programmable ¡delay ¡Line ¡(PDL) ¡
  • Incremental ¡changes ¡in ¡propagaBon ¡

path ¡

  • Tree-­‑like ¡network ¡
  • ResoluBon ¡~ ¡10 ¡ps ¡

9 ¡

1 1 1 1

A1=1 ¡ A2=1 ¡ A0:1 ¡ Control ¡Delay ¡ Output ¡ →0 ¡ O:0 ¡→1 ¡ Example: ¡3-­‑input ¡LUT ¡ Configured ¡ ¡ SRAM ¡bits ¡

0 ¡ 1 ¡ 0 ¡ 1 ¡ 0 ¡ 1 ¡ 0 ¡ 1 ¡

slice slice Switch Matrix Switch Matrix slice slice Switch Matrix slice slice Switch Matrix slice slice

A2 A3 A1 O

slide-10
SLIDE 10

TRNG ¡System ¡Design ¡

  • Monitor ¡bit ¡probabiliBes ¡
  • Provide ¡feedback ¡to ¡perform ¡delay ¡tuning ¡
  • Monitor ¡
  • Counter ¡-­‑ ¡accumulator ¡
  • Control ¡ ¡
  • Linear ¡feedback ¡– ¡linear ¡decoding ¡

¡

10 ¡

Control

Monitor D C Q PDL Binary Sequence

G Δb Δp e Δf

Integral Flip-flop Out

PI ¡– ¡proporBonal ¡ integral ¡controller ¡ ¡

slide-11
SLIDE 11

Implementation ¡

  • Coarse ¡and ¡fine ¡delay ¡tuning ¡knobs ¡
  • Synthesize ¡delay ¡within ¡a ¡target ¡range ¡
  • Fine ¡PDL ¡resoluBon ¡= ¡32 ¡x ¡Coarse ¡PDL ¡resoluBon ¡
  • Linear ¡Decoding ¡ ¡

11 ¡ FF ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡

Coarse ¡PDL ¡ Fine ¡PDL ¡ A6 ¡ A5 ¡ A4 ¡ A3 ¡ A2 ¡ A1 ¡ O ¡ A6 ¡ A5 ¡ A4 ¡ A3 ¡ A2 ¡ A1 ¡ O ¡ i ¡ c ¡ i ¡ c ¡ 0 ¡

Δ ¡ Delay ¡Diff. ¡ Counter ¡ Value ¡ C ¡

i ¡

  • ¡

c ¡ i ¡

  • ¡

c ¡

slide-12
SLIDE 12

Random ¡Walk ¡

  • 1D ¡random ¡walk ¡through ¡counter ¡values ¡
  • C ¡←C ¡+ ¡x ¡ ¡ ¡where ¡ ¡ ¡x ¡= ¡{1,-­‑1}, ¡ ¡C ¡= ¡counter ¡value ¡
  • Prob{x ¡= ¡-­‑1} ¡= ¡1 ¡-­‑ ¡Prob{x ¡= ¡1} ¡ ¡= ¡f(C) ¡
  • The ¡farther ¡from ¡the ¡center ¡the ¡higher ¡the ¡probability ¡of ¡

moving ¡toward ¡the ¡center ¡

12 ¡

D C Q Binary Counter

inc/dec MSB LSB

...

DFF

...

p1

...

p1 p1 p1 p1 p1

... ... Decoder Decoder ...

... ...

... ... ...

... ... ...

Course Tuning Blocks Fine Tuning Blocks It

1

Ib

1

It

2

Ib

2

It

n

Ib

n

It

1

Ib

1

It

2

Ib

2

It

m

Ib

m

  • utput

Decrement ¡Counter ¡Value ¡ 1 ¡ Increment ¡Counter ¡Value ¡ 0 ¡

slide-13
SLIDE 13

Measurement ¡setup ¡

  • Measuring ¡PDL ¡resoluBon ¡
  • External ¡lab ¡funcBon ¡

generator ¡ ¡

  • Linear ¡sweep ¡from ¡10MHz ¡

to ¡15MHz ¡

  • Freq ¡* ¡34 ¡by ¡internal ¡PLL ¡
  • Xilinx ¡Virtex ¡5 ¡XC5VLX110 ¡
  • Record ¡error ¡rate ¡
  • 32x32 ¡array ¡

13 ¡

slide-14
SLIDE 14

PDL ¡Delay ¡Measurement ¡

  • Delay ¡difference ¡
  • Coarse ¡delay ¡tap ¡
  • ~10ps ¡
  • Fine ¡delay ¡tap ¡
  • ~10ps/32 ¡ ¡

14 ¡

ns ¡ ns ¡ ns ¡

_ ¡ = ¡

slide-15
SLIDE 15

Tuning ¡with ¡PDLs ¡

  • Fine ¡tuning ¡stages ¡
  • 32 ¡
  • Coarse ¡tuning ¡stages ¡
  • 32 ¡
  • Measure ¡probability ¡
  • Repeat ¡1000 ¡Bmes ¡
  • Normalize ¡the ¡

number ¡of ¡1s ¡

15 ¡

slide-16
SLIDE 16

Operation ¡

  • 10 ¡bit ¡counter ¡(5 ¡LSB/MSB ¡bits ¡control ¡fine/coarse ¡PDLs) ¡
  • The ¡counter ¡value ¡finally ¡se@le ¡around ¡a ¡constant ¡value ¡
  • 562 ¡
  • It ¡walks ¡around ¡the ¡center ¡values ¡
  • Here: ¡564,563,562,561,560, ¡559 ¡

16 ¡

slide-17
SLIDE 17

Steady ¡state ¡statistics ¡

  • How ¡many ¡Bmes ¡a ¡counter ¡value ¡appears ¡
  • What ¡is ¡the ¡output ¡bit ¡probability ¡associated ¡with ¡each ¡counter ¡

values? ¡

17 ¡ 0.4 ¡ 564 ¡ 1 ¡ 563 ¡ 1 ¡ 562 ¡ 1 ¡ 561 ¡ 0 ¡ 562 ¡ 1 ¡ 561 ¡ 1 ¡ 560 ¡ 0 ¡ 561 ¡ 0 ¡ 562 ¡ 1 ¡ 561 ¡ 1 ¡ 560 ¡ 0 ¡ 561 ¡ 0 ¡ Output: ¡ Counter: ¡ 1: ¡decrement ¡ 0: ¡increment ¡

slide-18
SLIDE 18

Post-­‑Processing ¡

  • Learning ¡filter ¡
  • Only ¡output ¡values ¡when ¡the ¡counter ¡value ¡equals ¡X ¡
  • X ¡is ¡learned ¡by ¡measuring ¡each ¡bit ¡probability ¡for ¡steady ¡state ¡

counter ¡values ¡

  • In ¡this ¡case, ¡X ¡= ¡561 ¡
  • Van ¡Neumann ¡correcBon ¡

18 ¡

slide-19
SLIDE 19

Cost ¡

  • Area ¡
  • (32+32)x2 ¡= ¡128 ¡LUTs ¡for ¡the ¡PDLs ¡
  • 10 ¡FFs ¡= ¡10 ¡bit ¡counter ¡
  • Decoder ¡= ¡2 ¡ROMs ¡(5 ¡bit ¡address ¡width ¡– ¡128 ¡bit ¡word) ¡
  • XC5VLX110T ¡ ¡
  • 17,280 ¡Slices ¡ ¡
  • 296 ¡18kb ¡ROM ¡
  • Can ¡fit ¡more ¡than ¡100 ¡TRNGs ¡
  • Speed ¡
  • Forward ¡path ¡delay ¡= ¡61.06ns ¡
  • 16 ¡Mbit/sec, ¡
  • 2Mbit/Sec ¡a{er ¡post-­‑processing ¡
  • Overclocking ¡
  • Parallel ¡cores ¡

19 ¡

slide-20
SLIDE 20

Statistical ¡Test ¡Results ¡ ¡

  • NIST ¡suite ¡
  • A{er ¡filtering ¡and ¡post ¡processing ¡

20 ¡

slide-21
SLIDE 21

Conclusion ¡

  • FPGA ¡based ¡true ¡random ¡number ¡generaBon ¡
  • Flip-­‑flop ¡meta-­‑stability ¡
  • Use ¡precise ¡delay ¡tuning ¡
  • Programmable ¡delay ¡line ¡
  • Single ¡LUT ¡
  • To ¡generate ¡high ¡quality ¡random ¡bits ¡
  • Self ¡adjusBng ¡mechanism ¡
  • Resilient ¡to ¡acBve ¡a@acks ¡
  • Throughput ¡of ¡2MHz ¡with ¡one ¡block ¡
  • Can ¡have ¡TRNG ¡blocks ¡run ¡in ¡parallel ¡
  • Can ¡perform ¡overclocking ¡

21 ¡