Random Number Generators Tamer ÖZ. Random Number Generators OUTLINE Randomness And Random Number Usefulness Of Random Numbers Random Number Generators.

Slides:



Advertisements
Similar presentations
“Advanced Encryption Standard” & “Modes of Operation”
Advertisements

Spread Spectrum Chapter 7.
Spread Spectrum Chapter 7. Spread Spectrum Input is fed into a channel encoder Produces analog signal with narrow bandwidth Signal is further modulated.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Generating Random Numbers
Random Number Generation Graham Netherton Logan Stelly.
1 A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Application This contribution discusses some aspects of testing.
Random variables 1. Note  there is no chapter in the textbook that corresponds to this topic 2.
Random Number Generation. Random Number Generators Without random numbers, we cannot do Stochastic Simulation Most computer languages have a subroutine,
Cryptography and Network Security Chapter 3
CS457 – Introduction to Information Systems Security Cryptography 1b Elias Athanasopoulos
Random number generation Algorithms and Transforms to Univariate Distributions.
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.
First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown and edited by Archana Chidanandan Cryptographic Tools.
Stream cipher diagram + + Recall: One-time pad in Chap. 2.
Simulation.
Pseudorandom Number Generators
Statistics.
CSCE Monte Carlo Methods When you can’t do the math, simulate the process with random numbers Numerical integration to get areas/volumes Particle.
Lecture 23 Symmetric Encryption
Properties of Random Numbers
Computer Security CS 426 Lecture 3
15-853Page :Algorithms in the Real World Generating Random and Pseudorandom Numbers.
Spread Spectrum Techniques
Random Number Generation Fall 2013
Pseudorandom Number Generators. Randomness and Security Many cryptographic protocols require the parties to generate random numbers. All the hashing algorithms.
Cryptanalysis. The Speaker  Chuck Easttom  
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.
KAIS T A lightweight secure protocol for wireless sensor networks 윤주범 ELSEVIER Mar
Cryptography and Network Security (CS435)
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.
Theory of Probability Statistics for Business and Economics.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Chapter 8: Probability: The Mathematics of Chance Lesson Plan Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Continuous.
Random-Number Generation Andy Wang CIS Computer Systems Performance Analysis.
CPSC 531: RN Generation1 CPSC 531:Random-Number Generation Instructor: Anirban Mahanti Office: ICT Class Location:
Chapter 7 Random-Number Generation
Network Security Lecture 19 Presented by: Dr. Munam Ali Shah.
Information Security Lab. Dept. of Computer Engineering 182/203 PART I Symmetric Ciphers CHAPTER 7 Confidentiality Using Symmetric Encryption 7.1 Placement.
Basic Concepts in Number Theory Background for Random Number Generation 1.For any pair of integers n and m, m  0, there exists a unique pair of integers.
Random Number Generators 1. Random number generation is a method of producing a sequence of numbers that lack any discernible pattern. Random Number Generators.
Monte Carlo Methods.
Chapter 7 – Confidentiality Using Symmetric Encryption.
Chapter 7 Confidentiality Using Symmetric Encryption.
Lecture 23 Symmetric Encryption
Essential Statistics Chapter 91 Introducing Probability.
PRNGs Pseudo-random number generation. Randomness and Cryptography Randomness and pseudo-randomness are useful in cryptography: –To generate random and.
Testing Random-Number Generators Andy Wang CIS Computer Systems Performance Analysis.
Fall 2006CS 395: Computer Security1 Confidentiality Using Symmetric Encryption.
Stallings, Wireless Communications & Networks, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Spread Spectrum Chapter.
Chapter 7 – Confidentiality Using Symmetric Encryption.
Real-life cryptography Pfeiffer Alain.  Types of PRNG‘s  History  General Structure  User space  Entropy types  Initialization process  Building.
0 Simulation Modeling and Analysis: Input Analysis 7 Random Numbers Ref: Law & Kelton, Chapter 7.
1.  How does the computer generate observations from various distributions specified after input analysis?  There are two main components to the generation.
Issues of Random Numbers and Cryptography
Generating Random Numbers
A cryptographically secure pseudorandom number generator for Julia
Random-Number Generation
Chapter 7 Random Number Generation
Chapter 7 Random-Number Generation
Properties of Random Numbers
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:

Random Number Generators Tamer ÖZ

Random Number Generators OUTLINE Randomness And Random Number Usefulness Of Random Numbers Random Number Generators Random Number Generator Algorithms

Random Number Generators Randomness And Random Number

Random Number Generators Randomness And Random Number Random numbers are useful for a variety of purposes A random number is one that is drawn from a set of possible values, each of which is equally probable, i.e., a uniform distribution. When discussing a sequence of random numbers, each number drawn must be statistically independent of the others.

