> a restriction on the OS.  If FreeBSD makes random2() using RC4 to avoid 
> changing rand() or random(), will people then start relying on random2()'s 
> behaviour, and when someone finds a problem in RC4, then the next will be 
> random3()?

What I am suggesting is to leave random() as it is and
guarantee its behavior won't change and add cryto_random() or
whatever, and indicate it *may* change.

> Would you have a problem with changes in the TCP/IP stack changing the 
> content of packets sent out when you connect(), if it breaks your TCP/IP 
> simulations?

This is not a similar situation.

Note that it is rand() that is broken, not random() as can be
seen by modifying Kris Kennaways' test so I don't see why
Mark Murray was talking about changing it in the first place.

#include <stdlib.h>
#include <stdio.h>

int main() {
        int i;

        for(i = 1; i <= 1000; i++) {
                srandom(i);
                printf("%d: %d\n", i, random());
        }
}

1: 1804289383
2: 1505335290
3: 1205554746
4: 1968078301
5: 590011675
6: 290852541
7: 1045618677
8: 757547896
9: 444454915
10: 1215069295
11: 1989311423
12: 1687063760
13: 1358590890
14: 2146406683
15: 762299093
16: 462648444
17: 1227918265
...

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to