A Physical Approach for Stochastic Modeling of TERO-based TRNG - - PowerPoint PPT Presentation

a physical approach for stochastic modeling of tero based
SMART_READER_LITE
LIVE PREVIEW

A Physical Approach for Stochastic Modeling of TERO-based TRNG - - PowerPoint PPT Presentation

TERO P-TRNG TERO analysis P-TRNG model Conclusions A Physical Approach for Stochastic Modeling of TERO-based TRNG Patrick Haddad 1 , 2 , Viktor F ISCHER 1 , Florent B ERNARD 1 , and Jean N ICOLAI 2 1: Jean Monnet University Saint-Etienne,


slide-1
SLIDE 1

TERO P-TRNG TERO analysis P-TRNG model Conclusions

A Physical Approach for Stochastic Modeling

  • f TERO-based TRNG

Patrick Haddad1,2, Viktor FISCHER1, Florent BERNARD1, and Jean NICOLAI2

1: Jean Monnet University Saint-Etienne, France 2: ST Microelectronics Rousset, France

CHES 2015 – Saint-Malo, France

September 2015

1/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-2
SLIDE 2

TERO P-TRNG TERO analysis P-TRNG model Conclusions

Random numbers in cryptography

◮ Random number generators constitute an essential part of

(hardware) cryptographic modules

◮ The generated random numbers are used as:

Cryptographic keys (high security requirements) Masks in countermeasures against side channel attacks Initialization vectors, nonces, padding values, ...

2/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-3
SLIDE 3

TERO P-TRNG TERO analysis P-TRNG model Conclusions

Random numbers in logic devices RANDOM NUMBER GENERATORS (RNG)

DETERMINISTIC RNGs (DRNGs) PHYSICAL TRUE RNGs (P-TRNGs) DRNG + P-TRNG = Hybrid RNG

3/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-4
SLIDE 4

TERO P-TRNG TERO analysis P-TRNG model Conclusions

Classical versus modern TRNG evaluation approach

◮ Two main security requirements on RNGs:

R1: Good statistical properties of the output bitstream R2: Output unpredictability

◮ Classical approach:

Assess both requirements using statistical tests – often impossible

◮ Modern ways of assessing security:

Evaluate statistical parameters using statistical tests Evaluate entropy using entropy estimator (stochastic model) Test online the source of entropy using dedicated statistical tests

Our objectives Propose a stochastic model of TERO-based TRNG a

Based on physical parameters quantifiable inside the device Can be used for online entropy assessment

a M. Varchola and M. Drutarovsky, New high entropy element for FPGA based

true random number generators, CHES 2010

4/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-5
SLIDE 5

TERO P-TRNG TERO analysis P-TRNG model Conclusions Principle Implementation Modeling

Transition effect ring oscillator (TERO)

Principle:

◮ Even number of inverters and two control gates in a loop ◮ Oscillates temporarily because of the difference in two branches ◮ Number of oscillations varies because of the intrinsic noise

. . . . . .

Vctr Vout1

Vctr Vout1

5/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-6
SLIDE 6

TERO P-TRNG TERO analysis P-TRNG model Conclusions Principle Implementation Modeling

TERO-based P-TRNG

Implementation:

cnt[0]

Counter of rising edges

clk nreset cnt[7:0]

8

Random bit output Request of a random bit

. . . . . . TERO

◮ An asynchronous 8-bit counter counts random number of

  • scillations

◮ We use the counter to characterize the TERO ◮ The LSB of the counter (cnt(0)) is used also as the random bit

(TRNG output)

6/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-7
SLIDE 7

TERO P-TRNG TERO analysis P-TRNG model Conclusions Principle Implementation Modeling

Outlines of the modeling

Since the P-TRNG is periodically restarted, the counter values are mutually independent, therefore: Entropy = −p1 · log2(p1)−(1− p1)· log2(1− p1), where p1 = Pr{cnt(0) = 1}. We want to determine p1, therefore, we need to analyze and characterize the distribution of counter values.

7/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-8
SLIDE 8

TERO P-TRNG TERO analysis P-TRNG model Conclusions Inverter Chain of inverters Loop of inverters

A noiseless inverter

Behavior of a noiseless inverter:

Vin VCC Vin Vout VGND VCC VGND Vout Pin Pout VCC 2

T1

Comparator Delay element Slope limiter

Vin(t) Vout(t)

VCC GND

Analyzed by Reyneri et al., 2 they determined Pout = f(Pin)

2 Reyneri et al., Oscillatory metastability in homogeneous and inhomogeneous

flip-flops, IEEE SSC, 1990

8/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-9
SLIDE 9

TERO P-TRNG TERO analysis P-TRNG model Conclusions Inverter Chain of inverters Loop of inverters

A noisy inverter

Behavior of a noisy inverter:

Noiseless Gaussian noise Low level assumptions Vin VCC VGND Pin Vin(t) Vout(t) = Vout(t) + n(t) id

VCC GND

In the paper, using the model of Reyneri et al., we determine Pout ∼ N (f(Pin),σ2) (see Lemma 1)

9/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-10
SLIDE 10

TERO P-TRNG TERO analysis P-TRNG model Conclusions Inverter Chain of inverters Loop of inverters

