ref: b59aa679226d0775838f87289b60bf9b7c626315
parent: f777743b7242e539a8ac806e4e15c4b527be4bb6
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Aug 27 17:27:52 EDT 2016
rand(2), cons(3): clarify /dev/random behaviour
--- a/sys/man/2/rand
+++ b/sys/man/2/rand
@@ -109,10 +109,6 @@
.I Truerand
returns a random unsigned long read from
.BR /dev/random .
-Due to the nature of
-.BR /dev/random ,
-truerand can only return a few hundred bits a
-second.
.PP
.I Ntruerand
returns a uniform random integer
--- a/sys/man/3/cons
+++ b/sys/man/3/cons
@@ -114,13 +114,10 @@
.PP
Reads from
.B random
-return a stream of random numbers. The numbers are
-generated by a low priority kernel process that loops
-incrementing a variable. Each clock tick the variable
-is sampled and, if it has changed sufficiently, the last
-few bits are appended to a buffer. This process is inefficient
-at best producing at most a few hundred bits a second.
-Therefore,
+return a stream of random bytes produced by the kernels cryptographic
+random number generator. The rate at which data can be read depends on
+the implementation and can vary from hundreds of megabytes to just
+a few hundred bits a second. Therefore,
.B random
should be treated as a seed to
pseudo-random number generators which can produce a faster