1.\" $OpenBSD: random.4,v 1.3 1997/06/25 22:28:29 angelos Exp $ 2.\" 3.\" Copyright (c) 1996, 1997 Michael Shalayeff 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. All advertising materials mentioning features or use of this software 14.\" must display the following acknowledgement: 15.\" This product includes software developed by Michael Shalayeff. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.Dd March 25, 1996 33.Dt RND 4 34.Os OpenBSD 35.Sh NAME 36.Nm random , 37.Nm srandom , 38.Nm urandom , 39.Nm prandom , 40.Nm arandom 41.Nd random data source devices. 42.Sh SYNOPSIS 43.Fd #include <sys/types.h> 44.Fd #include <dev/rndvar.h> 45.Fd #include <dev/rndioctl.h> 46.Sh DESCRIPTION 47The 48.Nm 49device produces random data, with different random quality. 50{u,s,a}random devices generates random data based on the system activity 51(like disk and network devices). 52.Pp 53.Bl -hang -width /dev/srandomXXX 54.It /dev/random 55reserved for nuclear noise generators. 56.It /dev/srandom 57strong random data. 58.It /dev/urandom 59same as above, but does not guarantees the data to be strong. 60.It /dev/prandom 61simple pseudo-random generator (as it is in the kernel). 62.It /dev/arandom 63aRC4 hashed data (as apposed to the {u,s}random, as they are MD5). 64.Sh SEE ALSO 65.Xr random 9 , 66.Xr random 3 , 67.Xr md5 9 , 68.Xr md5 3 , 69.Xr arc4random 3 . 70.Sh FILES 71.Bl -tag -width /dev/srandom 72.It Pa /dev/random, /dev/srandom, /dev/urandom, /dev/prandom, /dev/arandom 73.El 74.Sh BUGS 75No randomness testing suite provided. 76.Sh HISTORY 77An 78.Nm 79device first appeared in Linux operating system. 80.Pp 81aRC4 routines added by David Mazieres. 82