----- Original Message ----- From: "Dr. Stephen Henson" <st...@openssl.org> To: openssl-users@openssl.org Sent: Wednesday, March 31, 2010 7:43:06 AM GMT -05:00 US/Canada Eastern Subject: Re: Random Numbers
You can use RAND_bytes() on Windows and the OpenSSL PRNG will be automatically seeded from various sources of entropy. If you're only using OpenSSL for random numbers then you could alternatively use other Windows specific APIs such as CryptGenRandom() of CryptoAPI. Steve. -- Hello, I'm actually writing a Matlab toolbox that uses OpenSSL. I put together a function, actually its really heavily based on the OpenSSL book, that generates random keys and IV. Anyway, I wasn't comfortable with how I was seeding prng, it seems like a real easy place to screw up. I just wanted to make sure I wasn't doing anything obviously wrong. My current function will look /dev/urandom if its unix based and RAND_screen if its windows based. With that said, based on your comments I'm wondering if I should just take that function out all together. Thanks, Anthony