1 invent yourself
play

1. Invent Yourself source: www.dilbert.com Byung Hoon Cho New - PowerPoint PPT Presentation

1. Invent Yourself source: www.dilbert.com Byung Hoon Cho New Zealand 2016 1 The Problem Truly random numbers are a very valuable and rare resource. Design, produce, and test a mechanical device for producing random numbers. Analyse to


  1. 1. Invent Yourself source: www.dilbert.com Byung Hoon Cho New Zealand 2016 1

  2. The Problem Truly random numbers are a very valuable and rare resource. Design, produce, and test a mechanical device for producing random numbers. Analyse to what extent the randomness produced is safe against tampering 2 Problem Definitions Randomness Design Generation Testing Tampering

  3. The Problem Truly random numbers are a very valuable and rare resource. Design, produce, and test a mechanical device for producing random numbers. Analyse to what extent the randomness produced is safe against tampering 3 Problem Definitions Randomness Design Generation Testing Tampering

  4. Defining “Random” 1. Independent and equal probability 2. Unrelated cause 3. PaQernless/Unpredictable 4 Problem Definitions Randomness Design Generation Testing Tampering

  5. Defining “Tampering” • Any change causing a change in the: • Independence of the numbers, or • DistribuTon of the numbers, or • Predictability of the next number • “Safe against tampering” • “Safe” if tampering can be detected 5 Problem Definitions Randomness Design Generation Testing Tampering

  6. Random: Local vs Global 11 12 10 19 20 08 13 14 05 07 16 03 15 23 00 21 06 01 22 17 09 04 02 18 13 17 00 08 06 22 16 02 18 11 15 01 04 09 07 19 20 21 23 12 10 14 05 03 12 05 16 17 08 01 06 10 15 20 22 09 21 23 00 02 18 14 04 03 11 19 13 07 17 18 10 11 15 01 14 21 06 05 09 16 13 23 07 12 00 20 04 08 22 02 03 19 11 12 10 19 20 08 13 14 05 07 16 03 15 23 00 21 06 01 22 17 09 04 02 18 6 Problem Definitions Randomness Design Generation Testing Tampering

  7. Random: Local vs Global 11 12 10 19 20 08 13 14 05 07 16 03 15 23 00 21 06 01 22 17 09 04 02 18 13 17 00 08 06 22 16 02 18 11 15 01 04 09 07 19 20 21 23 12 10 14 05 03 12 05 16 17 08 01 06 10 15 20 22 09 21 23 00 02 18 14 04 03 11 19 13 07 17 18 10 11 15 01 14 21 06 05 09 16 13 23 07 12 00 20 04 08 22 02 03 19 11 12 10 19 20 08 13 14 05 07 16 03 15 23 00 21 06 01 22 17 09 04 02 18 7 Problem Definitions Randomness Design Generation Testing Tampering

  8. Random: Local vs Global 11 12 10 19 20 08 13 14 05 07 16 03 15 23 00 21 06 01 22 17 09 04 02 18 13 17 00 08 06 22 16 02 18 11 15 01 04 09 07 19 20 21 23 12 10 14 05 03 12 05 16 17 08 01 06 10 15 20 22 09 21 23 00 02 18 14 04 03 11 19 13 07 17 18 10 11 15 01 14 21 06 05 09 16 13 23 07 12 00 20 04 08 22 02 03 19 11 12 10 19 20 08 13 14 05 07 16 03 15 23 00 21 06 01 22 17 09 04 02 18 8 Problem Definitions Randomness Design Generation Testing Tampering

  9. Possible Devices • RouleQe wheel • DeterminisTc • Simulators allow for predicTon 9

  10. Possible Devices • Compound pendulum • Non-uniform distribuTon 10

  11. Possible Devices • RadioacTve decay • Truly random • Non-mechanical 11

  12. Part 1 - Design • Fluids • Currently very difficult to model • ChaoTc system • Closed system • ConTnuous process • Increases speed/efficiency of RNG 12 Problem Definitions Randomness Design Generation Testing Tampering

  13. Reynolds Number • Predicts how turbulent a fluid system is Re = v D h • ν • D h = length of square side • ν = kinemaTc viscosity of fluid (air) • v = velocity of fluid • Re of produced tube = 8.0 x 10 5 13 Problem Definitions Randomness Design Generation Testing Tampering

  14. Device Design 36 mm 1.2 m 14 Problem Definitions Randomness Design Generation Testing Tampering

  15. MoTon of the Balls F fluid p f p i 16 Problem Definitions Randomness Design Generation Testing Tampering

  16. MoTon of the Balls Fluid Force Weight Force Net Force 17 Problem Definitions Randomness Design Generation Testing Tampering

  17. MoTon of the Balls Fluid Force Weight Force Net Force Force due to Collision 18 Problem Definitions Randomness Design Generation Testing Tampering

  18. MoTon of the Balls Fluid Force Weight Force Net Force Force due to Collision Magnus Force 19 Problem Definitions Randomness Design Generation Testing Tampering

  19. GeneraTng Numbers 20 Problem Definitions Randomness Design Generation Testing Tampering

  20. GeneraTng Numbers 21 Problem Definitions Randomness Design Generation Testing Tampering

  21. GeneraTng Numbers 22 Problem Definitions Randomness Design Generation Testing Tampering

  22. GeneraTng Numbers 23 Problem Definitions Randomness Design Generation Testing Tampering

  23. GeneraTng Numbers • Raw data is in binary (each 0 or 1 is a ‘bit’) • Take a number of bits (for now, 3 bits) • Convert from binary to decimal • 3 bits generate a number in range [0, 7] 24 Problem Definitions Randomness Design Generation Testing Tampering

  24. GeneraTng Numbers 10100100010111001111010000110011001011011100010100 10000001100010100100111011000000111111111000101010 01110100110101111110011100001001000010010011111101 00111010000001110001100110011010010110011111001011 01110010100110111001011000001110001110000111110111 11001100000111100011100100101000100111011101010111 00010000101111001110110111100110010111101111110011 11101110011111110111110011110100101001111101100111 01111010100001110111110011001000011101010111001100 11010111000110111011101011000110110011111101010011 00110111000011011010111111111010100011011100011110 10010010011110100100001010011011101010100001010011 11000110001110101011011010001110110101111000101001 00011000010011010101011100111111111001100001010100 01001101011101110011011010110111011100101101011001 25 Problem Definitions Randomness Design Generation Testing Tampering

  25. TesTng Randomness • Uniform distribuTon • Frequency of 1s and 0s • Frequency of 3-bit numbers • “Binomial poker test” • Independence • Frequency of 0 → 0, 0 → 1, 1 → 1, 1 → 0 • CondiTonal frequency of 3-bit numbers • PaQern • Longest repeated subsequence • Hidden paQerns: Fourier transform 26 Problem Definitions Randomness Design Generation Testing Tampering

  26. Chi-square ( 휒 2 ) • For each category (e.g. 3-bit number or 1 →0), work out expected frequency • Use the formula: χ 2 = ∑ (Observed( X ) - Expected( X )) 2 Expected( X ) 27 Problem Definitions Randomness Design Generation Testing Tampering

  27. Chi-square ( 휒 2 ) • Degrees of freedom (DoF) = # categories - 1 • Find table value for significance level (5%) and DoF • If calculated value > table value, reject null hypothesis • Non-randomness of the sequence is probably NOT due to global randomness • Tampering is probably occurring 28 Problem Definitions Randomness Design Generation Testing Tampering

  28. Chi-square ( 휒 2 ) • Degrees of freedom (DoF) = # categories - 1 Cri'cal Value at DoF 5% Significance Level • Find table value for significance level (5%) and DoF 1 3.841 2 5.991 • If calculated value > table value, reject null 3 7.815 hypothesis 4 9.488 • Non-randomness of the sequence is probably 5 11.070 NOT due to global randomness 6 12.592 7 14.067 • Tampering is probably occurring 8 15.507 28 Problem Definitions Randomness Design Generation Testing Tampering

  29. Hypotheses • H 0 : distribuTon is independent / random • H 1 : distribuTon is not independent / random 29 Problem Definitions Randomness Design Generation Testing Tampering

  30. Test Results - Bits N = 5000 Colour Frequency % of N Red (0) 2536 50.7 Green (1) 2464 49.3 휒 2 = 1.04 (< 3.84 ∴ random) 30 Problem Definitions Randomness Design Generation Testing Tampering

  31. Test Results - 3 Bits 300 250 Expected: 208 200 Frequency N = 1666 150 휒 2 = 7.67 100 (< 14.07 ∴ random) 50 0 0 1 2 3 4 5 6 7 3-bit Number 31 Problem Definitions Randomness Design Generation Testing Tampering

  32. Predictability TesTng • Longest repeated subsequence • Whole sequence: 5000 bits • Longest repeat: 22 bits • 0.88% of whole sequence 32 Problem Definitions Randomness Design Generation Testing Tampering

  33. Fourier Transform 120 Power / Arbitrary Units 100 80 60 40 20 0 0 0.2 0.4 0.6 0.8 1 Frequency / Hz 33 Problem Definitions Randomness Design Generation Testing Tampering

  34. Part 5 - Tampering • Colour of light • Camera detects light reflected off balls • Ball paint colour determines which wavelengths of light are reflected • Ball properTes • Shape • Mass 34 Problem Definitions Randomness Design Generation Testing Tampering

  35. Light 35 Problem Definitions Randomness Design Generation Testing Tampering

  36. Light 36 Problem Definitions Randomness Design Generation Testing Tampering

  37. Part 5 - Tampering 37 Problem Definitions Randomness Design Generation Testing Tampering

  38. Part 5 - Tampering 37 Problem Definitions Randomness Design Generation Testing Tampering

  39. Number of Balls - Part 1 Green : Red Red / % N 휒 2 bits 휒 2 3-bits 20 : 20 50.7 5000 1.04 7.67 20 : 18 48.8 5000 2.78 25.30 20 : 16 45.7 5000 37.32 55.27 20 : 14 39.7 5000 213.00 255.31 20 : 10 32.9 5000 583.45 717.64 3.84 14.07 휒 2 threshold at p = 0.05 38 Problem Definitions Randomness Design Generation Testing Tampering

Recommend


More recommend