arc4randomstir() in OpenSSH

Darren J Moffat Darren.Moffat at eng.sun.com
Thu Mar 29 06:15:12 EST 2001


I'm trying to understand the rational behind the arc4random() and
arc4random_stir() functions in the OpenSSH source tree.

On a system that has a good random number generator, say an in
kernel /dev/random what extra functionality is this stuff providing ?

Would it be acceptable to replace the calls to arc4random() with
reading from /dev/random and drop the arc4random_stir() all together ?

Note I'm not suggesting doing this to OpenSSH before anyone starts
a debate on the portability of the code and ties this into the
PRNGd/yada yada thread.  This is purely an exercise in understanding
why RC4 is used in getting random data.

Thanks.

--
Darren J Moffat



More information about the openssh-unix-dev mailing list