Well, rtlGenRandom
is cryptographic-provider independent. So, I assume that this is the " The problem here is that
there's no way to get the advantage trusting in rtlGenRandom
/ CryptGenRandom. Perhaps this option must be
compile-time or definable in runtime. Adrià -----Mensaje original----- 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 Hi
all, I’m
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. I’m
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
- Re: Alternate RAND_poll for XP/... Jack Lloyd
- Re: Alternate RAND_poll for XP/2003 Server/Vista Andy Polyakov