The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator University of the Philippines Cebu Department of Computer Science Cmsc142, Cmsc190,

Slides:



Advertisements
Similar presentations
Foundations of Cryptography Lecture 10 Lecturer: Moni Naor.
Advertisements

CS470, A.SelcukStream Ciphers1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Generating Random Numbers
Random Number Generation Graham Netherton Logan Stelly.
Random variables 1. Note  there is no chapter in the textbook that corresponds to this topic 2.
History of Random Number Generators Bob De Vivo Probability and Statistics Summer 2005.
Random Numbers. Two Types of Random Numbers 1.True random numbers: True random numbers are generated in non- deterministic ways. They are not predictable.
Random Number Generators. Why do we need random variables? random components in simulation → need for a method which generates numbers that are random.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Linearization of Stream Ciphers in Terms of Cellular Automata Amparo Fúster-Sabater Institute of Applied Physics (CSIC) Madrid (Spain)
Stream cipher diagram + + Recall: One-time pad in Chap. 2.
1 Random Number Generation H Plan: –Introduce basics of RN generation –Define concepts and terminology –Introduce RNG methods u Linear Congruential Generator.
Pseudorandom Number Generators
Pseudorandom Bit Generation Artur Gadomski Piero Giammarino Henrik Goldman Massimo Giulio Caterino.
Module C9 Simulation Concepts. NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas --
CSCE Monte Carlo Methods When you can’t do the math, simulate the process with random numbers Numerical integration to get areas/volumes Particle.
Random numbers in Python Nobody knows what’s next...
Even More Random Number Generators Using Genetic Programming Joe Barker.
Computer Security CS 426 Lecture 3
15-853Page :Algorithms in the Real World Generating Random and Pseudorandom Numbers.
Random Number Generation Fall 2013
Generating Random Numbers in Hardware. Two types of random numbers used in computing: --”true” random numbers: ++generated from a physical source (e.g.,
Pseudorandom Number Generators. Randomness and Security Many cryptographic protocols require the parties to generate random numbers. All the hashing algorithms.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
ETM 607 – Random Number and Random Variates
Random Number Generators CISC/QCSE 810. What is random? Flip 10 coins: how many do you expect will be heads? Measure 100 people: how are their heights.
A SCALABLE LIBRARY FOR PSEUDORANDOM NUMBER GENERATION ALGORITHM 806: SPRNG.
Random Numbers CSE 331 Section 2 James Daly. Randomness Most algorithms we’ve talked about have been deterministic The same inputs always give the same.
Random Number Generators Tamer ÖZ. Random Number Generators OUTLINE Randomness And Random Number Usefulness Of Random Numbers Random Number Generators.
Governor’s School for the Sciences Mathematics Day 13.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
CPSC 531: RN Generation1 CPSC 531:Random-Number Generation Instructor: Anirban Mahanti Office: ICT Class Location:
Chapter 7 Random-Number Generation
Information Security Lab. Dept. of Computer Engineering 182/203 PART I Symmetric Ciphers CHAPTER 7 Confidentiality Using Symmetric Encryption 7.1 Placement.
Random Number Generators 1. Random number generation is a method of producing a sequence of numbers that lack any discernible pattern. Random Number Generators.
Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Monte Carlo Methods.
Experimental Method and Data Process: “Monte Carlo Method” Presentation # 1 Nafisa Tasneem CHEP,KNU
Computer Science and Mathematical Basics Chap. 3 발표자 : 김정집.
CELLULAR AUTOMATA A Presentation By CSC. OUTLINE History One Dimension CA Two Dimension CA Totalistic CA & Conway’s Game of Life Classification of CA.
Cellular Automata Martijn van den Heuvel Models of Computation June 21st, 2011.
Randomness Test Fall 2012 By Yaohang Li, Ph.D.. Review Last Class –Random Number Generation –Uniform Distribution This Class –Test of Randomness –Chi.
CS221 Random Numbers. Random numbers are often very important in programming Suppose you are writing a program to play the game of roulette The numbers.
Network Security Lecture 18 Presented by: Dr. Munam Ali Shah.
RADHA-KRISHNA BALLA 19 FEBRUARY, 2009 UCT for Tactical Assault Battles in Real-Time Strategy Games.
PRNGs Pseudo-random number generation. Randomness and Cryptography Randomness and pseudo-randomness are useful in cryptography: –To generate random and.
DES Analysis and Attacks CSCI 5857: Encoding and Encryption.
Cellular Automata Martijn van den Heuvel Models of Computation June 21st, 2011.
CS851 – Biological Computing February 6, 2003 Nathanael Paul Randomness in Cellular Automata.
Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN
Random numbers in C++ Nobody knows what’s next....
Random Numbers RANDOM VS PSEUDO RANDOM. Truly Random numbers  From Wolfram: “A random number is a number chosen as if by chance from some specified distribution.
CS 615: Design & Analysis of Algorithms Chapter 7: Randomized Algorithms (Weiss Chap.: 10.4)
1.  How does the computer generate observations from various distributions specified after input analysis?  There are two main components to the generation.
Key Wrap Algorithm.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 2 – Stream Ciphers These slides were.
Sub-fields of computer science. Sub-fields of computer science.
Generating Random Numbers
A cryptographically secure pseudorandom number generator for Julia
Random Number Generation
Random-Number Generation
Random vs pseudo random
CS 475/575 Slide set 4 M. Overstreet Old Dominion University
Chapter 7 Random-Number Generation
STREAM CIPHERS by Jennifer Seberry.
Cryptography and Network Security Chapter 7
Computer Simulation Techniques Generating Pseudo-Random Numbers
Generating Random and Pseudorandom Numbers
Generating Random and Pseudorandom Numbers
Pseudorandom Numbers Network Security.
Presentation transcript:

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

The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 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

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 3 Conceptual Framework Random Numbers PRNGs Shrinking Rule 30 CA PRNG Rule 30 CA PRNG

February 12, 2011 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

February 12, 2011 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?

February 12, 2011 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?

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 7 History of RNG 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

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

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 9 History of RNG Lehmer’s Congruential Generator: m = 31, a = 3, c = 0, x 0 = 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) x i = (3 Xi-1 ) mod 31

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

