# How can a good pseudo-random number generator be made?

I am trying to make a pseudo-random number generator so that I can use it in a synchronous stream cipher for encrypting plain text. I want it to generate numbers which are as random as possible.

What are good elements that my algorithm must have in order to do so?

This is for an interschool science competition.

• My recommendation would be to look at the papers behind existing stream ciphers (e.g., Salsa20), and see what they do. – Stephen Touset Oct 29 '14 at 18:56
• Sponge construction over a suitable permutation fits the bill, as it has well defined and analyzed security properties – Richie Frame Oct 30 '14 at 4:39
• Depends on goals. $\;$ For conformance to industry standards and speed on modern CPUs with AES in hardware, the AES-CTR recommendation of that answer is good. $\;$ For performance or security in other CPUs, I like the first comment. $\;$ For a CSPRNG with internals suitable for visualization, I would consider Trivium. – fgrieu Nov 1 '14 at 10:43