# Availability of a simple limited PRNG algorithm

I am in need of a really simple limited PRNG, that either exists or can easily be created in virtually any language on any platform. It takes only the initial seed, and is only expected to generate a small amount of output in its lifetime, normally 32-64 bytes but potentially more with very low probability. It will not reseed. There is precisely one consumer of its output - an ECDH key generator. If given the same initial seed on different languages or platforms, the PRNG must generate the same exact output. (Hence, given the same initial seed on different languages or platforms, it is possible to determinstically recreate the same ECDH keypair.)

The requirement for cross-platform consistency and no need for reseeding are driving me to seek a well known standard implementation of some standard PRNG. It will not be Yarrow or Fortuna because they obviously don't fit the requirements.

Does there exist some well known PRNG that fits this description?

Note: I removed "My Simple Limited PRNG" as it is no longer relevant. Because the answer to the first question "Does something like this already exist, that is well known" is yes.

• Yes, there are at least 5 such PRNGs. $\;$ – user991 Nov 19 '14 at 21:34
• Not a direct answer but for my cuckoo byte stuffing algorithm I researched and found a very small PRNG that passes the diehard tests and has had academic review but takes only a few dozen bytes of code on an 8 bit MCU. Producing arch independent output was a vital requirement as well. You can pull just the 'next_ecode' routine out of the code, it is based on the well known xorshift set of algorithms. notanumber.net/archives/183/cuckoo-byte-stuffing-algorithm The code and algorithms are public domain. If you want more state, use one from en.wikipedia.org/wiki/Xorshift – John Meacham Nov 19 '14 at 22:33
• @RickyDemer This comment is actually extremely helpful, because it's all defined in section 10 of 800-90A. This, I can definitely work with. Thanks. If you want to post this as an answer, I think you deserve the credit. – Edward Ned Harvey Nov 19 '14 at 22:34