Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How good is CryptGenRandom() from the Crypto API?

145 views
Skip to first unread message

Doug Sauder

unread,
May 14, 2003, 7:49:17 AM5/14/03
to

The function RAND_poll() in rand_win.c calls CryptGenRandom(), a function in
the Microsoft Crypto API that returns "random" data, presumably from an
entropy pool maintained by the cryptographic service provider.

Any comments on how good this random data is, assuming that the default
cryptographic service provider is used? Wouldn't this be the Windows
equivalent to /dev/random or /dev/urandom on a Unix box?

If this random data is high quality, does it make sense to seed the PRNG
from CryptGenRandom() alone? Doing so could avoid some of the problems
mentioned earlier on this list about COM+ not being initialized and causing
RAND_poll() to hang. I'm not suggesting that RAND_poll() be changed, as one
could use RAND_add() at application start-up to avoid an automatic call to
RAND_poll().

DS

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org

Vadim Fedukovich

unread,
May 14, 2003, 10:59:09 AM5/14/03
to
On Wed, May 14, 2003 at 07:49:01AM -0400, Doug Sauder wrote:
>
> The function RAND_poll() in rand_win.c calls CryptGenRandom(), a function
> in the Microsoft Crypto API that returns "random" data, presumably from an
> entropy pool maintained by the cryptographic service provider.
>
> Any comments on how good this random data is, assuming that the default
> cryptographic service provider is used? Wouldn't this be the Windows
> equivalent to /dev/random or /dev/urandom on a Unix box?

In case someone would like to make a statement: please remember to evaluate
the background. That is, exactly why would you trust such an answer.
The good reason might be analysing the code; code does what is says.

yours,
Vadim

0 new messages