How does a random number generator work?

Viewed 60836

How do random number generator works? (for example in C/C++ Java)

How can I write my own random number generator? (for example in C/C++ Java)

9 Answers

Depends on the goal: speed vs quality vs security.

Speed & Security: Linear Congruence is straight forward and does not depend on a public source, privacy of a key is crucial for crypto systems.

Quality: random.org is a source of true random, where you get about 10000 16-Bit values per day free.

Combining several random sources (simpliest XOR) combines their properties.

So, if you also maintain a pool of true random numbers, you have all of speed, quality and security.

Related