Evaluation and monitoring of free running oscillators serving as - - PowerPoint PPT Presentation

evaluation and monitoring of free running oscillators
SMART_READER_LITE
LIVE PREVIEW

Evaluation and monitoring of free running oscillators serving as - - PowerPoint PPT Presentation

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results Evaluation and monitoring of free running oscillators serving as source of randomness Elie Noumon Allini Maciej Sk orski Oto Petura


slide-1
SLIDE 1

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Evaluation and monitoring of free running oscillators serving as source of randomness

Elie Noumon Allini • Maciej Sk´

  • rski • Oto Petura • Florent Bernard
  • Marek Laban • Viktor Fischer

CHES 2018, Amsterdam, September 2018

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-2
SLIDE 2

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Introduction 2 Jittery clock – commonly used source of randomness in digital devices Clock jitter caused by several noise sources

◮ White noise (thermal noise, ...)

֒ → Best source of randomness, non manipulable

◮ Autocorrelated noise (low frequency noises, e.g. flicker noise)

֒ → Entropy rate (unpredictability measure) difficult to quantify

◮ Data dependent noise

֒ → Dangerous (manipulable), must be avoided

Jitter monitoring Continuous embedded monitoring is preferable Jitter – usually quantified using the variance var(X) = E(X 2) − [E(X)]2 (1)

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-3
SLIDE 3

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Introduction 3 Free running oscillators – sources of the jittery clocks

F1 F2 FL R1 R2 RL C1 C2 CL V1 V2 V3 V1 V2 V3 ena F1 F2 FL R1 R2 RL C1 C2 CL

Ring oscillators (RO) Self-timed ring (STR) based on Müller gates

s s s

Randomness extraction methods from jittery clocks

Sampling flip-flop D Q clk clk Counter of k periods s1 s2 m-bit counter l-bit raw random signal (l < m) ena Q clk s1

Sampler based randomness extraction Counter based randomness extraction

clk Counter of k periods s2 FRO2 FRO1 FRO2 FRO1 1-bit raw random signal

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-4
SLIDE 4

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Introduction 4 Objectives Analyze the use of variance for entropy estimation Use high order Markov model to estimate entropy coming from auto-correlated noises Compare performance of ROs and STRs as sources of randomness

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-5
SLIDE 5

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

1

Variance and Allan variance

2

High order Markov model for entropy rate estimation from autocorrelated signals

3

Experimental results

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-6
SLIDE 6

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Characterization of random fluctuations of the clock frequency 6 Power spectral density (PSD) Defined as: Sy(f ) = hαf α (2)

◮ y – dimensionless fractional frequency (y = (ν − ν0)/ν0) ◮ α – constant characterizing the noise process ◮ hα – intensity of this noise

Characterizes random fluctuations of the clock frequency

α α α Type of the noise process −2 Random Walk Frequency (RWF) −1 Flicker Noise Frequency (FF) White Noise Frequency (WF) or Random Walk Phase (RWP) 1 Flicker Noise Phase (FP) 2 White Noise Phase (WP)

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-7
SLIDE 7

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Variance of the frequency fluctuations 7 Main assumption y is an infinite zero-mean stationary process

◮ characterized by its variance computed from a window of length τ

Variance can be computed using the power spectral density Corollary of the Wiener-Khinchin theorem Variance of y computed from the power spectral density Sy(f ): σ2

y(τ) =

+∞ Sy(f ) × |Hτ(f )|2df , (3) whenever it exists.

◮ Hτ(f ) is the transfer function of the variance operator:

֒ → Fourier transform of the impulse response function hτ ֒ → Depends on the type of variance computed

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-8
SLIDE 8

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Computation of the statistical variance from the PSD 8 Time domain t hτ(t) τ 1/τ Frequency domain |Hτ(f )|2 = sin(πτf ) πτf 2 (4) Variance of the jitter computed for α ∈ [−2; 2] from time window τ σ2

y(τ) = 2

  • α=−2

hα (πτ)2 fh f α−2 sin2(πτf )df . (5) Problem: if α −1, the integral does not converge as f tends to 0

