"Andrey A. Chernov" writes:
> On Sun, Feb 02, 2003 at 21:23:43 +0000, Mark Murray wrote:
> > 
> > That was random(9). KERNEL random().
> 
> KERNEL random() can be easily implemented (better - replaced) with
> arc4random(), there is no objections. But...
> 
> 1) Implementing random(3) with RC4 is not needed, its algorithm is 
> already equal or better.

Rubbish. :-) RC4's internal state is 256 bytes. In theory, its
cycle-of-repetition is 2^(8*256) bits.

The current library PRNGs are quite a bit less than that.

> 2) Implementing rand(3) with RC4 can be possible only if seed (i.e. 
> state) can be stored in single word (due to rand_r()) restrictions.

This is true. Sort of. But in this case, things get less easy.

Hmm. I need to look at this some more.

Thanks!

M

M
--
Mark Murray
iumop ap!sdn w,I idlaH

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

Reply via email to