in reply to Re^7: A better rand() for Win32
in thread A better rand() for Win32

a random number generator is no longer random if its seed and algorithm are known

There are a numer of Cryptographically Secure Pseudo Random Bit Generators for which that statement is not true (for some definition of "seed", anyway). I'm thinking of the RSA, Blum-Blum-Shub and Micali-Schnorr pseudorandom bit generators - the only CSPRBG's with which I'm in any way familiar.

The cryptographic strength of these generators relies on the indeterminability of the 2 chosen (large) primes upon which they are based. Knowing both the algorithm and the seed value that was used is of no help if the 2 primes are not known. Of course, it could be argued that those 2 primes are, in effect, part of the "seed" ...

The nice thing about these CSPRBG's is that they can be used to provide "quality" pseudorandom numbers without any need to "gather entropy" at all. (For cryptographic purposes, however, you'd be well advised to gather plenty of entropy when it comes to choosing the 2 primes.)

Cheers,
Rob

Replies are listed 'Best First'.
Re^9: A better rand() for Win32
by bitshiftleft (Sexton) on Aug 02, 2007 at 16:32 UTC
    Thanks , for making a finer point syphilis , looks like this discussion is getting into the more advanced aspects of Crypto/RNG.
    I should add from my last entry, GetRandom() calls CryptAcquireContext to use another phase of randomizing - hashing (using PROV_RSA_FULL by default) then calls CryptGenRandom.