1 / 35

The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator. University of the Philippines Cebu Department of Computer Science Cmsc142, Cmsc190, Cmsc199 Nico Martin A. Eñego February 12, 2011. Outline. Randomness: What is it? History True Randomness vs. Pseudo randomness

sabine
Download Presentation

The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator University of the Philippines Cebu Department of Computer Science Cmsc142, Cmsc190, Cmsc199 Nico Martin A. Eñego February 12, 2011

  2. Outline • Randomness: What is it? • History • True Randomness vs. Pseudo randomness • Rule 30 Cellular Automata RNG • Problems with R30 • The Problem and The Literature Trend • Shrinking Rule 30 Cellular Automata RNG • Methodology • Expected Results • Recommendations • Q&A • References The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  3. PRNGs Rule 30 CA PRNG Random Numbers Shrinking Rule 30 CA PRNG Conceptual Framework The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  4. Randomness: What is it? • Random number generators (RNGs) have a myriad of real world applications • games, experiments and statistics, gambling, simulations, random search optimization etc. • There is a need of a better random number source for specific uses (more random, efficiency, size) • Cryptology, security and online gambling The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  5. Randomness: What is it? • Some concepts: sporadic, irregular, nonuniform, a/periodic, Pattern? • How do we prove randomness when an exact universal definition is missing? The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  6. Randomness: What is it? • What is more random, 9898 or 7878? • Philosophical question: Physical phenomena (coin flipping, noise) are said to be random, but… “God does NOT play dice with the universe.” -Albert Einstein • Is the universe deterministic? The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  7. 1941: ATT Machine generating random sequence 1946: Table of random numbers by Tippet and von Neumann’s Middle Square Approach 1951: Lehmer’s Congruential Generator History of RNG The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  8. History of RNG Middle Square Approach by von Neumann: Example: Suppose we want 5 digit numbers and start with 12345. Then, (12345)2 = 152399025 and the next number is 23990 int msa( int s, int d ){ square s; //s must be d-digit int return middle d-digits; } The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  9. History of RNG Lehmer’s Congruential Generator: m = 31, a = 3, c = 0, x0 = 9. • Solution: 27; 19; 26; 16; 17; 20; 29; 25; 13; 8; 24; 10; 30; 28; 22; 4; 12; 5; 15; 14; 11; 2; 6; 18; 23; 7; 21; 1; 3; 9 (at which point series repeats) xi = (3Xi-1) mod 31 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  10. Lehmer’s congruential generator is also known as linear congruential generator Not so random! Quadratic Congruential Generators Short periods occupies much space History of RNG The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  11. History of RNG • Linear Feedback Shift Registers: • Example: Take p = 5; q = 2; r = 3 and b1 = b2 = b3 = b4 = b5 = 1. So, bi = bi-5 XOR bi-3 produces b6 = b1 XOR b3 = 1 XOR 1 = 0 b7 = b2 XOR b4 = 1 XOR 1 = 0 Suppose that r-bit integers are to be generated. Then, for some integer p, start with a p-bit seed of the binary form b1…bp with the bi all being 0 or 1. Subsequent bit values are produced via the recursion bi = bi-p XOR bi-p+q The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  12. History of RNG • Cellular Automata Generators (1985): • Originates from simple rules • Very large periods • Chaotic behavior The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  13. Randomness: TRN vs PRN • Coin Flipping: Truly random or difficult-to-describe system? • Simka et al. (2006): Randomness appears in the “instability” of the system. • Two types of random number generators • Truly Random Number Generator (TRNG): generates Truly random numbers (TRNs) • Pseudo Random Number Generator (PRNG): generates pseudo random numbers (PRNs) The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  14. Randomness: TRN vs PRN • Truly random number (TRN): • Cannot be subsequentially reliably reproduced (nondeterministic) • Unrepeatable even with same working conditions (aperiodic) • Needs external physical phenomena (inefficient) • Pseudo-random number (PRN) is a number that is generated by and algorithm or a pre-calculated table of values • Deterministic, periodic, efficient The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  15. Randomness: TRN vs PRN • TRN and PRN are both widely used today • There are a lot of TRN sources (lava lamp) • For some applications, PRNG are more reasonable because of their properties • A good PRNG usually needs a random seed which would be good if it comes from a TRNG (Hybrid generator) The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  16. PRNGs Rule 30 CA PRNG Random Numbers Shrinking Rule 30 CA PRNG Conceptual Framework The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  17. Rule 30 CA PRNG • Introduced by S. Wolfram in 1983 & 1987 • It is a class III rule: chaotic and aperiodic x(n+1,i) = x(n,i-1) XOR [x(n,i) OR x(n,i+1)]. The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  18. The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  19. The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  20. Rule 30 CA PRNG • RNG used in Mathematica • 2n repetition: insignificant according to Andersson (2003) function rule30CAPRNG(time seed, int n){ evolve seed n times; take middle bits of each evolution; } The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  21. The Problem and The Literature Trend • It is possible to crack Rule 30 CA • Meier-Staffelbach (1998) Attack • Completion backwards • Completion forwards • Requires lots of resources (but possible) The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  22. The Problem and The Literature Trend • A Rule 30 CA based PRNG that can counter the Meier-Staffelbach Attack • PRNG that passes statistical test suite for randomness • PRNG that generates more randomness compared to other PRNGs • Considerable execution time The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  23. Wolfram’s rule 30 CA PRNG Rule 30 CA linearity weaknesses (Meier and Staffelbach) Hybrid CA PRNG Irregular Sampling (Clark and Essex) Controllable CA PRNG (Guan et al.) Programmable CA PRNG (Nandi et al.) The Problem and The Literature Trend The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  24. PRNGs Rule 30 CA PRNG Random Numbers Shrinking Rule 30 CA PRNG Conceptual Framework The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  25. Shrinking Rule 30 CA PRNG • The Shrinking Rule 30 CA suggested by Clark and Essex (2004) The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  26. Shrinking Rule 30 CA PRNG • Important concepts of Clark and Essex model • Storage requirement is a bit large • Speed is relatively slower compared to other RNG • Random and secure but not tested • The use of a non-CA controller Non-CA RNG The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  27. Shrinking Rule 30 CA PRNG: Methodology • Aspects to test: • Intuitive description of execution time • Statistical tests of randomness and the Avalanche Effect • Execution times and randomness of different RNGs will be compared • CPRNG vs. SR30CAPRNG • WR30CAPRNG vs. SR30CAPRNG • CESR30CAPRNG vs. SR30CAPRNG The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  28. Shrinking Rule 30 CA PRNG: Methodology • Statistical Test Suite • Frequency or equidistribution test • Serial test • Gap test • Poker test • Coupon collector’s test • Permutation test • Runs up test • Maximum-of-t test • Avalanche effect The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  29. Shrinking Rule 30 CA PRNG: Methodology • Intuitive execution time tests • Attach clock for every program • Generate 1000 integers, 100 runs • Average execution times of all 100 runs • Compare significance of difference using statistics • All programs implemented in C • CPRNG implemented using rand() • All programs seeded with time() The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  30. Shrinking Rule 30 CA PRNG: Expected Results • In terms of intuitiveexecution time, the researcher expects the following: • CPRNG < WR30CAPRNG < SR30CAPRNG < CESR30CAPRNG • In terms of randomness, security and avalanche statistics, the researcher expects the following: • CPRNG < WR30CAPRNG < CESR30CAPRNG < SR30CAPRNG The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  31. Shrinking Rule 30 CA PRNG: Recommendations • Fuse CCA and PCA concepts with shrinking generator • Use a more random generator (TRNG) for the seed • Devise a way to generate small integers • Improve intuitive execution time tests for programs to reflect optimal performance by using parallel programming (threading) and dedicated machines The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  32. “We can only see a short distance ahead, but we can see plenty there that needs to be done.” Alan Turing, Father of Computer Science [p.460 of the Computing Machinery and Intelligence, 1950] The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  33. Q&A The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  34. Thank You! The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

  35. References • Lawrence, A.P. (2003) Random Numbers. Available online: http://aplawrence.com/Basics/randomnumbers.html/ [December 5, 2010] • Park S. and Miller K. (1988) Random Number Generators: Good Ones Are Hard to Find. Computing Practices. Communications of the ACM, vol. 31, p. 1192. • Bell, J. Fast Random Numbers. A Random Generator That is 10 Times Faster. Clinton South Carolina. Volume 8, Issue 3, Column Tag: Coding Efficiently. Available online: http://www.mactech.com/articles/mactech/Vol.08/08.03/RandomNumbers/index.html/ [December 5, 2010] • Haahr, M. Random.org. Introduction to Randomness and Random Numbers. Trinity College, School of Computer Science and Statistics, Trinity, Ireland. Available online: http://www.random.org/randomness/ [December 5, 2010] • Clark, J. and Essex, A. (2004) Real Time Encryption Using Cellular Automata. The University of Western Ontario, Department of Electrical and Computer Engineering. March 26, 2004. • Meier, W. and Staffelbach, O. (1998) Analysis of Pseudo Random Sequences by Cellular Automata. Springer Verlag. p.186-199 • Andersson, K. (2003) Cellular Automata. Computer Science, Karlstad University. The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator

More Related