◮ The use of the statistical variance can cause entropy overestimation Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-9
SLIDE 9

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Allan variance and its computation from the PSD 9 Time domain t hτ(t) −τ τ 1/2τ −1/2τ Frequency domain |Hτ(f )|2 = sin(πτf ) πτf 2 sin2(πτf ) (6) Allan Variance of the jitter computed for α ∈ [−2; 2] from window τ σ2

y(τ) = 2

  • α=−2

2hα (πτ)2 fh f α−2 sin4(πτf )df (7) Convergence ensured for α > −3 as f tends to 0:

◮ Allan variance is accurate, even in presence of low frequency noises Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-10
SLIDE 10

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Allan variance estimation from a limited data set 10 An average fractional frequency can be used Average frequency deviation yk over a time interval of length τ

◮ Corresponds to the fluctuations while counting the number of periods

  • f the jittery signal over τ

Estimate of the Allan variance: σ2

y(τ) =

1 2(M − 1)

M−1

  • i=1
  • yi+1 − yi

2 . (8)

֒ → M : total number of y k’s.

For α = 0, σ2

y(τ) is an unbiased estimator of the variance

even for a finite M

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-11
SLIDE 11

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Experimental results 11

2 4 6 8 10 12 64 256 1024 4096 16384 65536 262144 1.04858e+06 variance M Allan variance Statistical variance

Variance dependence on the number of samples M

◮ Allan variance stable ◮ Statistical variance

increases with M

0.01 0.1 1 10 100 1000 10000 100000 1e+06 1e+07 100 1000 10000 100000 1e+06 1e+07 1e+08 variance k Allan variance Statistical variance

Variance dependence on the jitter accumulcation period k

◮ Allan variance always

below statistical variance

◮ Statistical variance causes

entropy rate overestimation

Similar results for both types of free running oscillators studied

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-12
SLIDE 12

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Hardware implementations 12 Statistical variance

Reg

ena

V(cnt) cnt

12.0 24.0

Reg

rst

Reg

rst

Reg

ena 12.12 24.24 24.12 24.24

M counter

ena

cnt_rdy c c c c c c c

ena ena

3 adders/subtractors, 2 multipliers

Allan variance

Var(cnt) cnt

12.0

Reg

rst

M counter

ena

cnt_rdy c c Reg

ena

c Reg c

ena 4.0

Reg c

ena 8.0

Reg c

ena 16.0 ena 8.0 3.13

yi yi+1 var_rdy

1 adder/subtractor, 1 multiplier

Comparison with the state-of-the-art methods

Method Area fmax fmax fmax Power

ALM/Regs DSPs [MHz] [mW]

Haddad et al. 119/160 2 178.3 6-7 Fischer and Lubicz 169/200 4 187.7 7-8 Proposed method, Eq. (8) 49/117 1 238.5 4-5

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-13
SLIDE 13

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

1

Variance and Allan variance

2

High order Markov model for entropy rate estimation from autocorrelated signals

3

Experimental results

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-14
SLIDE 14

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

The use of high order Markov chain models for entropy estimation 14 Min-entropy Min-entropy is the most conservative entropy measure

◮ Avoids entropy rate overestimation ◮ Hard to estimate in general

Recent approach offers efficient way to estimate min-entropya:

◮ Information sources modeled as high order Markov chains

  • aS. Kamath and S. Verdu, Estimation of entropy rate and Renyi entropy rate for Markov chains, IEEE

International Symposium on Information Theory 2016

Markov chain Convenient to model temporal short-term dependencies

◮ Higher order models give more accuracy but are much more complex

Depending on jitter properties and the randomness extraction process, we use an 8-th order Markov model to study dependencies

◮ Model parameters: {0, 1}8 states, transition matrix 28 × 28 Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-15
SLIDE 15

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Entropy estimates from the 8-th order Markov chain model 15 Randomness extraction method: sampling the jittery clock

Jitter accumulation time Markov AIS 31 AIS 31 T8 NIST NIST chain Procedure B 800-90B 800-90B

Periods of s2 min-entropy Shannon entropy IID min-entropy