Random Number Generators Randomness And Random Number However, surprising as it may seem, it is difficult to get a computer to do something by chance. A computer follows its instructions blindly and is therefore completely predictable. (A computer that doesn't follow its instructions in this manner is broken.)

Random Number Generators Usefulness Of Random Numbers

Random Number Generators Usefulness Of Random Numbers Simulation In many scientific and engineering fields, computer simulations of real phenomena are essential to understanding. When the real phenomena are affected by unpredictable processes, such as radio noise or day-to-day weather, these processes must be simulated using random numbers.

Random Number Generators Usefulness Of Random Numbers Statistical Sampling Statistical practice is based on statistical theory which, itself is founded on the concept of randomness. Many elements of statistical practice depend on the emulation of randomness through random numbers.

Random Number Generators Usefulness Of Random Numbers Analysis Many experiments in physics rely on a statistical analysis of their output. For example, an experiment might collect X-rays from an astronomical source and then analyze the result for periodic signals.

Random Number Generators Usefulness Of Random Numbers Computer Programming Most computer programming languages include functions or library routines that purport to be random number generators. They are often designed to provide a random byte or word, or a floating point number uniformly distributed between 0 and 1.

Random Number Generators Usefulness Of Random Numbers Cryptography A ubiquitous use of unpredictable random numbers is in cryptography which underlies most of the attempts to provide security in modern communications (e.g., confidentiality, authentication, electronic commerce, etc.).

Random Number Generators Usefulness Of Random Numbers Decision Making There are reports that many executives make their decisions by flipping a coin or by throwing darts, etc. It is also rumored that some college professors prepare their grades on such a basis. It is important to make a completely "unbiased" decision. Randomness is also an essential part of optimal strategies in the theory of games.

Random Number Generators Usefulness Of Random Numbers Aesthetics The artist will have small deviations in rhythm which makes the music more pleasing. Additionally, a small bit of randomness makes computer generated graphics appear softer. In Signal Processing, this is known as Anti- Aliasing.

Random Number Generators

There are many different methods for generating random data. These methods may vary as to how unpredictable or statistically random they are, and how quickly they can generate random numbers. Before the advent of computational random number generators, generating large amount of sufficiently random numbers required a lot of work. Results would sometimes be collected and distributed as random number tables.

Random Number Generators Random Number Generation Methods Random numbers should not be generated with a method chosen at random - Donald Knuth There are two main approaches to generating random numbers using a computer: Pseudo-Random Number Generators (PRNGs) True Random Number Generators (TRNGs).

Random Number Generators Pseudo Random Number Generators Pseudo-random numbers are not random in the way you might expect, at least not if you're used to dice rolls or lottery tickets. Essentially, PRNGs are algorithms that use mathematical formula or simply precalculated tables to produce sequences of numbers that appear random.

Random Number Generators Pseudo Random Number Generators A good deal of research has gone into pseudo-random number theory, and modern algorithms for generating pseudo-random numbers are so good that the numbers look exactly like they were really random. Effectively, the numbers appear random, but they are really predetermined.

Random Number Generators Pseudo Random Number Generators PRNGs are Efficient (can produce many numbers in a short time ) deterministic (a given sequence of numbers can be reproduced ) periodic (the sequence will eventually repeat itself )

Random Number Generators Pseudo Random Number Generators These characteristics make PRNGs suitable for applications where many numbers are required and where it is useful that the same sequence can be replayed easily. Popular examples of such applications are simulation and modeling applications. PRNGs are not suitable for applications where it is important that the numbers are really unpredictable, such as data encryption and gambling.

Random Number Generators True Random Number Generators In comparison with PRNGs, TRNGs extract randomness from physical phenomena and introduce it into a computer A really good physical phenomenon to use is a radioactive source. The points in time at which a radioactive source decays are completely unpredictable, and they can quite easily be detected and fed into a computer. Another suitable physical phenomenon is atmospheric noise, which is quite easy to pick up with a normal radio.

Random Number Generators True Random Number Generators A common technique is hashing a frame of a video stream from an unpredictable source. Most notable perhaps was Lavarand which used images of a number of lava lamps. Lithium Technologies uses a camera pointed at the sky on a windy and cloudy day.

Random Number Generators TRNGs vs PRNGs Characteristic Pseudo-Random Number Generators True Random Number Generators EfficiencyExcellentPoor DeterminismDeterminsticNondeterministic PeriodicityPeriodicAperiodic

Random Number Generators TRNGs vs PRNGs Application Most Suitable Generator Lotteries and DrawsTRNG Games and GamblingTRNG Random Sampling (e.g., drug screening)TRNG Simulation and ModellingPRNG Security (e.g., generation of data encryption keys) TRNG The ArtsVaries

Random Number Generators Random Number Generator Algorithms

Random Number Generators Linear Congruential Generator Linear congruential generators (LCGs) represent one of the oldest and best-known pseudorandom number generator algorithms. LCGs are defined by the recurrence relation: Where Vn is the sequence of random values and A, B and M are generator-specific integer constants.

Random Number Generators Linear Congruential Generator The period of a general LCG is at most M, and in most cases less than that. The LCG will have a full period if: B and M are relatively prime A-1 is divisible by all prime factors of M. A-1 is a multiple of 4 if M is a multiple of 4 M > max (A, B, V0) A > 0, B > 0

Random Number Generators Linear Congruential Generator Neither this, nor any other LCG should be used for applications where high-quality randomness is critical. They should also not be used for cryptographic applications LCGs may be the only option in an embedded system, the amount of memory available is often very severely limited

Random Number Generators Lagged Fibonacci Generator This class of random number generator is aimed at being an improvement on the 'standard' linear congruential generator. These are based on a generalisation of the Fibonacci sequence. Fibonacci sequence is defined as

Random Number Generators Lagged Fibonacci Generator In which case, the new term is some combination of any two previous terms. m is usually a power of 2 (m = 2M). The operator denotes a general binary operation. This may be either addition, subtraction, multiplication, or the bitwise arithmetic exclusive-or operator (XOR). The theory of this type of generator is rather complex, and it may not be sufficient simply to choose random values for j and k. These generators also tend to be very sensitive to initialization.

Random Number Generators Blum Blum Shub Blum Blum Shub (BBS) is a pseudorandom number generator proposed in 1986 by Lenore Blum, Manuel Blum and Michael Shub. Where M=pq is the product of two large primes p and q. The generator is not appropriate for use in simulations, only for cryptography, because it is not very fast.

Random Number Generators Cryptographically Secure PRNGs A PRNG suitable for cryptographic applications is called a cryptographically secure PRNG (CSPRNG). A CSPRNG must meet certain design principles and be resistant to known attacks. Every CSPRNG should satisfy the "next-bit test". (if first k bit is known k+1’th bit can not be predicted.) Every CSPRNG should withstand 'state compromise extensions'. (Can not get all from a part)

Random Number Generators Cryptographically Secure PRNGs A secure block cipher can be converted into a CSPRNG by running it in counter mode. A cryptographically secure hash of a counter might also act as a good CSPRNG

Random Number Generators Fortuna It is named for Fortuna, the Roman goddess of chance. The generator is based on any good block cipher. The basic idea is to run the cipher in counter mode, encrypting successive values of an incrementing counter. On its own, this would produce statistically identifiable deviations from randomness Therefore, the key is changed periodically: no more than 1MB of data is generated without a key change.

Random Number Generators Random Number Generator Statistical Tests

Random Number Generators RNG Statistical Tests Frequency - proportion of zeroes and ones for the entire sequence. Frequency within a Block - determine whether the frequency of ones is an M-bit block is approximately M/2. Runs - the total number of zero and one runs in the entire sequence, where a run is an uninterrupted sequence of identical bits. Longest Run of Ones in a Block - determine whether the length of the longest run of ones within the tested sequence is consistent with the length of the longest run of ones that would be expected in a random sequence.

Random Number Generators RNG Statistical Tests Random Binary Matrix Rank - check for linear dependence among fixed length substrings of the original sequence. Discrete Fourier Transform (Spectral) - detect periodic features. Non-overlapping (Aperiodic) Template Matching - number of occurrences of predefined target substrings. Overlapping (Periodic) Template Matching - number of occurrences of predefined target substrings. Maurer's Universal Statistical Test - number of bits between matching patterns. The purpose of the test is to detect whether or not the sequence can be significantly compressed without loss of information.

Random Number Generators RNG Statistical Tests Lempel-Ziv Complexity - how far the tested sequence can be compressed. The sequence is considered to be non-random if it can be significantly compressed. Linear Complexity - length of a generating feedback register. Serial - frequency of each and every overlapping m- bit pattern across the entire sequence. Cumulative Sum - determine whether the cumulative sum of the partial sequences occurring in the tested sequence is too large or too small relative to the expected behavior of that cumulative sum for random sequences.

Random Number Generators RNG Statistical Tests Random Excursions - determine if the number of visits to a state within a random walk exceeds what one would expect for a random sequence. Random Excursions Variant - detect deviations from the expected number of occurrences of various states in the random walk. Chi-Square - Classic Definition Kolmogorov-Smirnov - Extends the Chi- Square test to the set of Real Numbers Gap - detect gaps between a number over a range of numbers in a sequence

Random Number Generators RNG Statistical Tests Poker (Partition) - n groups of five successive integers from the stream, observing the resulting pattern. One pair is aabcd, full house is aaabb, etc. Coupon Collector's - Examines the length of the sequence required to observe all numbers in the set 0 to d-1. Permutation - number of orderings of grouping the sequence into partitions Collision - Used when the Chi-Squared Test exceeds a certain number of collisions