Subject: prng seeding in mod_ssl 2.8.6

From: "Noel O'Kelly" <[email-masked]>
Date: Fri, 10 May 2002 17:51:04 +0100

We have a report of a  problem from 2.8.6 onwards due to a change in the
seeding of the PRNG which halves the 
performance of SSL requests. Any update on this ???

Regards
Noel O'Kelly

Accelerated Encryption Processing Ltd.

Bray Business Park,
Southern Cross Route ,
Bray, Co Wicklow,
Ireland

********************************************************************
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email
 in error please notify the postmaster at the address below.

     [email-masked]

This footnote also confirms that this email message has been
checked the presence of computer viruses.

**********************************************************************

---

From: Joe Orton <[email-masked]>
Date: Fri, 10 May 2002 22:28:48 +0100

> performance of SSL requests. Any update on this ???

Hi, here's the fix we're using...

Submitted by: Nalin Dahyabhai <[email-masked]>

--- mod_ssl/pkg.sslmod/ssl_engine_rand.c
+++ mod_ssl/pkg.sslmod/ssl_engine_rand.c
@@ -156,6 +156,9 @@
                  */
                 if (ap_scoreboard_image != NULL && SCOREBOARD_SIZE > 16) {
                     m = ((SCOREBOARD_SIZE / 2) - 1);
+                    if (m > 1024) {
+                        m = 1024;
+                    }
                     n = ssl_rand_choosenum(0, m);
                     RAND_seed(((unsigned char *)ap_scoreboard_image)+n, m);
                     nDone += m;

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: Cliff Woolley <[email-masked]>
Date: Fri, 10 May 2002 17:38:59 -0400 (EDT)

> +++ mod_ssl/pkg.sslmod/ssl_engine_rand.c

FYI, this problem does not affect Apache 2.0+mod_ssl.  It _would_ have,
because I forward-ported this change to Apache 2.0 between 2.0.32 and
2.0.33.

http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/ssl/ssl_engine_rand.c.diff?r1=1.11&r2=1.12

But the group consensus was that we should *not* be using the scoreboard a
source of entropy at all because it's too easy for the client to
manipulate.  And then there's this problem.  At any rate, the patch was
reverted out of Apache 2.0 prior to 2.0.33.

http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/ssl/ssl_engine_rand.c.diff?r1=1.12&r2=1.13

I'd suggest the same change in 2.8.9-dev: just get rid of the scoreboard
as a source of entropy altogether.

--Cliff