Source-Changes-HG archive

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

[src/trunk]: src/share/man/man7 Tweak kern.arandom documentation.



details:   https://anonhg.NetBSD.org/src/rev/9f49609c95d2
branches:  trunk
changeset: 971936:9f49609c95d2
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 10 02:30:33 2020 +0000

description:
Tweak kern.arandom documentation.

diffstat:

 share/man/man7/sysctl.7 |  28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r 48e90b3f8b10 -r 9f49609c95d2 share/man/man7/sysctl.7
--- a/share/man/man7/sysctl.7   Sun May 10 01:29:40 2020 +0000
+++ b/share/man/man7/sysctl.7   Sun May 10 02:30:33 2020 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sysctl.7,v 1.143 2020/05/01 10:06:09 nia Exp $
+.\"    $NetBSD: sysctl.7,v 1.144 2020/05/10 02:30:33 riastradh Exp $
 .\"
 .\" Copyright (c) 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -384,13 +384,25 @@
 .It Li kern.aio_max
 The maximum number of asynchronous I/O operations.
 .It Li kern.arandom ( Dv KERN_ARND )
-This variable returns up to 256 bytes of random data.
-Multiple queries can be used to obtain an infinite amount of
-non-blocking cryptographically secure random data.
-The used random number generator
-.Pf ( RNG )
-is based on
-.Xr cprng_strong 9 .
+Returns independent uniformly distributed bytes at random each time, as
+many as requested up to 256, derived from the system entropy pool; see
+.Xr rnd 4 .
+.Pp
+Reading
+.Li kern.arandom
+is equivalent to reading up to 256 bytes at a time from
+.Pa /dev/urandom :
+reading
+.Li kern.arandom
+never blocks, and once the system entropy pool has full entropy, output
+subsequently read from
+.Li kern.arandom
+is fit for use as cryptographic key material.
+For example, the
+.Xr arc4random 3
+library routine uses
+.Li kern.arandom
+internally to seed a cryptographic pseudorandom number generator.
 .It Li kern.argmax ( Dv KERN_ARGMAX )
 The maximum bytes of argument to
 .Xr execve 2 .



Home | Main Index | Thread Index | Old Index