post processing functions for a biased physical random
play

Post-processing functions for a biased physical random number - PowerPoint PPT Presentation

Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Post-processing functions for a biased physical random number generator Patrick Lacharme Universit de Toulon, Institut de Mathmatique


  1. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Post-processing functions for a biased physical random number generator Patrick Lacharme Université de Toulon, Institut de Mathématique (Imath) Fast Software Encryption 2008 1/27 Patrick Lacharme Post-processing functions for a biased physical random n

  2. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Overview Statistical model 1 Linear corrector 2 Non linear corrector 3 Systematic construction 4 2/27 Patrick Lacharme Post-processing functions for a biased physical random n

  3. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Overview Statistical model 1 Linear corrector 2 Non linear corrector 3 Systematic construction 4 3/27 Patrick Lacharme Post-processing functions for a biased physical random n

  4. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion True random number generator A true random number generator consists of two different parts : A physical non deterministic phenomenon produces a raw binary sequence. A deterministic function, called corrector, compress this sequence in order to reduce statistical weakness. 4/27 Patrick Lacharme Post-processing functions for a biased physical random n

  5. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Statistical model for the raw sequence The bias e is the deviation from 1/2 of the probability of occurence of a bit x i : e = | P ( x i = 0 ) − 1 / 2 | = | P ( x i = 1 ) − 1 / 2 | . Hypothesis : the bits x i of the raw sequence are independents and have a constant bias e . A corrector is a function mapping a vector x of n bits to a vector y of m bits, with compression rate m / n . 5/27 Patrick Lacharme Post-processing functions for a biased physical random n

  6. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Output biais of a Boolean function Let e be the bias of the n input x i . For a Boolean function f mapping F n 2 to F 2 , the output bias ∆ f of f is ∆ f ( e ) = | P ( f ( x ) = 1 ) − 1 / 2 | = | P ( f ( x ) = 0 ) − 1 / 2 | . (1) For a vectorial function f mapping n bits to m bits, the output bias of a linear combination of f i � m i = 1 u i f i ( x ) = u . f ( x ) is : ∆ u . f ( e ) = | P ( u . f ( x ) = 1 ) − 1 / 2 | = | P ( u . f ( x ) = 0 ) − 1 / 2 | . 6/27 Patrick Lacharme Post-processing functions for a biased physical random n

  7. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion First formula of output bias of a Boolean function From (1), the output bias ∆ f ( e ) is a polynomial in e : � ∆ f ( e ) = − 1 ( 1 2 − e ) n − w h ( x ) ( 1 2 + e ) w h ( x ) ( − 1 ) f ( x ) (2) 2 x ∈ F n 2 = a 0 + a t e t + a t + 1 e t + 1 + . . . Moreover, ∆ f ( e ) have no constant term if and only if f is balanced. Construction of functions which maximalise the valuation t ? 7/27 Patrick Lacharme Post-processing functions for a biased physical random n

  8. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Three linear correctors M. Dichtl (FSE’07) : Bad and Good ways of post-processing biased physical random numbers . Three linear correctors mapping 16 bits to 8 bits : y i = x i + x i + 1 mod 8 + x i + 8 mod 2. 1 y i = x i + x i + 1 mod 8 + x i + 2 mod 8 + x i + 8 mod 2. 2 y i = x i + x i + 1 mod 8 + x i + 2 mod 8 + x i + 4 mod 8 + x i + 8 mod 2. 3 Same compression rate as xor corrector : y i = x 2 i + x 2 i + 1 mod 2 . 8/27 Patrick Lacharme Post-processing functions for a biased physical random n

  9. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Analysis of the bias These correctors are designed to reduce the output bias. Same hypothesis on input bias. Approach : determine probability of every inputs and sum up the probability of occurence leading the same output. Results : bias of any output bytes is a polynomial in e and the lowest power in e is respectly 3, 4 and 5. Systematic construction of corrector with variable input sizes and compression rates ? 9/27 Patrick Lacharme Post-processing functions for a biased physical random n

  10. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Overview Statistical model 1 Linear corrector 2 Non linear corrector 3 Systematic construction 4 10/27 Patrick Lacharme Post-processing functions for a biased physical random

  11. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Matricial representation of a linear corrector A linear corrector f mapping F n 2 to F m 2 is defined by the 1 matricial product :       h 1 , 1 . . . h 1 , n x 1 y 1  .   .   .  . . . f ( x ) =  =  ,     . . . h m , 1 . . . h m , n x n y m where H = ( h i , j ) is a binary matrix with m rows and n collums. A linear corrector is associated with a [ n , m ] linear code. 2 It corresponds to a syndrom calculation. 3 11/27 Patrick Lacharme Post-processing functions for a biased physical random

  12. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Minimal distance and bias Let f be the linear corrector represented by the matrix H generating a [ n , m , d ] linear code, and e / 2 the input bias. Theorem The output bias ∆ u . f ( e ) of u . f ( x ) is less or equal than e d / 2 . Sketch of proof : The bias of x i 1 + . . . + x i d mod 2 is e d / 2. Any linear combination of output bits is the sum of at least d input bits, by definition of minimal distance of a linear code. 12/27 Patrick Lacharme Post-processing functions for a biased physical random

  13. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Implementation with cyclic codes The syndrom calculation is realized by a polynomial division n k � � m i X i mod g i X i , i = 0 i = 0 which is efficiently implemented with a shift register. g g g 0 1 k m m m 0 1. n r r r 0 1 k 13/27 Patrick Lacharme Post-processing functions for a biased physical random

  14. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Conclusion on linear corrector Equivalence between minimal distance of a linear code and valuation of the bias of linear combination of output bits. For example, the three correctors of M. Dichtl correspond respectly to generator matrix of [16,8,3], [16,8,4] and [16,8,5] linear codes. Moreover, all this part can be generalized with non constant input bias using the d greatest input bias. Non linear corrector can be better than linear corrector ? 14/27 Patrick Lacharme Post-processing functions for a biased physical random

  15. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Overview Statistical model 1 Linear corrector 2 Non linear corrector 3 Systematic construction 4 15/27 Patrick Lacharme Post-processing functions for a biased physical random

  16. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Fourier and Walsh Transform Definition The Fourier transform of a function f with n variables is : � f ( x )( − 1 ) x . u . F f ( u ) = x ∈ F n 2 The Walsh transform of a function f with n variables is : � � ( − 1 ) f ( x ) ⊕ x . u . f ( u ) = x ∈ F n 2 16/27 Patrick Lacharme Post-processing functions for a biased physical random

  17. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Output bias with Walsh coefficients Theorem The output bias ∆ φ u ( e ) of φ u ( x ) = u . f ( x ) is � 1 ( 2 e ) w h ( v ) ( − 1 ) w h ( v )+ 1 � ∆ φ u ( e ) = φ u ( v ) . (3) 2 n + 1 v ∈ F n 2 Sketch of proof : From formula (2) of the bias, we analyse the Fourier transform of the function g ( x ) = ( 1 2 − e ) n − w h ( x ) ( 1 2 + e ) w h ( x ) . 17/27 Patrick Lacharme Post-processing functions for a biased physical random

  18. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Example (1) Let f be the Boolean function defined by f ( x ) = f ( x 1 , x 2 , x 3 ) = x 2 + x 3 + x 1 x 2 + x 2 x 3 mod 2 , where the truth table and the Walsh coefficients are � x f ( x ) f ( x ) 000 0 0 001 1 4 010 1 0 100 0 -4 011 1 4 101 1 0 110 0 4 111 0 0 18/27 Patrick Lacharme Post-processing functions for a biased physical random

  19. Overview Statistical model Linear corrector Non linear corrector Systematic construction Conclusion Example (2) The probability P ( f ( x ) = 0 ) = 1 2 − e computed with formula (2) : P ( f ( x ) = 0 ) = ( 1 2 − e ) 3 +( 1 2 − e ) 2 ( 1 2 + e )+( 1 2 − e )( 1 2 + e ) 2 +( 1 2 + e ) 3 = 1 2 + 2 e 2 . The output bias computed with formula (3), with u = 1, is ∆ f ( e ) = 1 16 (ˆ f ( 000 ) + 2 e ˆ f ( 001 ) + 2 e ˆ f ( 010 ) + 2 e ˆ f ( 100 ) − 4 e 2 ˆ f ( 011 ) − 4 e 2 ˆ f ( 101 ) − 4 e 2 ˆ f ( 110 ) + 8 e 3 ˆ f ( 111 )) = − 2 e 2 . 19/27 Patrick Lacharme Post-processing functions for a biased physical random

Recommend


More recommend