NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/45952: arc4random does not automatically reseed

>Number:         45952
>Category:       lib
>Synopsis:       arc4random does not automatically reseed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 08 18:40:00 +0000 2012
>Originator:     Paul Koning
>Release:        V5.0
arc4random.3 says that "arc4random() reseeds itself periodically from the 
kernel strong random number generator".

That is not true, as can be seen easily by inspection of arc4random.c.  
Instead, the seeding from /dev/urandom is done ONLY at initialization time, 
never at any other time unless arc4_stir() is called explicitly.

The documented behavior seems to be the better option, so I think of this as a 
software bug rather than a doc bug.
man 3 arc4random

Home | Main Index | Thread Index | Old Index