<p>You might want to check out </p>

<ul>
<li>Chapters 5 and 6 of <a href="http://rads.stackoverflow.com/amzn/click/1584885513">Katz and Lindell</a></li>
<li><a href="http://people.seas.harvard.edu/~salil/pseudorandomness/">Pseudorandomness</a> by S. Vadhan</li>
<li><a href="http://www.math.ias.edu/~avi/BOOKS/TCS003-1.pdf">Parwise Independence and Derandomization</a> by Luby and Wigderson</li>
<li><a href="http://arxiv.org/abs/cs.CC/0601100">Pseudorandomness and Combinatorial Constructions</a> by Trevisan</li>
<li>Goldreich's <a href="http://www.wisdom.weizmann.ac.il/~oded/pp_pseudo.html">webpage</a> on pseudorandomness, where he has pointers to other sources.</li>
</ul>

CC BY-SA 3.0
2011-05-11T09:01:53.567Z
Most of this is not very relevant to practical implementations of PRNGs for cryptography.  This is not a good set of resources to give an implementor.
D.W.
CC BY-SA 2.5
2010-12-11T18:04:30.850Z
2010-12-11T18:31:03.030Z
2010-12-11T18:31:03.030Z
Dai Le
<p>If you are thinking of implementing your ideas, there is a standard battery of tests that PRNG implementations are given.  These tests (DIEHARD and successor DIEHARDER) may be downloaded from <a href="http://web.archive.org/web/20150906073813/http://www.stat.fsu.edu/pub/diehard/" rel="nofollow">its archived webpage</a> and <a href="http://www.phy.duke.edu/~rgb/General/dieharder.php" rel="nofollow">http://www.phy.duke.edu/~rgb/General/dieharder.php</a> respectively.</p>

CC BY-SA 3.0
2011-05-11T09:02:30.290Z
Important cautionary note: passing DIEHARD does not mean your PRNG is any good.  This is not a resource I would give to an implementor who needs to implement a secure PRNG.
D.W.
CC BY-SA 3.0
2010-12-12T23:20:18.330Z
2015-11-16T19:12:29.060Z
2015-11-16T19:12:29.060Z
Peter Boothe
<p>Are you interested in implementing a PRNG?  If so, your best bet is not to design one yourself, but just use a standard one.  /dev/urandom is the right answer on most platforms.  If /dev/urandom doesn't exist, generating a random AES key with /dev/random and then running AES-CTR mode to generate lots of pseudorandom numbers is another reasonable approach.</p>

<p>I recommend that you read Cryptography Engineering, by Ferguson, Schneier, and Kohno.  It is an excellent book.  It will teach you a lot about how to design and build real cryptosystems.</p>

<p>If you actually have to build a system that will be deployed in practice, I recommend that you do not take your guidance from the theoretical CS community, but rather from the community of practitioners and practice-oriented researchers.  Much of the theoretical CS work will not be very relevant, or potentially even misleading, to practical implementation of a secure PRNG.  I also encourage you to look at the IT Security stack exchange for those kinds of questions.</p>

CC BY-SA 3.0
2011-05-12T00:24:15.013Z
The question explicitly says he is interested in general principles, and the question was asked on the Theoretical CS stack exchange...
David Cash
CC BY-SA 3.0
2011-05-11T09:01:11.057Z
2011-05-11T09:01:11.057Z
D.W.
<p>I am interested in generation of pseudo-random numbers for cryptography. Besides Chapter 5 of <a href="http://www.crcpress.com/ecommerce_product/product_detail.jsf?catno=8523&amp;isbn=0000000000000&amp;parent_id=&amp;pc=">Menezes/Oorschot/Vanstone</a>; Chapter 8 of <a href="http://www.crcpress.com/ecommerce_product/product_detail.jsf?catno=C5084&amp;isbn=0000000000000&amp;parent_id=465&amp;pc=">Stinson</a>; and Chapter 3 of <a href="http://www.cambridge.org/gb/knowledge/isbn/item1167785/?site_locale=en_GB">Goldreich</a>, where else could I find more? I'm interested in general principles for designing PRNGs (desirable properties, tests, etc).</p>