February 12, 2011 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 b 1 = b 2 = b 3 = b 4 = b 5 = 1. So, b i = b i-5 XOR b i-3 produces b 6 = b 1 XOR b 3 = 1 XOR 1 = 0 b 7 = b 2 XOR b 4 = 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 b 1 …b p with the b i all being 0 or 1. Subsequent bit values are produced via the recursion b i = b i-p XOR b i-p+q

February 12, 2011 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

February 12, 2011 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)

February 12, 2011 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

February 12, 2011 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)

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 16 Conceptual Framework Random Numbers PRNGs Shrinking Rule 30 CA PRNG Rule 30 CA PRNG

February 12, 2011 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)].

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 18

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 19

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

February 12, 2011 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)

February 12, 2011 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

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

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 24 Conceptual Framework Random Numbers PRNGs Shrinking Rule 30 CA PRNG Rule 30 CA PRNG

February 12, 2011 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)

February 12, 2011 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

February 12, 2011 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

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 28 Shrinking Rule 30 CA PRNG: Methodology Statistical Test Suite 1. Frequency or equidistribution test 2. Serial test 3. Gap test 4. Poker test 5. Coupon collector’s test 6. Permutation test 7. Runs up test 8. Maximum-of-t test 9. Avalanche effect

February 12, 2011 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()

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 30 Shrinking Rule 30 CA PRNG: Expected Results In terms of intuitive execution 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

February 12, 2011 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

February 12, 2011 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]

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 33 Q&A

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 34 Thank You!

February 12, 2011 The Shrinking Rule 30 Cellular Automata Pseudorandom Number Generator 35 References Lawrence, A.P. (2003) Random Numbers. Available online: [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 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: dex.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: [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, Meier, W. and Staffelbach, O. (1998) Analysis of Pseudo Random Sequences by Cellular Automata. Springer Verlag. p Andersson, K. (2003) Cellular Automata. Computer Science, Karlstad University.