diff options
Diffstat (limited to 'man4/random.4')
-rw-r--r-- | man4/random.4 | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/man4/random.4 b/man4/random.4 index 1d463254d..5da08c753 100644 --- a/man4/random.4 +++ b/man4/random.4 @@ -36,10 +36,10 @@ number of bits of noise in the entropy pool. From this entropy pool, random numbers are created. .P Linux 3.17 and later provides the simpler and safer -.BR getrandom (2) +.MR getrandom 2 interface which requires no special files; see the -.BR getrandom (2) +.MR getrandom 2 manual page for details. .P When read, the @@ -55,7 +55,7 @@ may return data prior to the entropy pool being initialized. .\" This is a real problem; see .\" commit 9b4d008787f864f17d008c9c15bbe8a0f7e2fc24 If this is of concern in your application, use -.BR getrandom (2) +.MR getrandom 2 or \fI/dev/random\fP instead. .P The \fI/dev/random\fP device is a legacy interface which dates back to @@ -74,17 +74,17 @@ flag is ignored as .I /dev/random will no longer block except during early boot process. In earlier versions, if -.BR open (2) +.MR open 2 is called for .I /dev/random with the .B O_NONBLOCK flag, a subsequent -.BR read (2) +.MR read 2 will not block if the requested number of bytes is not available. Instead, the available bytes are returned. If no byte is available, -.BR read (2) +.MR read 2 will return \-1 and .I errno will be set to @@ -95,7 +95,7 @@ The flag has no effect when opening .IR /dev/urandom . When calling -.BR read (2) +.MR read 2 for the device .IR /dev/urandom , reads of up to 256 bytes will return as many bytes as are requested @@ -108,12 +108,12 @@ if interrupted by a signal handler. Since Linux 3.16, .\" commit 79a8468747c5f95ed3d5ce8376a3e82e0c5857fc a -.BR read (2) +.MR read 2 from .I /dev/urandom will return at most 32\ MB. A -.BR read (2) +.MR read 2 from .I /dev/random will return at most 512 bytes @@ -134,7 +134,7 @@ interface is considered a legacy interface, and is preferred and sufficient in all use cases, with the exception of applications which require randomness during early boot time; for these applications, -.BR getrandom (2) +.MR getrandom 2 must be used instead, because it will block until the entropy pool is initialized. .P @@ -256,9 +256,9 @@ The default is 64. This file contains the number of bits of entropy below which we wake up processes that do a -.BR select (2) +.MR select 2 or -.BR poll (2) +.MR poll 2 for write access to .IR /dev/random . These values can be changed by writing to the files. @@ -271,7 +271,7 @@ generated once. .\" .SS ioctl(2) interface The following -.BR ioctl (2) +.MR ioctl 2 requests are defined on file descriptors connected to either \fI/dev/random\fP or \fI/dev/urandom\fP. All requests performed will interact with the input @@ -333,7 +333,7 @@ wall clock) to the pools. .SH NOTES For an overview and comparison of the various interfaces that can be used to obtain randomness, see -.BR random (7). +.MR random 7 . .SH BUGS During early boot time, reads from .I /dev/urandom @@ -342,8 +342,8 @@ may return data prior to the entropy pool being initialized. .\" The kernel's random number generator was written by .\" Theodore Ts'o (tytso@athena.mit.edu). .SH SEE ALSO -.BR mknod (1), -.BR getrandom (2), -.BR random (7) +.MR mknod 1 , +.MR getrandom 2 , +.MR random 7 .P RFC\ 1750, "Randomness Recommendations for Security" |