That's an interesting blog article. The 2nd comment
is by the author and lists the entropy sources. I recall there was
discussion on this list quite some time ago where it was stated that OpenSSL
wouldn't use only the CryptoAPI random number generator since Microsoft hadn't
provided details of how the entropy was gathered. Perhaps the information
in that post provides enough detail to warrant dropping all of the heap walking
guff that has been known to trip up OpenSSL on occasion.
Adria, RAND_poll already calls CryptGenRandom doesn't
it? You could probably just comment out all of the other code to get the
same result.
Steven From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrià Massanet Sent: Thursday, 1 December 2005 11:41 PM To: openssl-dev@openssl.org Subject: Alternate RAND_poll for XP/2003 Server/Vista Hi
all, Im using
OpenSSL as a module in PHP (php_openssl), and I need to call the CGI page may times per
second but the
initialization process in RAND_poll is too slow.
Im
thinking to modify OpenSSL to use the rtlGenRandom call available in XP/2003 Server/Vista OSs (see http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx
for comments on rtlGenRandom
) the new
function likes: int RAND_poll() { if_any_error_in_block_return_old_RAND_poll() { HMODULE
hlib; BOOLEAN
(APIENTRY *rtlgenrandom)(void*, ULONG); char
buffer[1024]; int
c; hlib=(HMODULE)LoadLibrary("ADVAPI32.DLL"); tlgenrandom=(BOOLEAN
(APIENTRY *)(void*,ULONG))GetProcAddress(hlib,"SystemFunction036"); for(c=0;c<1+(ENTROPY_NEEDED/sizeof(buffer));++c) {
rtlgenrandom(buffer,sizeof(buffer)):
RAND_add(buffer,sizeof(buffer),sizeof(buffer)); }
} } a bad idea? Any
thing bad here? Thanks in
advance, Adrià |
- Alternate RAND_poll for XP/2003 Server/Vista Adrià Massanet
- RE: Alternate RAND_poll for XP/2003 Server/Vista Steven Reddie
- Re: Alternate RAND_poll for XP/2003 Server/Vista Corinna Vinschen
- Re: Alternate RAND_poll for XP/2003 Server/V... Rick Jones
- Re: Alternate RAND_poll for XP/2003 Serv... Corinna Vinschen
- RE: Alternate RAND_poll for XP/2003... Steven Reddie
- Re: Alternate RAND_poll for XP/... Corinna Vinschen
- RE: Alternate RAND_poll for XP/2003 Server/Vista Adrià Massanet
- Re: Alternate RAND_poll for XP/2003 Server/Vista Jack Lloyd
- RE: Alternate RAND_poll for XP/2003 Server/V... Steven Reddie
- Re: Alternate RAND_poll for XP/2003 Serv... Jack Lloyd
- RE: Alternate RAND_poll for XP/2003... Steven Reddie