CC BY-SA 2.5
2010-12-11T16:07:44.037Z
Not on design per se, but you may be interested in Goldreich's newer book: http://books.google.com/books?id=9k6Lw2U2XCkC
S Huntsman
CC BY-SA 2.5
2010-12-11T16:10:59.713Z
@S Huntsman: thanks a lot for that! I didn't know Goldreich had a book on PRNGs.
Jay
<cc.complexity-theory><reference-request><pseudorandomness>
Surveys on pseudo-random number generator design?
Jay
# Surveys on pseudo-random number generator design?

(Asked by: username_0 on 2010-12-11)

I am interested in generation of pseudo-random numbers for cryptography. Besides Chapter 5 of [Menezes/Oorschot/Vanstone](http://www.crcpress.com/ecommerce_product/product_detail.jsf?catno=8523&isbn=0000000000000&parent_id=&pc=); Chapter 8 of [Stinson](http://www.crcpress.com/ecommerce_product/product_detail.jsf?catno=C5084&isbn=0000000000000&parent_id=465&pc=); and Chapter 3 of [Goldreich](http://www.cambridge.org/gb/knowledge/isbn/item1167785/?site_locale=en_GB), where else could I find more? I'm interested in general principles for designing PRNGs (desirable properties, tests, etc).

**Tags:** cc.complexity-theory, reference-request, pseudorandomness
> **Comments:**
> **username_1**: Not on design per se, but you may be interested in Goldreich's newer book: http://books.google.com/books?id=9k6Lw2U2XCkC  
> **username_0**: @S Huntsman: thanks a lot for that! I didn't know Goldreich had a book on PRNGs.  

---

## 3 answers

### Answer by username_2 on 2010-12-11. Score: 8 | Accepted answer

You might want to check out

* Chapters 5 and 6 of [Katz and Lindell](http://rads.stackoverflow.com/amzn/click/1584885513)
* [Pseudorandomness](http://people.seas.harvard.edu/~salil/pseudorandomness/) by S. Vadhan
* [Parwise Independence and Derandomization](http://www.math.ias.edu/~avi/BOOKS/TCS003-1.pdf) by Luby and Wigderson
* [Pseudorandomness and Combinatorial Constructions](http://arxiv.org/abs/cs.CC/0601100) by Trevisan
* Goldreich's [webpage](http://www.wisdom.weizmann.ac.il/~oded/pp_pseudo.html) on pseudorandomness, where he has pointers to other sources.

> **Comments:**
> **username_3**: Most of this is not very relevant to practical implementations of PRNGs for cryptography.  This is not a good set of resources to give an implementor.  

---

### Answer by username_4 on 2010-12-12. Score: 4

If you are thinking of implementing your ideas, there is a standard battery of tests that PRNG implementations are given. These tests (DIEHARD and successor DIEHARDER) may be downloaded from [its archived webpage](http://web.archive.org/web/20150906073813/http://www.stat.fsu.edu/pub/diehard/) and <http://www.phy.duke.edu/~rgb/General/dieharder.php> respectively.

> **Comments:**
> **username_3**: Important cautionary note: passing DIEHARD does not mean your PRNG is any good.  This is not a resource I would give to an implementor who needs to implement a secure PRNG.  

---

### Answer by username_3 on 2011-05-11. Score: 1

Are you interested in implementing a PRNG? If so, your best bet is not to design one yourself, but just use a standard one. /dev/urandom is the right answer on most platforms. If /dev/urandom doesn't exist, generating a random AES key with /dev/random and then running AES-CTR mode to generate lots of pseudorandom numbers is another reasonable approach.

I recommend that you read Cryptography Engineering, by Ferguson, Schneier, and Kohno. It is an excellent book. It will teach you a lot about how to design and build real cryptosystems.

If you actually have to build a system that will be deployed in practice, I recommend that you do not take your guidance from the theoretical CS community, but rather from the community of practitioners and practice-oriented researchers. Much of the theoretical CS work will not be very relevant, or potentially even misleading, to practical implementation of a secure PRNG. I also encourage you to look at the IT Security stack exchange for those kinds of questions.

> **Comments:**
> **username_5**: The question explicitly says he is interested in general principles, and the question was asked on the Theoretical CS stack exchange...  

---

