Pseudorandom Number Generator
Description
Pseudorandom number generators - often just referred to as random number generators or RNGs - produce a deterministic sequence of random numbers. Unlike hash functions, each random number is using the previous as part of its calculation, so it's not possible to get the Nth random number without first having gotten the first N-1 random numbers as well.
Specific algorithms include:
- linear-congruential-generator - simple.
- Blum Blum Shub - cryptographically sound, but slow.
- Mersenne Twister - fast with good statistical properties, default in many libraries when cyptography is not an issue.
Code Example
External Links
Pseudorandom number generator - Wikipedia article on Pseudorandom number generation.
List of Pseudo random number generators on Wikipedia.
Primer on Repeatable Random Numbers - Article on random number generators and random hash functions by Rune Skovbo Johansen.
page revision: 9, last edited: 03 Jan 2015 14:51