## Random Number Generators—Principles and Practices: A Guide for Engineers and ProgrammersRandom Number Generators, Principles and Practices has been written for programmers, hardware engineers, and sophisticated hobbyists interested in understanding random numbers generators and gaining the tools necessary to work with random number generators with confidence and knowledge. Using an approach that employs clear diagrams and running code examples rather than excessive mathematics, random number related topics such as entropy estimation, entropy extraction, entropy sources, PRNGs, randomness testing, distribution generation, and many others are exposed and demystified. If you have ever - Wondered how to test if data is really random
- Needed to measure the randomness of data in real time as it is generated
- Wondered how to get randomness into your programs
- Wondered whether or not a random number generator is trustworthy
- Wanted to be able to choose between random number generator solutions
- Needed to turn uniform random data into a different distribution
- Needed to ensure the random numbers from your computer will work for your cryptographic application
- Wanted to combine more than one random number generator to increase reliability or security
- Wanted to get random numbers in a floating point format
- Needed to verify that a random number generator meets the requirements of a published standard like SP800-90 or AIS 31
- Needed to choose between an LCG, PCG or XorShift algorithm
Then this might be the book for you. |

### What people are saying - Write a review

We haven't found any reviews in the usual places.

### Contents

1 | |

23 | |

3 Entropy Extraction | 41 |

4 Cryptographically Secure Pseudorandom Number Generators | 95 |

5 Nondeterministic Random Number Generators | 119 |

6 Statistically Uniform Noncryptographic PRNGs | 123 |

7 Gaussian or Normally Distributed PRNGs | 137 |

8 Testing Random Numbers | 145 |

15 Making a Uniform Random Number Between Nonpower of Two Bounds | 329 |

16 Generating Random Prime Numbers | 337 |

17 Additive Distributions | 345 |

18 Probability Distributions | 349 |

19 Quantifying Entropy | 383 |

20 Random Methods to Generate π | 393 |

Appendix A Adaptive Proportion Test Cutoff Tables | 397 |

Appendix B HighPrecision Incomplete Beta Function Implementation | 403 |

9 Online Random Number Testing | 173 |

10 SP80022 Distinguishability Tests | 199 |

11 Software Tools | 251 |

12 RdRand and RdSeed Instructions in x86 CPUs | 289 |

13 Accessing RNGs from Software | 295 |

14 FloatingPoint Random Numbers | 317 |

Appendix C Incomplete Gamma Function Implementation | 409 |

Appendix D Software Tool Sources | 415 |

Appendix E Listing Reference | 417 |

421 | |

423 | |

### Common terms and phrases

algorithm bias biased binary binomial block block cipher bytes CBC-MAC circuit Compute count CPUID CPUs cryptographic CTR DRBG debiaser dieharder distribution djen djenrandom djent elif entropy extractor entropy source equation error error_prob example exponent filename floating-point frequency full entropy gamma function hash histogram HMAC implementation import math import random incomplete beta function incomplete gamma function integer Intel Iteration Listing loop mantissa matrix Metastable min-entropy multiple NIST nondeterministic normal number of bits ofthe online health test p_input pattern prime PRNG prob probability quantile function random bits random data random numbers random walk range RdRand RdSeed Rényi entropy result Ring Oscillator Salsa20 seed sequence serial correlation Serial correlation coefficient Shannon entropy specification statistical step symbol Table uint 32_t uint64_t uniform random update usr/bin/env python import voltage xrange Ziggurat algorithm