Re: Seeding the OpenSSL PRNG
Thanks all for your valuable comments, Erik Leunissen. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: Seeding the OpenSSL PRNG (continued ...)
Apparently, there are some situations where there is no entropy source to seed the OpenSSL PRNG. Is there a uniform way to detect that the OpenSSL PRNG has not been seeded? Uniform is uniform over the various platforms because I want to prevent that I need to check on a per platform basis whether an entropy source is lacking. Erik Leunissen. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
RE: Seeding the OpenSSL PRNG (continued ...)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Erik Leunissen Sent: Thursday, September 28, 2006 10:25 AM To: openssl-users@openssl.org Subject: Re: Seeding the OpenSSL PRNG (continued ...) Apparently, there are some situations where there is no entropy source to seed the OpenSSL PRNG. Is there a uniform way to detect that the OpenSSL PRNG has not been seeded? Uniform is uniform over the various platforms because I want to prevent that I need to check on a per platform basis whether an entropy source is lacking. I believe the function you want is RAND_status(). -- Adam Mlodzinski __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: Seeding the OpenSSL PRNG (continued ...)
Erik Leunissen wrote: Is there a uniform way to detect that the OpenSSL PRNG has not been seeded? Uniform is uniform over the various platforms because I want Call RAND_status() (see http://www.openssl.org/docs/crypto/RAND_add.html#). Ciao, Richard -- Dr. Richard W. Könning Fujitsu Siemens Computers GmbH __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: Seeding the OpenSSL PRNG (continued ...)
Richard Koenning wrote: Call RAND_status() (see http://www.openssl.org/docs/crypto/RAND_add.html#). Right. I overlooked that one. Thanks, Erik. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Seeding the OpenSSL PRNG
The book Network security with OpenSSL says about seeding the OpenSSL PRNG (on page 19): If you try to use OpenSSL without bothering to seed the random number generator, the library will complain. I recently discovered that I have been using DSA_generate_key() and DSA_sign() without having seeded the OpenSSL PRNG. Nevertheless, I have never noticed any complaint of the OpenSSL library. This makes me think that: - either there has been some other call into the OpenSSL library that implicitly seeded the PRNG without my noticing it (perhaps DSA_generate_parameters() or DSA_new() ), or - the warning mechanism doesn't work properly Can anybody shed some light on what's happening here? In case it's relevant: the DSA_* functions that I mentioned above, are used in a program that has been running on Linux and on Windows 2000. Thanks in advance, Erik Leunissen. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: Seeding the OpenSSL PRNG
On Wed, Sep 27, 2006, Erik Leunissen wrote: This makes me think that: - either there has been some other call into the OpenSSL library that implicitly seeded the PRNG without my noticing it (perhaps DSA_generate_parameters() or DSA_new() ), or - the warning mechanism doesn't work properly Can anybody shed some light on what's happening here? In case it's relevant: the DSA_* functions that I mentioned above, are used in a program that has been running on Linux and on Windows 2000. OpenSSL makes use of some standard sources of entropy on various platforms to seed the PRNG automatically. On linux this includes the /dev/urandom device and on Windows various things including the CryptoAPI PRNG. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: Seeding the OpenSSL PRNG
Dr. Stephen Henson wrote: OpenSSL makes use of some standard sources of entropy on various platforms to seed the PRNG automatically. On linux this includes the /dev/urandom device and on Windows various things including the CryptoAPI PRNG. OK, that explains, thanks. The program is going to be distributed to clients who run a Windows variant (2000, XP) or a unix-like OS (*BSD, Solaris, Linux, ...). I reckon that /dev/urandom is present on most unices, so I can count on the automatic PRNG seeding. However, on the Windows platforms I question whether that is the case. Is CryptoAPI PRNG a standard component of the OS which I can presume to be present? (Network security with OpenSSL mentions several times that Windows has no built-in entropy-gathering mechanism that seeds a standard PRNG, which is why the egads program was written.) If not, I want to be able to detect whether the PRNG has been seeded before OpenSSL complains. How would I do that? TIA, Erik Leunissen == __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: Seeding the OpenSSL PRNG
CryptoAPI is a standard component that you can expect to have on any machine which has IE5 or later installed. You can also expect it to be on Windows 2000+ as a default, as well as NT4SP3 or higher. It uses the same mechanisms that the various /dev/urandom|/dev/random implementations use, including measuring the time of any disk or network access. (For more information, please see MSDN's documentation on CryptoAPI. It mentions some of the things that it stirs into its entropy pool.) -Kyle H On 9/27/06, Erik Leunissen [EMAIL PROTECTED] wrote: Dr. Stephen Henson wrote: OpenSSL makes use of some standard sources of entropy on various platforms to seed the PRNG automatically. On linux this includes the /dev/urandom device and on Windows various things including the CryptoAPI PRNG. OK, that explains, thanks. The program is going to be distributed to clients who run a Windows variant (2000, XP) or a unix-like OS (*BSD, Solaris, Linux, ...). I reckon that /dev/urandom is present on most unices, so I can count on the automatic PRNG seeding. However, on the Windows platforms I question whether that is the case. Is CryptoAPI PRNG a standard component of the OS which I can presume to be present? (Network security with OpenSSL mentions several times that Windows has no built-in entropy-gathering mechanism that seeds a standard PRNG, which is why the egads program was written.) If not, I want to be able to detect whether the PRNG has been seeded before OpenSSL complains. How would I do that? TIA, Erik Leunissen == __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] -- -Kyle H __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
RE: Seeding the OpenSSL PRNG
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Erik Leunissen Sent: Wednesday, September 27, 2006 4:53 PM To: openssl-users@openssl.org Subject: Re: Seeding the OpenSSL PRNG Dr. Stephen Henson wrote: OpenSSL makes use of some standard sources of entropy on various platforms to seed the PRNG automatically. On linux this includes the /dev/urandom device and on Windows various things including the CryptoAPI PRNG. OK, that explains, thanks. The program is going to be distributed to clients who run a Windows variant (2000, XP) or a unix-like OS (*BSD, Solaris, Linux, ...). I reckon that /dev/urandom is present on most unices, so I can count on the automatic PRNG seeding. Beware - some versions of HPUX do not come with a suitable random data device. If I recall correctly, HPUX 11.00 and 11.11 do not have one, but HPUX 11.22 does. Your end-users may need to install one of the random data devices available from HP (they freely provide /dev/random, /dev/urandom and their own version of openssl with a bundled random data device) SunOS/Solaris 5.6 and 5.7 also lack a random data device. -- Adam Mlodzinski __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: Seeding the OpenSSL PRNG on Windows
Check this: http://www.counterpane.com/yarrow.html It's a try icon application for Windows, but you can change it to be a service. - Original Message - From: Edward Chan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 1:47 AM Subject: Seeding the OpenSSL PRNG on Windows Can anyone suggest how I would seed the OpenSSL PRNG on Windows? I guess on Unix systems, I can use /dev/random. But is there an equivalent on Windows? Note, that the OpenSSL application I'm writing is a server application. So it is likely that it will run on a box with little or no UI interaction. So I don't want to use something that depends on user clicks or whatever, to build entropy. Can anybody suggest a good src of entropy on Windows, and how to use it from a C/C++ program? Thanks, Ed __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
Seeding the OpenSSL PRNG on Windows
Can anyone suggest how I would seed the OpenSSL PRNG on Windows? I guess on Unix systems, I can use /dev/random. But is there an equivalent on Windows? Note, that the OpenSSL application I'm writing is a server application. So it is likely that it will run on a box with little or no UI interaction. So I don't want to use something that depends on user clicks or whatever, to build entropy. Can anybody suggest a good src of entropy on Windows, and how to use it from a C/C++ program? Thanks, Ed __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]