You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2002/02/25 21:04:20 UTC
Re: cvs commit: httpd-2.0/modules/ssl mod_ssl.h
ssl_engine_dh.c ssl_engine_init.c ssl_engine_kernel.c
ssl_engine_rand.c ssl_scache_dbm.c ssl_scache_shmcb.c
ssl_scache_shmht.c
At 01:55 PM 2/25/2002, Justin Erenkrantz wrote:
>Why was the XXX_SBENTROPY_SOLVED define removed? I believe we wanted
>to avoid using scoreboard as an entropy source because it isn't very
>random. Therefore, I think we should just remove this code
>altogether. Or, am I missing something? -- justin
You missed nothing. This patch is borked. Although in truth is does allow the
process to add the score as entropy, it gains us little, since the
scoreboard is
initialized to nothing but a few bytes of data and a big block 'o nulls.
+1 on removing this old, misleading code altogether.
Bill
Re: cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_dh.c ssl_engine_init.c ssl_engine_kernel.c ssl_engine_rand.c ssl_scache_dbm.c ssl_scache_shmcb.c ssl_scache_shmht.c
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Mon, Feb 25, 2002 at 05:14:34PM -0500, Cliff Woolley wrote:
> If that's the agreement, then fine, I'll nuke it. It certainly caused me
> quite a bit of headache to get it to work in the first place, and I was
> definitely uneasy about the assumptions it was making about the layout of
> the scoreboard. I wouldn't mind hearing Ralf's input, of course...
I don't believe using the scoreboard is a valid source of entropy.
It would be too easy to effect it. So, let's just remove it. We're
so conservative about our random sources that I just don't think
using the scoreboard is a benefit.
I'd say it should be removed in mod_ssl for 1.3, but that's not our
call. -- justin
Re: cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_dh.c
ssl_engine_init.c ssl_engine_kernel.c ssl_engine_rand.c ssl_scache_dbm.c
ssl_scache_shmcb.c ssl_scache_shmht.c
Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 25 Feb 2002, Cliff Woolley wrote:
> ssl_rand_seed() runs on every request if you configure it that way.
this is true, when 'SSLRandomSeed connect builtin' is configured, which is
the default. not sure how much the scoreboard image changes between
requests. though somewhat related, i still have on my ssl performance
todo-list, optimizing 'SSLRandomSeed connect builtin'. first problem is
that RAND_seed() mutex locks in a threaded MPM. and there's three calls
to it at connect time:
1st - adds pid (already happened at startup) and time() (which RAND_seed
already does everytime you call it). i'm no random number expert, but
would be surprised if seed with the same values is useful.
2nd - stackdata (from unsigned char stackdata[256]), no idea how random
that'll be.
3rd - scoreboard data
better sources can be configured, but require reading from a file, running
an external program or talking to an EGD. i think builtin could be
improved. how about if threads are available, spawn a low priority thread
to gather entropy using apr_generate_random_bytes() which mod_ssl can grab as
needed without blocking?
Re: cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_dh.c
ssl_engine_init.c ssl_engine_kernel.c ssl_engine_rand.c ssl_scache_dbm.c
ssl_scache_shmcb.c ssl_scache_shmht.c
Posted by Cliff Woolley <jw...@apache.org>.
On Mon, 25 Feb 2002, William A. Rowe, Jr. wrote:
> At 01:55 PM 2/25/2002, Justin Erenkrantz wrote:
> >Why was the XXX_SBENTROPY_SOLVED define removed? I believe we wanted
> >to avoid using scoreboard as an entropy source because it isn't very
> >random. Therefore, I think we should just remove this code
> >altogether. Or, am I missing something? -- justin
Best I could tell from the commit logs and the comments in the code, it
was only disabled because it was causing segfaults (because it was
incompatible with the new scoreboard layout). Ralf's patch touched that
block of code, and it's still used in mod_ssl for Apache 1.3. I used his
patch as a basis for fixing the corresponding block in 2.0, assuming that
it was only off because it was broken; why else would it still be in 1.3?
But...
> +1 on removing this old, misleading code altogether.
If that's the agreement, then fine, I'll nuke it. It certainly caused me
quite a bit of headache to get it to work in the first place, and I was
definitely uneasy about the assumptions it was making about the layout of
the scoreboard. I wouldn't mind hearing Ralf's input, of course...
> You missed nothing. This patch is borked. Although in truth is does
> allow the process to add the score as entropy, it gains us little, since
> the scoreboard is initialized to nothing but a few bytes of data and a
> big block 'o nulls.
ssl_rand_seed() runs on every request if you configure it that way.
--Cliff
--------------------------------------------------------------
Cliff Woolley
cliffwoolley@yahoo.com
Charlottesville, VA