An chain of M inverters

Impact of the noise on a chain of inverters:

M inverters Vin VCC VGND Pin Vin Vout

We apply Lemma 1 to each inverter of the chain We obtain Pout ∼ N (F(Pin,M),G(σ2,M))

10/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-11
SLIDE 11

TERO P-TRNG TERO analysis P-TRNG model Conclusions Inverter Chain of inverters Loop of inverters

A loop of inverters

Impact of the noise on the duty cycle:

Vctr Vout1

. . . . . .

delay 1 delay 2

Vout1 X(s) t sth cycle

X (s)∼N ( τ1+τ2 2 + τ2−τ1 2 ⋅R

s ,σ 2⋅ R 2 s+1−1

(1+H d)

2−1

)

Geometric series (ratio R)

11/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-12
SLIDE 12

TERO P-TRNG TERO analysis P-TRNG model Conclusions TERO to P-TRNG Experiments Entropy

Stochastic model of TERO P-TRNG

The model characterizes distribution of counter values

◮ Objective: We want to get Pr{cnt = s} ◮ We just know the distribution of X(s)

We can use the equivalence cnt > s ⇐

⇒ X(s) > 0

Then Pr{cnt > s} = 1 2

  • 1− erf
  • K ·

1− Rs−s0

R2s+1 − 1

  • R is the ratio of the geometric series

K reflects the jitter σ2 s0 reflects the difference τ1 −τ2 and Pr{cnt = s} = Pr{cnt ≤ s}− Pr{cnt ≤ s + 1}

12/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-13
SLIDE 13

TERO P-TRNG TERO analysis P-TRNG model Conclusions TERO to P-TRNG Experiments Entropy

Experimental validation

Validation of the modeled distribution using a χ2 test Experiment: TERO 1 in an ST Microelectronics 28 nm ASIC

0,04 0,06 0,02 80 90 Modeled distribution Gaussian law Experimental data 100 110

K =35,680 s0=94,152 R=1,0153

Pr{cnt=s} For a significance level α = 0.05 and 38 degrees of freedom, the test statistic has to be lower than 53.384 Our model: the test statistic is 40.35 Gaussian law: the test statistic is 149.3

13/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-14
SLIDE 14

TERO P-TRNG TERO analysis P-TRNG model Conclusions TERO to P-TRNG Experiments Entropy

Experimental validation

Validation of the modeled distribution using a χ2 test Experiment: TERO 2 in an ST Microelectronics 28 nm ASIC K =9,6939 s0=90,675 R=1,013

Modeled distribution Gaussian law Experimental data 70 100 0,02 0,01 0,015 0,005 130 160 190

Pr{cnt=s} For a significance level α = 0.05 and 76 degrees of freedom, the test statistic has to be lower than 97.351 Our model: the test statistic is 33.97 Gaussian law: the test statistic is > 106

14/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-15
SLIDE 15

TERO P-TRNG TERO analysis P-TRNG model Conclusions TERO to P-TRNG Experiments Entropy

Entropy estimation

From our physical analysis we know Pr{cnt = s} From Pr{cnt = s} we compute p1 = Pr{cnt(0) = 1} Recall: Since the TERO is periodically restarted, the subsequent counter values are mutually independent and thus Hsample = − ∑

s∈N

ps log2(ps) Hlsb = −p1 · log2(p1)−(1− p1)· log2(1− p1) The second term represents the entropy of our TERO P-TRNG

15/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-16
SLIDE 16

TERO P-TRNG TERO analysis P-TRNG model Conclusions TERO to P-TRNG Experiments Entropy

Estimated entropy

Application of the model to TERO 1 and TERO 2

0,04 0,06 0,02 80 90 Modeled distribution Gaussian law Experimental data 70 100 0,02 0,01 0,015 0,005 130 160 190 100 110

s s

K =35,680 s0=94,152 R=1,0153 H sample=4,47 H lsb>0,999 K =9,6939 s0=90,675 R=1,013 H sample=6,32 H cnt(0)>0,999

Pr{cnt = s} Pr{cnt = s}

◮ In the two cases the entropy of the raw binary signal exceeds

the value 0.997 required by AIS31

◮ All generated bit streams passed tests T0 to T8 of AIS 31

16/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-17
SLIDE 17

TERO P-TRNG TERO analysis P-TRNG model Conclusions

Conclusions

◮ We presented a stochastic model of the TERO P-TRNG ◮ The model is based on transistor-level assumptions ◮ The model was validated in an ASIC implemented using 28 nm

ST Microelectronics technology

◮ We derived the entropy from this model ◮ The entropy and the output bit rate can be easily managed using

the model

17/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG

slide-18
SLIDE 18

TERO P-TRNG TERO analysis P-TRNG model Conclusions This work has received fundings from the European Union’s Horizon 2020 research and innovation programme in the framework of the project HECTOR This work has received fundings from the European ENIAC Joint Undertaking (JU) in the framework of the project TOISE

Our thanks to Nicolas Bruneau, Michel Agoyan and Yannick Teglia for their help and availability in numerous discussions.

ĎAKUJEM

18/18 P . HADDAD, V.FISCHER, F . BERNARD, J. NICOLAI Stochastic Model of TERO-based TRNG