10 000 0.8102 failed 0.9844 non-IID 0.648 20 000 0.8105 failed 0.9851 non-IID 0.647 30 000 0.8102 failed 0.9847 non-IID 0.648 50 000 0.9369 failed 0.9992 non-IID 0.673 100 000 0.9012 failed 0.9935 non-IID 0.670

Randomness extraction method: counting the jittery clock periods

Jitter accumulation time Markov chain AIS 31 AIS 31 T8 NIST NIST Procedure B 800-90B 800-90B

Periods of s2 min-entropy Shannon entropy IID min-entropy

10 000 0.8089 failed 0.9966 non-IID 0.844 15 000 0.9769 passed 0.9998 non-IID 0.931 20 000 0.9865 passed 0.9999 IID 0.999 25 000 0.9907 passed 0.9999 IID 0.998 100 000 0.9910 passed 0.9999 IID 0.998 Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-16
SLIDE 16

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

1

Variance and Allan variance

2

High order Markov model for entropy rate estimation from autocorrelated signals

3

Experimental results

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-17
SLIDE 17

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Impact of the surrounding logic on the jitter and entropy rate 17 Three projects implemented Blocks placed exactly on the same place in the same FPGA

Osc2 Osc1

Logic Device Oscilloscope

Var(X) Computation LVDS I/F LVDS I/F Two differential probes s1 s2

Project 1

Osc1

Logic Device Oscilloscope

Var(X) Computation LVDS I/F LVDS I/F Two differential probes Embedded Variance Measurement

Host PC

Simple serial interface Oscillator Based TRNG Acquisition Card USB I/F AES Cipher Quartz

  • sc.

s1 s2

Project 2

Osc1

Logic Device Oscilloscope

Var(X) Computation LVDS I/F LVDS I/F Two differential probes Embedded Variance Measurement

Host PC

Simple serial interface Oscillator Based TRNG Acquisition Card USB I/F AES Cipher Osc2 s1 s2

Project 3 Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-18
SLIDE 18

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Impact of the surrounding logic on the jitter and entropy rate 18

Project σ1 [ps] σ2 [ps] Var(cnt) Avar(N) Project 1 (just two rings) 3.9 3.3 14.01 2.79 Project 2 (ring + ext.osc. + other logic) 9.7 7.3 26.94 4.33 Project 3 (two rings + other logic) 10.6 10.0 14.72 2.76

Oscillator jitter increases when a full cryptosystem is implemented

◮ Surrounding logic has inevitable impact on clock jitters

However, variances of counter values do not change when both

  • scillators are implemented inside the device!

External clocks

◮ Cause entropy rate overestimation ◮ Introduce manipulable global noise sources into the generator Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-19
SLIDE 19

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Comparison of RO and STR as sources of randomness 19 Autocorrelation of raw counter values and their first differences

◮ Two identical rings (RO or STR) ◮ One ring (RO or STR) and an external quartz oscillator

RO and STR exhibit the same behavior in terms of jitter produced The use of identical oscillators reduces autocorrelations First order difference removes large portion of autocorrelation

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-20
SLIDE 20

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Conclusions Counting jittery clock periods gives higher quality random numbers

◮ Higher bit rate with higher entropy rate ◮ Counter values can be used for online jitter monitoring

Allan variance should be used to estimate entropy rate rather than the statistical variance

◮ Not sensitive to window size – impact of low frequency noises can be

reduced using small windows without loosing precision

◮ Smaller circuitry required for implementation

Differential principle of the TRNG design is a stringent requirement, not a recommendation

◮ Global, manipulable noises are strong and always present

High order Markov chain models provide good min-entropy estimates and are efficient to detect dependencies in generated numbers

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness

slide-21
SLIDE 21

Variance and Allan variance High order Markov model for entropy rate estimation Experimental results

Acknowledgments

This work was performed in the framework of the project

Hardware Enabled Crypto and Randomness

The HECTOR project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement number 644052 starting from March 2015 www.hector-project.eu

Noumon Allini, Sk´

  • rski, Petura, Bernard, Laban, Fischer

Free running oscillators as sources of randomness